Closed Zeioth closed 11 months ago
New option exclude = { 'markdown', ... }.
exclude = { 'markdown', ... }
So the plugin doesn't trigger for said language.
There are many scenarios where this is necessary. I'm gonna describe two.
Imagine you are editing a markdown file.
You don't have a markdown lsp server, but you have prettierd as formatter.
When lsp-timeout run :LspStop, this is gonna also stop prettierd.
:LspStop
But it won't be possible to restore it with a LspAttach autocmd like next, because there is not lsp server at all.
vim.api.nvim_create_autocmd({ "LspAttach" }, { desc = "Ensure null-ls start its sources a lsp client starts", callback = function() pcall(function() require("null-ls").enable({}) end) end, })
Some LSP servers might just miss behave, and it would be a good idea to be able to ignore the language entirely.
Duplicate of #10
Ah, null-ls is involved again ... I'm looking into their code currently to figure out how it interferes with the lsp-config clients configs.
null-ls
lsp-config
Summary
New option
exclude = { 'markdown', ... }
.So the plugin doesn't trigger for said language.
Why
There are many scenarios where this is necessary. I'm gonna describe two.
scenario 1
Imagine you are editing a markdown file.
You don't have a markdown lsp server, but you have prettierd as formatter.
When lsp-timeout run
:LspStop
, this is gonna also stop prettierd.But it won't be possible to restore it with a LspAttach autocmd like next, because there is not lsp server at all.
scenario 2
Some LSP servers might just miss behave, and it would be a good idea to be able to ignore the language entirely.