completion-nvim
completion-nvim copied to clipboard
Plugin ignores file association
Hello. I have a lua file with extension (.ds), sadly completion seems to be not able to associate it with lua and show complete menu
init.vim
...
autocmd BufRead,BufNewFile *.ds set filetype=lua
lua require'nvim_lsp'.sumneko_lua.setup{on_attach=require'completion'.on_attach}
echo &filetype returns 'lua'
Can you see if you can setup omnifunc completion and use that in the .ds
file? I've done some testing on my side and find out completion-nvim seems to be attached but the server is not responding.
If I'm not mistaken, wrote this to enable
filetype plugin on
set omnifunc=syntaxcomplete#Complete
and CTRL-X CTRL-O shows
Ahh that is not coming from lsp. You have to set
au Filetype lua setl omnifunc=v:lua.vim.lsp.omnifunc
Here is the result:
without
and
with
I also tried to work with lsp and set up some config, where I put paths from :LspInstallInfo and added ds file into filetypes property