Nicer completion settings
This commit is contained in:
parent
bf729262cc
commit
2f69cd2ed6
2 changed files with 14 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
|||
source ~/.vimrc
|
||||
|
||||
|
||||
lua << EOF
|
||||
local nvim_lsp = require('lspconfig')
|
||||
local on_attach = require'completion'.on_attach
|
||||
|
@ -6,10 +8,12 @@ local servers = { "html", "clangd", "vimls", "vuels", "phpactor", "rust_analyzer
|
|||
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
on_attach = require'completion'.on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
end
|
||||
EOF
|
||||
|
||||
|
||||
|
|
11
.vimrc
11
.vimrc
|
@ -40,9 +40,16 @@ let g:ctrlp_show_hidden = 1
|
|||
"" Vim Closetag
|
||||
let g:closetag_filenames = '*.xml,*.xlf,*.html,*.xhtml,*.phtml'
|
||||
|
||||
"" completion-nvim
|
||||
let g:completion_trigger_character = ['.', '::', '>']
|
||||
let g:completion_trigger_keyword_length = 3
|
||||
|
||||
"" Vim Config
|
||||
" Some autocompletion settings.
|
||||
set completeopt+=longest,menuone,menu,preview
|
||||
" Set completeopt to have a better completion experience
|
||||
set completeopt=menuone,noinsert,noselect
|
||||
|
||||
" Avoid showing message extra message when using completion
|
||||
set shortmess+=c
|
||||
|
||||
" Add clipboard support
|
||||
set clipboard=unnamedplus
|
||||
|
|
Loading…
Reference in a new issue