summaryrefslogtreecommitdiff
path: root/nixvim/plugins/mini.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixvim/plugins/mini.nix')
-rw-r--r--nixvim/plugins/mini.nix60
1 files changed, 60 insertions, 0 deletions
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 = "<leader>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 = { };
+ };
+ };
+}