make autocompletion possible
This commit is contained in:
parent
0b8813831f
commit
c3c64362df
1 changed files with 6 additions and 2 deletions
8
init.lua
8
init.lua
|
|
@ -117,16 +117,20 @@ vim.lsp.config('*', {
|
|||
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get, { desc = "trigger autocompletion" })
|
||||
end
|
||||
})
|
||||
vim.lsp.config('qmlls', {
|
||||
cmd = { "qmlls6" },
|
||||
})
|
||||
vim.lsp.enable('lua_ls')
|
||||
vim.lsp.enable('qmlls')
|
||||
vim.lsp.enable('clangd')
|
||||
|
||||
|
||||
vim.o.complete = ".,o" -- use buffer and omnifunc
|
||||
vim.o.completeopt = "fuzzy,menuone,noselect" -- add 'popup' for docs (sometimes)
|
||||
vim.o.autocomplete = false
|
||||
vim.o.autocomplete = true
|
||||
vim.o.pumheight = 7
|
||||
|
||||
|
||||
-- setup autocomplete
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(ev)
|
||||
vim.lsp.completion.enable(true, ev.data.client_id, ev.buf, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue