feat(nvim): add luasnip snippets
This commit is contained in:
parent
659e719c47
commit
e87d0c7ec3
5 changed files with 260 additions and 43 deletions
24
modules/programs/nvim/plugins/lua/luasnip.lua
Normal file
24
modules/programs/nvim/plugins/lua/luasnip.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
local ls = require("luasnip")
|
||||
local types = require("luasnip.util.types")
|
||||
|
||||
-- Every unspecified option will be set to the default.
|
||||
ls.setup({
|
||||
history = true,
|
||||
|
||||
-- Update more often, :h events for more info.
|
||||
update_events = "TextChanged,TextChangedI",
|
||||
-- Snippets aren't automatically removed if their text is deleted.
|
||||
-- `delete_check_events` determines on which events (:h events) a check for
|
||||
-- deleted snippets is performed.
|
||||
-- This can be especially useful when `history` is enabled.
|
||||
delete_check_events = "TextChanged",
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
active = {
|
||||
virt_text = { { "<--", "Error" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue