From 7f8b1e586c77819ecd2ea00c37435d99b02b17e2 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 21 Apr 2024 02:00:39 -0400 Subject: [PATCH] feat(nvim): mini.map -> codewindow --- common/home/neovim/default.nix | 9 +++++++-- common/home/neovim/plugins/codewindow.lua | 6 ++++++ common/home/neovim/plugins/mini.lua | 14 -------------- common/home/neovim/plugins/neotree.vim | 1 - flake.lock | 6 +++--- 5 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 common/home/neovim/plugins/codewindow.lua diff --git a/common/home/neovim/default.nix b/common/home/neovim/default.nix index 1ad89cbf..2df430c9 100644 --- a/common/home/neovim/default.nix +++ b/common/home/neovim/default.nix @@ -203,6 +203,11 @@ in { type = "lua"; config = fileContents ./plugins/mini.lua; } + { + plugin = codewindow-nvim; + type = "lua"; + config = fileContents ./plugins/codewindow.lua; + } ] ++ optionals neovimIde [ markdown-preview-nvim @@ -264,11 +269,11 @@ in { src = vimplugin-riscv-src; }) { - plugin = (pkgs.vimUtils.buildVimPlugin { + plugin = pkgs.vimUtils.buildVimPlugin { name = "easytables-nvim"; version = vimplugin-easytables-src.shortRev; src = vimplugin-easytables-src; - }); + }; type = "lua"; config = ''require("easytables").setup();''; } diff --git a/common/home/neovim/plugins/codewindow.lua b/common/home/neovim/plugins/codewindow.lua new file mode 100644 index 00000000..d515f420 --- /dev/null +++ b/common/home/neovim/plugins/codewindow.lua @@ -0,0 +1,6 @@ +require('codewindow').setup({ + auto_enable = true, + minimap_width = 8, + relative = 'editor', + window_border = 'none', +}); diff --git a/common/home/neovim/plugins/mini.lua b/common/home/neovim/plugins/mini.lua index e3a6e38a..b0884625 100644 --- a/common/home/neovim/plugins/mini.lua +++ b/common/home/neovim/plugins/mini.lua @@ -1,17 +1,3 @@ -local map = require('mini.map') -map.setup({ - integrations = { - map.gen_integration.builtin_search(), - map.gen_integration.gitsigns(), - map.gen_integration.diagnostic(), - }, - window = { - focusable = false, - width = 7, - winblend = 75, - }, -}) - local ts_input = require('mini.surround').gen_spec.input.treesitter require('mini.surround').setup({ custom_surroundings = { diff --git a/common/home/neovim/plugins/neotree.vim b/common/home/neovim/plugins/neotree.vim index a02474b7..49b34ef6 100644 --- a/common/home/neovim/plugins/neotree.vim +++ b/common/home/neovim/plugins/neotree.vim @@ -5,7 +5,6 @@ function! OpenTree() abort Neotree close Neotree show endif - lua MiniMap.open() endfunction autocmd VimEnter * call OpenTree() diff --git a/flake.lock b/flake.lock index bd81d1c6..e69c9004 100644 --- a/flake.lock +++ b/flake.lock @@ -1575,11 +1575,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1713532771, - "narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=", + "lastModified": 1713668495, + "narHash": "sha256-4BvlfPfyUmB1U0r/oOF6jGEW/pG59c5yv6PJwgucTNM=", "owner": "Mic92", "repo": "sops-nix", - "rev": "a929a011a09db735abc45a8a45d1ff7fdee62755", + "rev": "09f1bc8ba3277c0f052f7887ec92721501541938", "type": "github" }, "original": {