Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
null-ls.nvim
Discontinued Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
Using the LSP omnifunc with the builtin completion framework of Neovim (e.g. setting omnifunc to 'v:lua.vim.lsp.omnifunc') is sufficient for most of my needs. The only problem I had was that I also wanted to complete snippets. Luckily, besides omnifunc (triggered with i_CTRL-X_CTRL-O), a user-defined completion function can also be specified with completefunc (triggered with i_CTRL-X_CTRL-U). Because of this I wrote snipcomp.lua, which implements 'omnifunc' compatible LuaSnip completion. Now, I can complete snippets alongside LSP stuff and all other builtin completion sources.
Using the LSP omnifunc with the builtin completion framework of Neovim (e.g. setting omnifunc to 'v:lua.vim.lsp.omnifunc') is sufficient for most of my needs. The only problem I had was that I also wanted to complete snippets. Luckily, besides omnifunc (triggered with i_CTRL-X_CTRL-O), a user-defined completion function can also be specified with completefunc (triggered with i_CTRL-X_CTRL-U). Because of this I wrote snipcomp.lua, which implements 'omnifunc' compatible LuaSnip completion. Now, I can complete snippets alongside LSP stuff and all other builtin completion sources.
I wrote a similar completion function for vim-vsnip but ended up converting it into a completion source for null-ls. That way you can get snippets and LSP stuff all from the native LSP in Neovim. You might think about doing the same for LuaSnip, and it would address the question of omnifunc vs completefunc.