This repository was archived by the owner on Jul 6, 2021. It is now read-only.
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
virtual text lose position when using this plugin. #41
Closed
Description
When attaching this plugin, virtual text doesn't follow errors and get lost.
minimal vimrc
call plug#begin('~/.local/share/nvim/plugged')
Plug 'neovim/nvim-lsp'
Plug 'nvim-lua/diagnostic-nvim'
Plug 'nvim-lua/completion-nvim'
call plug#end()
" lua require'nvim_lsp'.gopls.setup{on_attach=require'completion'.on_attach}
lua << EOF
local on_attach_vim = function()
require'completion'.on_attach()
require'diagnostic'.on_attach()
end
require'nvim_lsp'.gopls.setup{on_attach=on_attach_vim}
EOF
au Filetype lua setl omnifunc=v:lua.vim.lsp.omnifunc
" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" " Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
let g:diagnostic_enable_virtual_text = 1
let g:completion_chain_complete_list = {
\ 'default': [
\ {'complete_items': ['lsp', 'snippet', 'tabnine']},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'}
\]
\}
Metadata
Metadata
Assignees
Labels
No labels