fix: snippets back in LuaSnip
This commit is contained in:
@@ -2,7 +2,7 @@ local trigger_chars_add = { "-", "*", "@", "$" }
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
dependencies = { "rafamadriz/friendly-snippets", "L3MON4D3/LuaSnip" },
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "1.*",
|
||||
@@ -42,13 +42,23 @@ return {
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = {
|
||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||
trigger = {},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
},
|
||||
list = {
|
||||
cycle = { from_top = true, from_bottom = true },
|
||||
cycle = {
|
||||
from_top = true,
|
||||
from_bottom = true,
|
||||
},
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
},
|
||||
auto_brackets = {
|
||||
kind_resolution = {
|
||||
blocked_filetypes = { "typescriptreact", "javascriptreact", "vue", "latex", "tex" },
|
||||
},
|
||||
},
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
@@ -80,6 +90,13 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
snippets = {
|
||||
preset = "luasnip",
|
||||
opts = {
|
||||
clipboard_register = nil,
|
||||
},
|
||||
},
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
|
||||
@@ -17,6 +17,13 @@ return {
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").load({ paths = { "~/.config/nvim/snippets" } })
|
||||
luasnip.setup({})
|
||||
|
||||
-- ───────────────────────────────────────────────────────────────────
|
||||
-- ╭───────────────────────────────────────────────╮
|
||||
-- │ Import configs from other files │
|
||||
|
||||
Reference in New Issue
Block a user