From f5a6072bb527e9cc669f00f9ead878cbccf4ecd8 Mon Sep 17 00:00:00 2001 From: Leonhard Kost Date: Tue, 13 Oct 2026 15:30:44 +0200 Subject: [PATCH] feat(neovim): use blink for completion, auto-brackets and indent lines --- home-manager/base/nixvim/plugins/blink.nix | 12 ++++ home-manager/base/nixvim/plugins/cmp.nix | 66 ------------------- home-manager/base/nixvim/plugins/default.nix | 9 +-- .../base/nixvim/plugins/nvim-autopairs.nix | 9 --- 4 files changed, 13 insertions(+), 83 deletions(-) create mode 100644 home-manager/base/nixvim/plugins/blink.nix delete mode 100644 home-manager/base/nixvim/plugins/cmp.nix delete mode 100644 home-manager/base/nixvim/plugins/nvim-autopairs.nix diff --git a/home-manager/base/nixvim/plugins/blink.nix b/home-manager/base/nixvim/plugins/blink.nix new file mode 100644 index 0000000..9b3a6ad --- /dev/null +++ b/home-manager/base/nixvim/plugins/blink.nix @@ -0,0 +1,12 @@ +{ + programs.nixvim = { + plugins = { + blink-indent.enable = true; + blink-pairs.enable = true; + blink-cmp = { + enable = true; + settings.signature.enabled = true; + }; + }; + }; +} diff --git a/home-manager/base/nixvim/plugins/cmp.nix b/home-manager/base/nixvim/plugins/cmp.nix deleted file mode 100644 index a8dfa63..0000000 --- a/home-manager/base/nixvim/plugins/cmp.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - programs.nixvim = { - opts.completeopt = [ - "menu" - "menuone" - "noselect" - ]; - - plugins = { - lspkind.enable = true; - - cmp = { - enable = true; - - autoEnableSources = true; - - settings = { - snippet.expand = "function(args) vim.snippet.expand(args.body) end"; - - formatting.fields = [ - "abbr" - "icon" - "menu" - ]; - - mapping = { - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.close()"; - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping.complete()"; - "" = '' - cmp.mapping( - function() - if vim.snippet.active({ direction = 1 }) then - vim.snippet.jump(1) - end - end, - {'i', 's'} - ) - ''; - "" = '' - cmp.mapping( - function() - if vim.snippet.active({ direction = -1 }) then - vim.snippet.jump(-1) - end - end, - {'i', 's'} - ) - ''; - }; - - sources = [ - { name = "nvim_lsp"; } - { name = "nvim_lsp_signature_help"; } - { name = "path"; } - ]; - }; - }; - }; - }; -} diff --git a/home-manager/base/nixvim/plugins/default.nix b/home-manager/base/nixvim/plugins/default.nix index 5f7ce25..7a48b59 100644 --- a/home-manager/base/nixvim/plugins/default.nix +++ b/home-manager/base/nixvim/plugins/default.nix @@ -1,24 +1,17 @@ { pkgs, ... }: { imports = [ - ./cmp.nix + ./blink.nix ./dap.nix ./lsp.nix ./fmt.nix ./treesitter.nix ./telescope.nix ./lualine.nix - ./nvim-autopairs.nix ./which-key.nix ]; programs.nixvim = { - plugins = { - lz-n.enable = true; - indent-blankline.enable = true; - web-devicons.enable = true; - }; - extraPlugins = with pkgs.vimPlugins; [ vim-sleuth ]; diff --git a/home-manager/base/nixvim/plugins/nvim-autopairs.nix b/home-manager/base/nixvim/plugins/nvim-autopairs.nix deleted file mode 100644 index e272f5d..0000000 --- a/home-manager/base/nixvim/plugins/nvim-autopairs.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - programs.nixvim.plugins.nvim-autopairs = { - enable = true; - lazyLoad = { - enable = true; - settings.event = "InsertEnter"; - }; - }; -}