From 2e7e1ce219b43bb74f67875200dd4b68758ffd27 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 16 Jul 2024 19:04:27 -0400 Subject: back to nixvim again --- nixvim/plugins/mini.nix | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 nixvim/plugins/mini.nix (limited to 'nixvim/plugins/mini.nix') diff --git a/nixvim/plugins/mini.nix b/nixvim/plugins/mini.nix new file mode 100644 index 0000000..0a83bcf --- /dev/null +++ b/nixvim/plugins/mini.nix @@ -0,0 +1,60 @@ +{ helpers, ... }: +{ + autoCmd = [ + # don't use mini.indentscope on some files + { + callback = helpers.mkRaw '' + function() + vim.b.miniindentscope_disable = true + end + ''; + event = "FileType"; + pattern = [ + "help" + "Trouble" + "toggleterm" + ]; + } + ]; + + keymaps = [ + # open mini.files + { + action = helpers.mkRaw '' + function() + local files = require("mini.files") + if not files.close() then + files.open() + end + end + ''; + + key = "t"; + mode = "n"; + options = { + noremap = true; + silent = true; + }; + } + ]; + + plugins.mini = { + enable = true; + + modules = { + files = { }; + + hipatterns = { + highlighters = { + hex_color = helpers.mkRaw "require('mini.hipatterns').gen_highlighter.hex_color()"; + }; + }; + + indentscope = { + options.try_as_border = false; + }; + + pairs = { }; + }; + }; +} -- cgit v1.2.3