Skip to content

Disable Diagnostics? #13

Discussion options

You must be logged in to vote

To disable all diagnostic you can use this command:

:lua vim.diagnostic.disable()

The way you pass options to a server with lsp-zero is using the .configure() function. Example.

local lsp = require('lsp-zero')
lsp.preset('recommended')

lsp.configure('tsserver', {
  flags = {
    debounce_text_changes = 150,
  },
})

lsp.setup()

The first argument to .configure() is the name of the server and the second are the options. Since lsp-zero uses lspconfig to configure the servers the details about available options can be found in :help lspconfig-setup.

and if you want to go even further, lspconfig uses the built-in function vim.lsp.start_client(). See :help vim.lsp.start_client().

But I get …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zach-is-my-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants