From 063b6999ef0e59d078ec54cea3ea60ba52f2e1e1 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 27 Feb 2026 07:52:14 -0500 Subject: [PATCH] fix: luasnip setup needs to be called last to properly populate snippets --- lua/plugins/user.lua | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua index 188aa71..b0fc503 100644 --- a/lua/plugins/user.lua +++ b/lua/plugins/user.lua @@ -144,4 +144,49 @@ return { -- or leave empty for defaults }, }, + -- You can disable default plugins as follows: + -- { "max397574/better-escape.nvim", enabled = false }, + + -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call + -- { + -- "L3MON4D3/LuaSnip", + -- config = function(plugin, opts) + -- -- add more custom luasnip configuration such as filetype extend or custom snippets + -- local luasnip = require "luasnip" + -- luasnip.filetype_extend("javascript", { "javascriptreact" }) + -- + -- -- include the default astronvim config that calls the setup call + -- require "astronvim.plugins.configs.luasnip"(plugin, opts) + -- end, + -- }, + -- + -- { + -- "windwp/nvim-autopairs", + -- config = function(plugin, opts) + -- require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call + -- -- add more custom autopairs configuration such as custom rules + -- local npairs = require "nvim-autopairs" + -- local Rule = require "nvim-autopairs.rule" + -- local cond = require "nvim-autopairs.conds" + -- npairs.add_rules( + -- { + -- Rule("$", "$", { "tex", "latex" }) + -- -- don't add a pair if the next character is % + -- :with_pair(cond.not_after_regex "%%") + -- -- don't add a pair if the previous character is xxx + -- :with_pair( + -- cond.not_before_regex("xxx", 3) + -- ) + -- -- don't move right when repeat character + -- :with_move(cond.none()) + -- -- don't delete if the next character is xx + -- :with_del(cond.not_after_regex "xx") + -- -- disable adding a newline when you press + -- :with_cr(cond.none()), + -- }, + -- -- disable for .vim files, but it work for another filetypes + -- Rule("a", "a", "-vim") + -- ) + -- end, + -- }, }