From 56505a065f6d515fe97ed2e16b63ba49d10f2ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 19 Aug 2024 09:49:13 +0200 Subject: [PATCH] feat(nvim): add back zen-mode --- modules/programs/nvim/plugins/ui.nix | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/programs/nvim/plugins/ui.nix b/modules/programs/nvim/plugins/ui.nix index 96e28c2..70f5a04 100644 --- a/modules/programs/nvim/plugins/ui.nix +++ b/modules/programs/nvim/plugins/ui.nix @@ -42,5 +42,41 @@ with builtins; { plugin = nvim-treesitter; } ]; } + { + plugin = pkgs.vimPlugins.zen-mode-nvim; + keys = [ + { key = "tz"; cmd = "ZenMode"; desc = "Zen mode"; } + ]; + conf = /* lua */ '' + require("zen-mode").setup({ + plugins = { + tmux = { + enabled = true, + }, + }, + }) + ''; + dependencies = [ + { + plugin = pkgs.vimPlugins.twilight-nvim; + keys = [ + { key = "tZ"; cmd = "Twilight"; desc = "Twilight mode"; } + ]; + conf = /* lua */ '' + require("twilight").setup({ + context = 20, + expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types + "function", + "function_definition", + "if_statement", + "method", + "method_definition", + "table", + }, + }) + ''; + } + ]; + } ]; }