- commit
- 3d63c74
- parent
- eaba55e
- author
- Eric Bower
- date
- 2025-08-18 09:03:12 -0400 EDT
chore(nvim): use table for `supports_method`
1 files changed,
+3,
-1
+3,
-1
1@@ -81,7 +81,9 @@ local function setup_lsp()
2 map("i", "<C-k>", vim.lsp.completion.get, bufopts) -- open completion menu manually
3 map("n", "grd", vim.lsp.buf.definition, bufopts)
4
5- if client:supports_method("textDocument/completion") then
6+ local methods = vim.lsp.protocol.Methods
7+ -- https://github.com/neovim/neovim/blob/b2828af5b5aba044cd40594a519d2d9f5dbb69cb/runtime/lua/vim/lsp/protocol.lua?plain=1#L858
8+ if client:supports_method(methods.textDocument_completion) then
9 vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
10 end
11 end,