diff --git a/plugins/autopairs.nix b/plugins/autopairs.nix index 495448c..223a08f 100644 --- a/plugins/autopairs.nix +++ b/plugins/autopairs.nix @@ -34,20 +34,7 @@ rootOpts.keymaps = [ { key = "ua"; - - # https://github.com/AstroNvim/astrocore/blob/v1.4.0/lua/astrocore/toggles.lua#L37-L50 - action.__raw = '' - function() - local ok, autopairs = pcall(require, "nvim-autopairs") - if ok then - if autopairs.state.disabled then - autopairs.enable() - else - autopairs.disable() - end - end - end - ''; + action.__raw = "function() require('astrocore.toggles').autopairs() end"; options.desc = "Toggle autopairs"; } ]; diff --git a/plugins/neo-tree.nix b/plugins/neo-tree.nix index d331f50..faa5c09 100644 --- a/plugins/neo-tree.nix +++ b/plugins/neo-tree.nix @@ -51,6 +51,7 @@ # https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L136-L168 copy_selector.__raw = '' function(state) + local notify = require("astrocore").notify local node = state.tree:get_node() local filepath = node:get_id() local filename = node.name @@ -68,6 +69,7 @@ local options = vim.tbl_filter(function(val) return vals[val] ~= "" end, vim.tbl_keys(vals)) if vim.tbl_isempty(options) then + notify("No values to copy", vim.log.levels.WARN) return end table.sort(options) @@ -77,6 +79,7 @@ }, function(choice) local result = vals[choice] if result then + notify(("Copied: `%s`"):format(result)) vim.fn.setreg("+", result) end end)