More than one LSP server for one language

Waqar Ahmed waqar.17a at gmail.com
Mon Mar 25 21:32:37 GMT 2024


See https://bugs.kde.org/show_bug.cgi?id=474612

So far no one has done the work, but we are open to it.

Workarounds... it depends. If you are looking to use the extra server
for diagnostics e.g. ruff for python, then the quickest path forward
would be to
1). Add it as a separate plugin like:
https://github.com/KDE/kate/tree/master/addons/eslint
2). Or add it as a new tool in project plugin:
https://github.com/KDE/kate/tree/master/addons/project/tools

For stuff like completion, I am not sure how well that will work even
if we support multiple servers.

On Tue, Mar 26, 2024 at 2:18 AM Vladislav Vorobiev <v at piratweb.com> wrote:
>
> Short and painful answer... Are there any plans to implement it? There are a lot of use cases for it, and other editors allow this.
> Some ideas for workarounds?
>
> On Monday, March 25, 2024 10:12:46 PM CET Waqar Ahmed wrote:
> > It is not possible atm.
> >
> > On Sun, Mar 24, 2024 at 8:55 PM Vladislav Vorobiev <v at piratweb.com> wrote:
> > >
> > > Hi,
> > >
> > > how to add more than one LSP server for a language?
> > >
> > > https://docs.kde.org/stable5/en/kate/kate/kate-application-plugin-lspclient.html
> > >
> > > Behind this link i see how to change and setups commands.
> > >
> > > Here on python example.
> > >
> > >         "python": {
> > >             "command": ["python3", "-m", "pyls", "--check-parent-process"],
> > >             "url": "https://github.com/palantir/python-language-server",
> > >             "highlightingModeRegex": "^Python$"
> > >         },
> > >
> > > For python is useful (i think so) for the moment to use rust-lsp and pyright.
> > > In NVim for example i can easily use them both. But how to use it in kate with setting json.
> > > There is only one command key available in the json.
> > > Is thre a way to provide more than one server like
> > >
> > >         "python": {
> > >             "commandS": [["mylsp1", "ops"], ["mylsp1", "ops"],],
> > >             "url": "https://github.com/palantir/python-language-server",
> > >             "highlightingModeRegex": "^Python$"
> > >         },
> > >
> > > Second question is related to this python key.
> > > How can i select this python in kate.
> > >
> > > If i introduce in settings json
> > >
> > >         "pythonA": {
> > >             "command": [],],
> > >             "url": "https://github.com/palantir/python-language-server",
> > >             "highlightingModeRegex": "^Python$"
> > >         },
> > >
> > >         "pythonB": {
> > >             "commandS": [["mylsp1", "ops"], ["mylsp1", "ops"],],
> > >             "url": "https://github.com/palantir/python-language-server",
> > >             "highlightingModeRegex": "^Python$"
> > >         },
> > >         "pythonC": {
> > >             "commandS": [["mylsp1", "ops"], ["mylsp1", "ops"],],
> > >             "url": "https://github.com/palantir/python-language-server",
> > >             "highlightingModeRegex": "^Python$"
> > >         },
> > >
> > >
> > > How kate understand witch entry is to use?
> > > How can i switch between.
> > >
> > > Regards
> > > Vlkad
> > >
> > >
> > >
> >
>
>
>
>


More information about the KWrite-Devel mailing list