diff options
| author | 2024-08-07 20:02:19 +0200 | |
|---|---|---|
| committer | 2024-08-07 20:02:19 +0200 | |
| commit | 59f183e2fba2620032fcf456ba4629ec6d1d8c05 (patch) | |
| tree | c59fc4a38576e0ca9c769be8b6d1fc1ce4d8dc78 | |
| parent | nvim: move lsp into a single file (diff) | |
nvim: move mini plugin into a single file
Also, simplify the opts.
Since I no longer want to require a mini component for the config,
I don't have to wrap it in an fn.
Also, I should just do a `#{}` next time anyway.
| -rw-r--r-- | dot_config/nvim/.chezmoiremove | 3 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/mini.fnl | 19 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/mini/init.fnl | 20 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/mini/starter.fnl | 15 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/mini.lua | 8 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/mini/init.lua | 11 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/mini/starter.lua | 7 |
7 files changed, 30 insertions, 53 deletions
diff --git a/dot_config/nvim/.chezmoiremove b/dot_config/nvim/.chezmoiremove index cd3efb1..adfaaf8 100644 --- a/dot_config/nvim/.chezmoiremove +++ b/dot_config/nvim/.chezmoiremove @@ -9,3 +9,6 @@ lua/plugins/lsp/capabilities.lua fnl/plugins/lsp/ lua/plugins/lsp/ + +fnl/plugins/mini +lua/plugins/mini diff --git a/dot_config/nvim/fnl/plugins/mini.fnl b/dot_config/nvim/fnl/plugins/mini.fnl new file mode 100644 index 0000000..e339ce7 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/mini.fnl @@ -0,0 +1,19 @@ +(import-macros {:mixed-table · : recc} :toast.macros) +[(· :echasnovski/mini.nvim & + :version false + :config (fn [_ opts] + (each [k v (pairs opts)] + (recc (.. :mini. k) :setup v))) + :opts {:ai {} + :align {} + :basics {} + :bracketed {:indent {:options {:change_type :diff}}} + :comment {} + :completion {} + :cursorword {} + :indentscope {} + :move {} + :splitjoin {} + :statusline {} + :tabline {} + :trailspace {}})] diff --git a/dot_config/nvim/fnl/plugins/mini/init.fnl b/dot_config/nvim/fnl/plugins/mini/init.fnl deleted file mode 100644 index 53f7f22..0000000 --- a/dot_config/nvim/fnl/plugins/mini/init.fnl +++ /dev/null @@ -1,20 +0,0 @@ -(import-macros {:mixed-table · : recc} :toast.macros) -[(· :echasnovski/mini.nvim & - :version false - :config (fn [_ opts] - (each [k v (pairs opts)] - (recc (.. :mini. k) :setup v))) - :opts (fn [] {:ai {} - :align {} - :basics {} - :bracketed {:indent {:options {:change_type :diff}}} - :comment {} - :completion {} - :cursorword {} - :indentscope {} - :move {} - :splitjoin {} - ; :starter (require :plugins.mini.starter) - :statusline {} - :tabline {} - :trailspace {}}))] diff --git a/dot_config/nvim/fnl/plugins/mini/starter.fnl b/dot_config/nvim/fnl/plugins/mini/starter.fnl deleted file mode 100644 index 99d71f9..0000000 --- a/dot_config/nvim/fnl/plugins/mini/starter.fnl +++ /dev/null @@ -1,15 +0,0 @@ -(let [starter (require :mini.starter) - telescope [{:action "Telescope commands" - :name :Commands} - {:action "Telescope find_files" - :name :Files} - {:action "Telescope help_tags" - :name "Help tags"} - {:action "Telescope live_grep" - :name "Live grep"} - {:action "Telescope oldfiles" - :name "Old files"}]] - (each [_ v (ipairs telescope)] - (set v.section :Telescope)) - {:items [telescope - (starter.sections.builtin_actions)]}) diff --git a/dot_config/nvim/lua/plugins/mini.lua b/dot_config/nvim/lua/plugins/mini.lua new file mode 100644 index 0000000..cc358db --- /dev/null +++ b/dot_config/nvim/lua/plugins/mini.lua @@ -0,0 +1,8 @@ +-- [nfnl] Compiled from fnl/plugins/mini.fnl by https://github.com/Olical/nfnl, do not edit. +local function _1_(_, opts) + for k, v in pairs(opts) do + require(("mini." .. k)).setup(v) + end + return nil +end +return {{"echasnovski/mini.nvim", config = _1_, opts = {ai = {}, align = {}, basics = {}, bracketed = {indent = {options = {change_type = "diff"}}}, comment = {}, completion = {}, cursorword = {}, indentscope = {}, move = {}, splitjoin = {}, statusline = {}, tabline = {}, trailspace = {}}, version = false}} diff --git a/dot_config/nvim/lua/plugins/mini/init.lua b/dot_config/nvim/lua/plugins/mini/init.lua deleted file mode 100644 index d45951e..0000000 --- a/dot_config/nvim/lua/plugins/mini/init.lua +++ /dev/null @@ -1,11 +0,0 @@ --- [nfnl] Compiled from fnl/plugins/mini/init.fnl by https://github.com/Olical/nfnl, do not edit. -local function _1_(_, opts) - for k, v in pairs(opts) do - do end (require(("mini." .. k))).setup(v) - end - return nil -end -local function _2_() - return {ai = {}, align = {}, basics = {}, bracketed = {indent = {options = {change_type = "diff"}}}, comment = {}, completion = {}, cursorword = {}, indentscope = {}, move = {}, splitjoin = {}, statusline = {}, tabline = {}, trailspace = {}} -end -return {{"echasnovski/mini.nvim", config = _1_, opts = _2_, version = false}} diff --git a/dot_config/nvim/lua/plugins/mini/starter.lua b/dot_config/nvim/lua/plugins/mini/starter.lua deleted file mode 100644 index 4174894..0000000 --- a/dot_config/nvim/lua/plugins/mini/starter.lua +++ /dev/null @@ -1,7 +0,0 @@ --- [nfnl] Compiled from fnl/plugins/mini/starter.fnl by https://github.com/Olical/nfnl, do not edit. -local starter = require("mini.starter") -local telescope = {{action = "Telescope commands", name = "Commands"}, {action = "Telescope find_files", name = "Files"}, {action = "Telescope help_tags", name = "Help tags"}, {action = "Telescope live_grep", name = "Live grep"}, {action = "Telescope oldfiles", name = "Old files"}} -for _, v in ipairs(telescope) do - v.section = "Telescope" -end -return {items = {telescope, starter.sections.builtin_actions()}} |
