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
|
source ~/.vimrc
|
||||||
|
|
||||||
|
|
||||||
lua << EOF
|
lua << EOF
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
local on_attach = require'completion'.on_attach
|
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
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = require'completion'.on_attach,
|
||||||
flags = {
|
flags = {
|
||||||
debounce_text_changes = 150,
|
debounce_text_changes = 150,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
11
.vimrc
11
.vimrc
|
@ -40,9 +40,16 @@ let g:ctrlp_show_hidden = 1
|
||||||
"" Vim Closetag
|
"" Vim Closetag
|
||||||
let g:closetag_filenames = '*.xml,*.xlf,*.html,*.xhtml,*.phtml'
|
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
|
"" Vim Config
|
||||||
" Some autocompletion settings.
|
" Set completeopt to have a better completion experience
|
||||||
set completeopt+=longest,menuone,menu,preview
|
set completeopt=menuone,noinsert,noselect
|
||||||
|
|
||||||
|
" Avoid showing message extra message when using completion
|
||||||
|
set shortmess+=c
|
||||||
|
|
||||||
" Add clipboard support
|
" Add clipboard support
|
||||||
set clipboard=unnamedplus
|
set clipboard=unnamedplus
|
||||||
|
|
Loading…
Reference in a new issue