nvim: Fix lsp completion for newer nvim versions

Had to fix some naming of required modules for newer neovim versions.
Additionally, removed lsp from engaging in pandoc files so that we may
save some battery while only writing markdown.

see
https://github.com/nvim-lua/completion-nvim/issues/274#issuecomment-729569426
This commit is contained in:
Marty Oehme 2020-11-23 10:52:38 +01:00
parent 92016761f5
commit ede86bc384
Signed by: Marty
GPG key ID: B7538B8F50A1C800
2 changed files with 11 additions and 11 deletions

View file

@ -24,15 +24,15 @@ local on_attach = function(client, bufnr)
{noremap = true, silent = true})
end
require'nvim_lsp'.pyls.setup {on_attach = on_attach}
require'nvim_lsp'.vimls.setup {on_attach = on_attach}
require'nvim_lsp'.bashls.setup {on_attach = on_attach}
require'nvim_lsp'.gopls.setup {on_attach = on_attach}
require'nvim_lsp'.texlab.setup {on_attach = on_attach}
require'lspconfig'.pyls.setup {on_attach = on_attach}
require'lspconfig'.vimls.setup {on_attach = on_attach}
require'lspconfig'.bashls.setup {on_attach = on_attach}
require'lspconfig'.gopls.setup {on_attach = on_attach}
require'lspconfig'.texlab.setup {on_attach = on_attach}
-- To get builtin LSP running, do something like:
-- NOTE: This replaces the calls where you would have before done `require('nvim_lsp').sumneko_lua.setup()`
require('nlua.lsp.nvim').setup(require('nvim_lsp'), {
require('nlua.lsp.nvim').setup(require('lspconfig'), {
on_attach = on_attach,
-- Include globals you want to tell the LSP are real :)

View file

@ -50,16 +50,16 @@ endfun
" BUG for triggered only bibcite completion, see: https://github.com/nvim-lua/completion-nvim/issues/158
let g:completion_chain_complete_list = {
\ 'pandoc': [
\ { 'complete_items': ['buffer', 'lsp', 'snippet']},
\ { 'complete_items': ['path'], 'triggered_only': ['/']},
\ { 'complete_items': ['buffers', 'snippet']},
\ { 'complete_items': ['bibcite']},
\ { 'complete_items': ['path']},
\ { 'mode': '<c-p>'},
\ { 'mode': '<c-n>'}
\],
\ 'tex': [
\ { 'complete_items': ['buffer', 'lsp', 'snippet']},
\ { 'complete_items': ['path'], 'triggered_only': ['/']},
\ { 'complete_items': ['buffers', 'snippet']},
\ { 'complete_items': ['bibcite']},
\ { 'complete_items': ['path']},
\ { 'mode': '<c-p>'},
\ { 'mode': '<c-n>'}
\],