Skip to content

Start and stop LSPs as necessary during vim.lsp.enable #33702

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfly
Copy link
Contributor

@jfly jfly commented Apr 29, 2025

IIUC, the intent vim.lsp.enable is for it to be called once early during startup. However, I have a noisy LSP that I'd like to be able to turn off when it's distracting and on when it's useful. I want this enable/disabling to affect all current and future buffers, and vim.lsp.enable seems like a reasonable place to put that logic.

fixes #33701
fixes #33116

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, and aligns with enable() behavior in other modules.

IIUC, the intent `vim.lsp.enable` is for it to be called once early
during startup. However, I have a noisy LSP that I'd like to be able to
turn off when it's distracting and on when it's useful. I want this
enable/disabling to affect all current and future buffers, and
`vim.lsp.enable` seems like a reasonable place to put that logic.

This fixes neovim#33701 and
neovim#33116.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants