From 412f51cd7ad4ce610ecaf13210b52709fb3e0232 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Thu, 25 Nov 2021 00:05:34 +0100 Subject: Move config to lua. Add laravel snippets --- lua/alpha/snippets/config.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lua/alpha/snippets/config.lua (limited to 'lua/alpha/snippets/config.lua') diff --git a/lua/alpha/snippets/config.lua b/lua/alpha/snippets/config.lua new file mode 100644 index 0000000..ff438c2 --- /dev/null +++ b/lua/alpha/snippets/config.lua @@ -0,0 +1,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", "", "luasnip-expand-or-jump", {}) -- cgit v1.2.3