summaryrefslogtreecommitdiffstats
path: root/dotfiles/vim-dev.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/vim-dev.lua')
-rw-r--r--dotfiles/vim-dev.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/dotfiles/vim-dev.lua b/dotfiles/vim-dev.lua
index 6b78022..d89a3bb 100644
--- a/dotfiles/vim-dev.lua
+++ b/dotfiles/vim-dev.lua
@@ -34,13 +34,22 @@ function on_attach(client, bufnr)
34 34
35 -- Rust specific 35 -- Rust specific
36 buf_set_keymap("n", "<leader>sh", "<cmd>RustToggleInlayHints<CR>", opts) 36 buf_set_keymap("n", "<leader>sh", "<cmd>RustToggleInlayHints<CR>", opts)
37
38 require("completion").on_attach()
39end 37end
40 38
39local capabilities = vim.lsp.protocol.make_client_capabilities()
40capabilities.textDocument.completion.completionItem.snippetSupport = true
41capabilities.textDocument.completion.completionItem.resolveSupport = {
42 properties = {
43 'documentation',
44 'detail',
45 'additionalTextEdits',
46 }
47}
48
41function setup_lsp_with(servers) 49function setup_lsp_with(servers)
42 for _, server in ipairs(servers) do 50 for _, server in ipairs(servers) do
43 lspconfig[server].setup { 51 lspconfig[server].setup {
52 capabilities = capabilities,
44 cmd = { vim.g[server .. "_path"] }, 53 cmd = { vim.g[server .. "_path"] },
45 on_attach = on_attach, 54 on_attach = on_attach,
46 } 55 }