Mercurial > dotfiles
comparison dot_config/nvim/config.lua @ 403:483c3746730f
Pass capabilities for snippet completion
author | Zeger Van de Vannet <zegervdv@me.com> |
---|---|
date | Fri, 16 Jul 2021 08:53:07 +0200 |
parents | 13fc3aebcf46 |
children | 04483ffbd282 |
comparison
equal
deleted
inserted
replaced
402:13fc3aebcf46 | 403:483c3746730f |
---|---|
391 function(...) | 391 function(...) |
392 vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, | 392 vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, |
393 { underline = true, update_in_insert = false })(...) | 393 { underline = true, update_in_insert = false })(...) |
394 end | 394 end |
395 | 395 |
396 lsp.pyright.setup { on_attach = on_attach } | 396 local capabilities = vim.lsp.protocol.make_client_capabilities() |
397 capabilities.textDocument.completion.completionItem.snippetSupport = true | |
398 capabilities.textDocument.completion.completionItem.resolveSupport = { | |
399 properties = { | |
400 'documentation', | |
401 'detail', | |
402 'additionalTextEdits', | |
403 } | |
404 } | |
405 | |
406 lsp.pyright.setup { on_attach = on_attach, capabilities = capabilities } | |
397 | 407 |
398 if (vim.fn.executable('efm-langserver') == 1) then | 408 if (vim.fn.executable('efm-langserver') == 1) then |
399 require 'efm/python' | 409 require 'efm/python' |
400 require 'efm/lua' | 410 require 'efm/lua' |
401 | 411 |
417 } | 427 } |
418 end | 428 end |
419 | 429 |
420 -- Try importing local config | 430 -- Try importing local config |
421 local ok, localconfig = pcall(require, 'localconfig') | 431 local ok, localconfig = pcall(require, 'localconfig') |
422 if ok then localconfig.setup { on_attach = on_attach } end | 432 if ok then localconfig.setup { on_attach = on_attach, capabilities = capabilities } end |