Skip to content

Commit

Permalink
fix(docs): Reduce scope of lspconfig example to quick-lint-js
Browse files Browse the repository at this point in the history
Fixes #909
  • Loading branch information
RossBarnie authored and strager committed Sep 18, 2023
1 parent ed1a91f commit b7aa1c8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugin/vim/quick-lint-js.vim/doc/quick-lint-js.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,18 @@ module directly: >
nvim_lsp.quick_lint_js.setup {}
quick-lint-js is fast. To feel the speed, you might want to lint while in
insert mode. Add the following code to your |init.lua| to make JavaScript
linting as fast as possible: >
insert mode. Edit the "handlers" key in the setup function call to make
JavaScript linting as fast as possible: >
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
update_in_insert = true,
require('lspconfig/quick_lint_js').setup {
handlers = {
['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
update_in_insert = true
}
)
}
)
}
The `setup` function can take the following configuration options:

Expand Down

0 comments on commit b7aa1c8

Please sign in to comment.