diff --git a/dots/.config/nvim/lua/plugins/configs/autolist.lua b/dots/.config/nvim/lua/plugins/configs/autolist.lua deleted file mode 100644 index 2dcaf4da..00000000 --- a/dots/.config/nvim/lua/plugins/configs/autolist.lua +++ /dev/null @@ -1,128 +0,0 @@ -return { - { - "gaoDean/autolist.nvim", - event = { "BufReadPre", "BufNewFile" }, - ft = { - "markdown", - "text", - "tex", - "plaintex", - "norg", - "yaml", - "yaml.ansible", - }, - config = function() - local list_patterns = { - unordered = "[-+*]", -- - + * - digit = "%d+[.)]", -- 1. 2. 3. - ascii = "%a[.)]", -- a) b) c) - roman = "%u*[.)]", -- I. II. III. - } - - require("autolist").setup({ - colon = { - indent_raw = false, - }, - lists = { - yaml = { - "[-]", - }, - ["yaml.ansible"] = { - "[-]", - }, - org = { - "-", - list_patterns.digit, - list_patterns.ascii - }, - markdown = { - list_patterns.unordered, - list_patterns.digit, - list_patterns.ascii, - list_patterns.roman, - ">", - }, - }, - }) - local autolist_group = vim.api.nvim_create_augroup("Autolist", {}) - vim.api.nvim_create_autocmd("filetype", { - group = autolist_group, - pattern = { - "markdown", - "text", - "tex", - "plaintex", - "norg", - "yaml", - "yaml.ansible", - }, - callback = function() - if pcall(require, "autolist") then - vim.keymap.set( - "i", - "", - "AutolistTab", - { silent = true, desc = "Autolist: Tab", buffer = true } - ) - vim.keymap.set( - "i", - "", - "AutolistShiftTab", - { silent = true, desc = "Autolist: Shift Tab", buffer = true } - ) - vim.keymap.set( - "i", - "", - "AutolistNewBullet", - { silent = true, desc = "Autolist: New Bullet", buffer = true } - ) - vim.keymap.set( - "n", - "o", - "oAutolistNewBullet", - { silent = true, desc = "Autolist: New Bullet", buffer = true } - ) - vim.keymap.set( - "n", - "O", - "OAutolistNewBulletBefore", - { silent = true, desc = "Autolist: New Bullet Before", buffer = true } - ) - vim.keymap.set( - "n", - "", - "AutolistToggleCheckbox", - { silent = true, desc = "Autolist: Toggle Checkbox", buffer = true } - ) - - -- functions to recalculate list on edit - vim.keymap.set( - "n", - ">>", - ">>AutolistRecalculate", - { silent = true, desc = "Autolist: Indent", buffer = true } - ) - vim.keymap.set( - "n", - "<<", - "<<AutolistRecalculate", - { silent = true, desc = "Autolist: Dedent", buffer = true } - ) - vim.keymap.set( - "n", - "dd", - "ddAutolistRecalculate", - { silent = true, desc = "Autolist: Delete", buffer = true } - ) - vim.keymap.set( - "v", - "d", - "dAutolistRecalculate", - { silent = true, desc = "Autolist: Delete", buffer = true } - ) - end - end, - }) - end, - }, -}