snipcomp.lua: LuaSnip companion plugin for omni completion

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • dotfiles

    My personal dotfiles for most of the programs I use on a daily basis. (by potamides)

  • 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.

  • LuaSnip

    Snippet Engine for Neovim written in 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.

  • 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.

    InfluxDB logo
  • null-ls.nvim

    Discontinued Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts