Setup snippets in Neovim

This commit is contained in:
Martin Larsson 2025-07-19 12:26:21 +02:00
parent cd2ecc3c1c
commit 9049945d77
3 changed files with 25 additions and 5 deletions

View file

@ -1,6 +1,20 @@
return {
"saghen/blink.cmp",
version = "1.1.1",
dependencies = {
{
"L3MON4D3/LuaSnip",
version = "v2.*",
dependencies = { "rafamadriz/friendly-snippets", },
config = function()
local ls = require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load()
ls.filetype_extend("typescriptreact", { "html" })
ls.filetype_extend("javascriptreact", { "html" })
end
},
},
version = "1.*",
opts = {
keymap = { preset = "super-tab" },
@ -11,6 +25,9 @@ return {
-- (Default) Only show the documentation popup when manually triggered
completion = { documentation = { auto_show = false } },
snippets = {
preset = "luasnip",
},
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
@ -27,5 +44,5 @@ return {
-- See the fuzzy documentation for more information
fuzzy = { implementation = "prefer_rust_with_warning" }
},
opts_extend = { "sources.default" }
opts_extend = { "sources.default" },
}