Allow LSP server to be stopped - #5964
Conversation
+1 |
|
An advantage of having separate commands instead of a top level command with subcommands is discoverability -- every action possible is spelled out in the completion popup when you type |
Yeah I've noticed this at times, but isn't this rather a separate issue (bug) that should be solved? I mean, the subcommands are known so there is no reason |
|
Looks like the CI is failing because of some trailing whitespace - you can fix it with |
the-mikedavis
left a comment
There was a problem hiding this comment.
Just a small clippy lint but otherwise this looks good 👍
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Sometimes you don't require the lsp to run, especially if you want to quickly have a look at a file part of a large project.
This PR allows to stop lsp when required via
:lsp-stopcommand.If required, lsp can be restarted via
lst-restart.Without having separate commands I was also thinking about having subcommands part a generic
:lspcommand.That is, remove
lsp-restart,:lsp-stopin favour of a more generic and extensiblelsp.The usage would be
:lsp start,:lsp stop,:lsp restart. (restart and start may be probably merged in a single start command)(Docs will be eventually updated if the PR is accepted...)