1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
local ls = require"luasnip"
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
-- local types = require("luasnip.util.types")
-- Every unspecified option will be set to the default.
ls.config.set_config({
history = true,
-- Update more often, :h events for more info.
updateevents = "TextChanged,TextChangedI",
-- ext_opts = {
-- [types.choiceNode] = {
-- active = {
-- virt_text = { { "choiceNode", "Comment" } },
-- },
-- },
-- },
-- treesitter-hl has 100, use something higher (default is 200).
ext_base_prio = 300,
-- minimal increase in priority.
ext_prio_increase = 1,
enable_autosnippets = true,
})
-- ls.snippets = {
-- php = require('alpha.snippets.php')
-- }
vim.api.nvim_set_keymap("i", "<c-k>", "<Plug>luasnip-expand-or-jump", {})
|