]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/coding.lua
nvim: tidy luasnip
[dotfiles.git] / nvim / lua / plugins / coding.lua
index 4fe8c083086078e9254fe56b2bc5a828270a0a65..1be8db3160c33f91c6379a36dce5ecb7391f4068 100644 (file)
@@ -1,22 +1,22 @@
 ---@type LazySpec
 return {
   -- snippets
 ---@type LazySpec
 return {
   -- snippets
-  {
-    "L3MON4D3/LuaSnip",
-    -- disable luasnip bindings for <tab> and <s-tab>
+  { "l3mon4d3/luasnip",
+    build = "make install_jsregexp", -- optional
     dependencies = {
     dependencies = {
-      {
-        "honza/vim-snippets",
-        config = function()
-          require("luasnip.loaders.from_snipmate").lazy_load()
-          require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/lua/snippets" })
-        end,
-      },
+      { "honza/vim-snippets", },
     },
     },
+    config = function()
+      local snippets = vim.fn.stdpath("config").."/snippets"
+      require("luasnip.loaders.from_snipmate").load({ paths = { snippets }})
+      require("luasnip.loaders.from_lua").load({ paths = { snippets }})
+    end,
     keys = function()
       return {}
     end,
     opts = {
     keys = function()
       return {}
     end,
     opts = {
+      history = true,
+      delete_check_events = "TextChanged",
       store_selection_keys = "<Tab>",
     },
   },
       store_selection_keys = "<Tab>",
     },
   },