Luasnip

NvChad uses luasnip plugin for handling snippets, by default it uses friendly-snippets plugin which provides snippets for many languages .

  • But you would want to extend or add your own snippets so read luasnip docs.

Globals

These are the globals you can use to include the path of your snippets.

-- using with vscode extensions. i.e ~/.vscode/extensions/deinsoftware.vitest-snippets-1.8.0
vim.g.vscode_snippets_path = "path to your vscode snippet extension directory"

-- snipmate format
vim.g.snipmate_snippets_path = "your snippets path"

-- lua format
vim.g.lua_snippets_path = vim.fn.stdpath "config" .. "/lua/lua_snippets"

stdpath("config") returns the path of our nvimc config folder