fix: blink

This commit is contained in:
2025-01-12 17:26:14 +02:00
parent e75b06b971
commit d84879ac87
3 changed files with 56 additions and 27 deletions

View File

@@ -2,12 +2,30 @@ return {
{
"L3MON4D3/LuaSnip",
build = "make install_jsregexp",
version = "*",
version = "v2.*",
dependencies = {
"rafamadriz/friendly-snippets", -- a bunch of snippets to use
-- "saadparwaiz1/cmp_luasnip",
},
opts = {},
opts = function()
local types = require("luasnip.util.types")
return {
-- This tells LuaSnip to remember to keep around the last snippet.
-- You can jump back into it even if you move outside of the selection
history = true,
-- This one is cool cause if you have dynamic snippets, it updates as you type!
updateevents = "TextChanged,TextChangedI",
-- Autosnippets:
enable_autosnippets = true,
-- Crazy highlights!!
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { " « ", "NonTest" } },
},
},
},
}
end,
config = function(_, opts)
local ls = require("luasnip")
@@ -61,30 +79,33 @@ return {
end
end, { silent = true })
opts = {
-- This tells LuaSnip to remember to keep around the last snippet.
-- You can jump back into it even if you move outside of the selection
history = true,
-- This one is cool cause if you have dynamic snippets, it updates as you type!
updateevents = "TextChanged,TextChangedI",
-- Autosnippets:
enable_autosnippets = true,
-- Crazy highlights!!
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { " « ", "NonTest" } },
},
},
},
}
ls.config.setup(opts)
-- require("luasnip.loaders.from_vscode").load({ exclude = { "python" } })
require("luasnip.loaders.from_vscode").load({
exclude = {
"rust",
rust = {
"modtest",
},
},
})
vim.tbl_map(function(type)
require("luasnip.loaders.from_" .. type).lazy_load()
end, { "vscode", "snipmate", "lua" })
ls.filetype_extend("typescript", { "tsdoc" })
ls.filetype_extend("javascript", { "jsdoc" })
ls.filetype_extend("lua", { "luadoc" })
ls.filetype_extend("python", { "pydoc" })
ls.filetype_extend("rust", { "rustdoc" })
ls.filetype_extend("cs", { "csharpdoc" })
ls.filetype_extend("java", { "javadoc" })
ls.filetype_extend("c", { "cdoc" })
ls.filetype_extend("cpp", { "cppdoc" })
ls.filetype_extend("php", { "phpdoc" })
ls.filetype_extend("kotlin", { "kdoc" })
ls.filetype_extend("ruby", { "rdoc" })
ls.filetype_extend("sh", { "shelldoc" })
end,
},
}