-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-stop
command.If required, lsp can be restarted via
lst-restart
.Without having separate commands I was also thinking about having subcommands part a generic
:lsp
command.That is, remove
lsp-restart
,:lsp-stop
in 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...)