diff --git a/dots/.config/nvim/lua/plugins/mappings.lua b/dots/.config/nvim/lua/plugins/mappings.lua index 409e36be..86a3a6c9 100755 --- a/dots/.config/nvim/lua/plugins/mappings.lua +++ b/dots/.config/nvim/lua/plugins/mappings.lua @@ -246,3 +246,18 @@ vim.keymap.set( vim.keymap.set("n", "xl", "TroubleToggle loclist", { silent = true, desc = "Trouble: Loclist" }) vim.keymap.set("n", "xq", "TroubleToggle quickfix", { silent = true, desc = "Trouble: Quickfix" }) vim.keymap.set("n", "xt", "TodoTrouble", { silent = true, desc = "Trouble: Todo Items" }) + +-- Autolist mappings +vim.keymap.set("i", "", "AutolistTab", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("i", "", "AutolistShiftTab", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("i", "", "AutolistNewBullet", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "o", "oAutolistNewBullet", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "O", "OAutolistNewBulletBefore", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "", "AutolistToggleCheckbox", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "", "AutolistRecalculate", { silent = true, desc = "Trouble: Todo Items" }) + +-- functions to recalculate list on edit +vim.keymap.set("n", ">>", ">>AutolistRecalculate", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "<<", "<<AutolistRecalculate", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("n", "dd", "ddAutolistRecalculate", { silent = true, desc = "Trouble: Todo Items" }) +vim.keymap.set("v", "d", "dAutolistRecalculate", { silent = true, desc = "Trouble: Todo Items" }) diff --git a/dots/.config/nvim/lua/plugins/plugins.lua b/dots/.config/nvim/lua/plugins/plugins.lua index 0e7f49a0..c7349049 100755 --- a/dots/.config/nvim/lua/plugins/plugins.lua +++ b/dots/.config/nvim/lua/plugins/plugins.lua @@ -575,18 +575,7 @@ lazy.setup({ "tex", "plaintex", }, - config = function() - local autolist = require("autolist") - autolist.setup() - autolist.create_mapping_hook("i", "", autolist.new) - autolist.create_mapping_hook("i", "", autolist.indent) - autolist.create_mapping_hook("i", "", autolist.indent, "") - autolist.create_mapping_hook("n", "o", autolist.new) - autolist.create_mapping_hook("n", "O", autolist.new_before) - autolist.create_mapping_hook("n", ">>", autolist.indent) - autolist.create_mapping_hook("n", "<<", autolist.indent) - autolist.create_mapping_hook("n", "", autolist.force_recalculate) - end, + opts = {} }, -- Tint inactive windows