]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/coding.lua
nvim: tidy luasnip
[dotfiles.git] / nvim / lua / plugins / coding.lua
index 9238f1ddb452956ec038866860cd4e6fc2425894..1be8db3160c33f91c6379a36dce5ecb7391f4068 100644 (file)
@@ -1,22 +1,22 @@
 ---@type LazySpec
 return {
   -- snippets
-  {
-    "L3MON4D3/LuaSnip",
-    -- disable luasnip bindings for <tab> and <s-tab>
+  { "l3mon4d3/luasnip",
+    build = "make install_jsregexp", -- optional
     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 = {
+      history = true,
+      delete_check_events = "TextChanged",
       store_selection_keys = "<Tab>",
     },
   },
@@ -144,19 +144,8 @@ return {
         },
       }
     end,
-    config = function(_, opts)
-      require("mini.ai").setup(opts)
-      LazyVim.on_load("which-key.nvim", function()
-        vim.schedule(function()
-          LazyVim.mini.ai_whichkey(opts)
-        end)
-      end)
-    end,
   },
-  -- comments
   { "numToStr/Comment.nvim",
-    -- used to be what I use, but nvim will include commenting based on mini.comment
-    enabled = false ,
     opts = {
       toggler = {
         line = "gcc",
@@ -168,18 +157,14 @@ return {
       },
     },
   },
-  { "echasnovski/mini.comment", enabled = false },
-
-  {
-    "folke/lazydev.nvim",
+  { "folke/lazydev.nvim",
     ft = "lua",
     cmd = "LazyDev",
     opts = {
       library = {
         { path = "${3rd}/luv/library", words = { "vim%.uv" } },
-        { path = "LazyVim", words = { "LazyVim" } },
         { path = "snacks.nvim", words = { "Snacks" } },
-        { path = "lazy.nvim", words = { "LazyVim" } },
+        { path = "lazy.nvim", words = { "LazySpec" } },
       },
     },
   },