Skip to content

Commit d53111f

Browse files
committed
fix(docs): Remove deprecated vim.lsp.with() from config docs
Neovim vim.lsp.with() is deprecated as of 0.11 [1]. Recommend another way to set update_in_insert [1] https://neovim.io/doc/user/deprecated.html
1 parent e1a5cf0 commit d53111f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plugin/vim/quick-lint-js.vim/doc/quick-lint-js.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,17 @@ module directly: >
205205
nvim_lsp.quick_lint_js.setup {}
206206
207207
quick-lint-js is fast. To feel the speed, you might want to lint while in
208-
insert mode. Edit the "handlers" key in the setup function call to make
208+
insert mode. Edit the "on_attach" key in the setup function call to make
209209
JavaScript linting as fast as possible: >
210210
211211
require('lspconfig/quick_lint_js').setup {
212-
handlers = {
213-
['textDocument/publishDiagnostics'] = vim.lsp.with(
214-
vim.lsp.diagnostic.on_publish_diagnostics, {
215-
update_in_insert = true
216-
}
217-
)
218-
}
212+
on_attach = function(client, bufnr)
213+
if client.name == "quick-lint-js" then
214+
vim.diagnostic.config({
215+
update_in_insert = true,
216+
}, client.id)
217+
end
218+
end,
219219
}
220220
221221
The `setup` function can take the following configuration options:

0 commit comments

Comments
 (0)