diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3ceef93f..3a09171b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -47,12 +47,6 @@ - Add Haskell support under `vim.languages.haskell` using [haskell-tools.nvim]. -[horriblename](https://github.com/horriblename): - -[blink.cmp]: https://github.com/saghen/blink.cmp - -- Add [blink.cmp] support - [diniamo](https://github.com/diniamo): - Add Odin support under `vim.languages.odin`. diff --git a/flake.lock b/flake.lock index 457ec862..8e5a40d7 100644 --- a/flake.lock +++ b/flake.lock @@ -167,38 +167,6 @@ "type": "github" } }, - "plugin-blink-cmp": { - "flake": false, - "locked": { - "lastModified": 1736295934, - "narHash": "sha256-MfHI4efAdaoCU8si6YFdznZmSTprthDq3YKuF91z7ss=", - "owner": "saghen", - "repo": "blink.cmp", - "rev": "1cc3b1a908fbcfd15451c4772759549724f38524", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.cmp", - "type": "github" - } - }, - "plugin-blink-compat": { - "flake": false, - "locked": { - "lastModified": 1734896240, - "narHash": "sha256-Rrrh+O3FbBnaAnCHwPuQyfhH+XueSkQp6ipEkn6esGY=", - "owner": "saghen", - "repo": "blink.compat", - "rev": "74b251a1e9478c4fa6d7c6bc2921d7124e6f6cbb", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.compat", - "type": "github" - } - }, "plugin-bufdelete-nvim": { "flake": false, "locked": { @@ -2820,8 +2788,6 @@ "plugin-aerial-nvim": "plugin-aerial-nvim", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-base16": "plugin-base16", - "plugin-blink-cmp": "plugin-blink-cmp", - "plugin-blink-compat": "plugin-blink-compat", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", "plugin-catppuccin": "plugin-catppuccin", "plugin-ccc": "plugin-ccc", diff --git a/flake.nix b/flake.nix index 57b92e2f..a9d158a3 100644 --- a/flake.nix +++ b/flake.nix @@ -294,16 +294,6 @@ flake = false; }; - plugin-blink-cmp = { - url = "github:saghen/blink.cmp"; - flake = false; - }; - - plugin-blink-compat = { - url = "github:saghen/blink.compat"; - flake = false; - }; - plugin-nvim-cmp = { url = "github:hrsh7th/nvim-cmp"; flake = false; diff --git a/flake/legacyPackages.nix b/flake/legacyPackages.nix index 5b6ccb6d..b77d057a 100644 --- a/flake/legacyPackages.nix +++ b/flake/legacyPackages.nix @@ -9,14 +9,10 @@ overlays = [ inputs.self.overlays.default - (final: _: { + (_: _: { # Build nil from source to get most recent # features as they are added. nil = inputs'.nil.packages.default; - blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix { - src = inputs.plugin-blink-cmp; - version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty"; - }; }) ]; }; diff --git a/flake/legacyPackages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix deleted file mode 100644 index 002269b9..00000000 --- a/flake/legacyPackages/blink-cmp.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - rustPlatform, - hostPlatform, - vimUtils, - git, - src, - version, -}: let - blink-fuzzy-lib = rustPlatform.buildRustPackage { - pname = "blink-fuzzy-lib"; - inherit version src; - - env = { - # TODO: remove this if plugin stops using nightly rust - RUSTC_BOOTSTRAP = true; - }; - nativeBuildInputs = [git]; - cargoLock = { - lockFile = "${src}/Cargo.lock"; - allowBuiltinFetchGit = true; - }; - }; - libExt = - if hostPlatform.isDarwin - then "dylib" - else "so"; -in - vimUtils.buildVimPlugin { - pname = "blink-cmp"; - inherit version src; - - # blink references a repro.lua which is placed outside the lua/ directory - doCheck = false; - preInstall = '' - mkdir -p target/release - ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt} - ''; - } diff --git a/flake/overlays.nix b/flake/overlays.nix index 5d0ff6e8..1381e7ba 100644 --- a/flake/overlays.nix +++ b/flake/overlays.nix @@ -10,10 +10,10 @@ nixConfig = import ../configuration.nix false; maximalConfig = import ../configuration.nix true; in { - flake.overlays.default = final: _prev: { + flake.overlays.default = _final: prev: { inherit neovimConfiguration; - neovim-nix = buildPkg final [nixConfig]; - neovim-maximal = buildPkg final [maximalConfig]; + neovim-nix = buildPkg prev [nixConfig]; + neovim-maximal = buildPkg prev [maximalConfig]; devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}]; }; } diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix deleted file mode 100644 index e56ac4cc..00000000 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ /dev/null @@ -1,120 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkEnableOption mkOption literalMD; - inherit (lib.types) listOf str either attrsOf submodule enum anything int nullOr; - inherit (lib.generators) mkLuaInline; - inherit (lib.nvim.types) mkPluginSetupOption luaInline; - inherit (lib.nvim.binds) mkMappingOption; - inherit (lib.nvim.config) mkBool; - - keymapType = submodule { - freeformType = attrsOf (listOf (either str luaInline)); - options = { - preset = mkOption { - type = enum ["default" "none" "super-tab" "enter"]; - default = "none"; - description = "keymap presets"; - }; - }; - }; - - providerType = submodule { - freeformType = anything; - options = { - module = mkOption { - type = str; - description = "module of the provider"; - }; - }; - }; -in { - options.vim.autocomplete.blink-cmp = { - enable = mkEnableOption "blink.cmp"; - setupOpts = mkPluginSetupOption "blink.cmp" { - sources = { - default = mkOption { - type = listOf str; - default = ["lsp" "path" "snippets" "buffer"]; - description = "Default list of sources to enable for completion."; - }; - - cmdline = mkOption { - type = nullOr (listOf str); - default = []; - description = "List of sources to enable for cmdline. Null means use default source list."; - }; - - providers = mkOption { - type = attrsOf providerType; - default = {}; - description = "Settings for completion providers"; - }; - - transform_items = mkOption { - type = nullOr luaInline; - default = mkLuaInline "function(_, items) return items end"; - defaultText = '' - Our default does nothing. If you want blink.cmp's default, which - lowers the score for snippets, set this option to null. - ''; - description = '' - Function to use when transforming the items before they're returned - for all providers. - ''; - }; - }; - - completion = { - documentation = { - auto_show = mkBool true "Show documentation whenever an item is selected"; - auto_show_delay_ms = mkOption { - type = int; - default = 200; - description = "Delay before auto show triggers"; - }; - }; - }; - - keymap = mkOption { - type = keymapType; - default = {}; - description = "blink.cmp keymap"; - example = literalMD '' - ```nix - vim.autocomplete.blink-cmp.setupOpts.keymap = { - preset = "none"; - - "" = ["select_prev" "fallback"]; - "" = [ - (lib.generators.mkLuaInline '''' - function(cmp) - if some_condition then return end -- runs the next command - return true -- doesn't run the next command - end, - '''') - "select_next" - ]; - }; - ``` - ''; - }; - - fuzzy = { - prebuilt_binaries = { - download = mkBool false '' - Auto-downloads prebuilt binaries. Do not enable, it doesn't work on nix - ''; - }; - }; - }; - - mappings = { - complete = mkMappingOption "Complete [blink.cmp]" ""; - confirm = mkMappingOption "Confirm [blink.cmp]" ""; - next = mkMappingOption "Next item [blink.cmp]" ""; - previous = mkMappingOption "Previous item [blink.cmp]" ""; - close = mkMappingOption "Close [blink.cmp]" ""; - scrollDocsUp = mkMappingOption "Scroll docs up [blink.cmp]" ""; - scrollDocsDown = mkMappingOption "Scroll docs down [blink.cmp]" ""; - }; - }; -} diff --git a/modules/plugins/completion/blink-cmp/config.nix b/modules/plugins/completion/blink-cmp/config.nix deleted file mode 100644 index 914821f9..00000000 --- a/modules/plugins/completion/blink-cmp/config.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib.modules) mkIf; - inherit (lib.strings) optionalString; - inherit (lib.generators) mkLuaInline; - inherit (lib.nvim.lua) toLuaObject; - inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs; - - cfg = config.vim.autocomplete.blink-cmp; - cmpCfg = config.vim.autocomplete.nvim-cmp; - inherit (cfg) mappings; - - getPluginName = plugin: - if typeOf plugin == "string" - then plugin - else if (plugin ? pname && (tryEval plugin.pname).success) - then plugin.pname - else plugin.name; -in { - vim = mkIf cfg.enable { - startPlugins = ["blink-compat"]; - lazy.plugins = { - blink-cmp = { - package = "blink-cmp"; - setupModule = "blink.cmp"; - inherit (cfg) setupOpts; - - # TODO: lazy disabled until lspconfig is lazy loaded - # - # event = ["InsertEnter" "CmdlineEnter"]; - - after = '' - ${optionalString config.vim.lazy.enable - (concatStringsSep "\n" (map - (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})") - cmpCfg.sourcePlugins))} - ''; - }; - }; - - autocomplete = { - enableSharedCmpSources = true; - blink-cmp.setupOpts = { - sources = { - default = ["lsp" "path" "snippets" "buffer"] ++ (attrNames cmpCfg.sources); - providers = - mapAttrs (name: _: { - inherit name; - module = "blink.compat.source"; - }) - cmpCfg.sources; - }; - snippets = mkIf config.vim.snippets.luasnip.enable { - preset = "luasnip"; - }; - - keymap = { - ${mappings.complete} = ["show" "fallback"]; - ${mappings.close} = ["hide" "fallback"]; - ${mappings.scrollDocsUp} = ["scroll_documentation_up" "fallback"]; - ${mappings.scrollDocsDown} = ["scroll_documentation_down" "fallback"]; - ${mappings.confirm} = ["accept" "fallback"]; - - ${mappings.next} = [ - "select_next" - "snippet_forward" - (mkLuaInline '' - function(cmp) - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - has_words_before = col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil - - if has_words_before then - return cmp.show() - end - end - '') - "fallback" - ]; - ${mappings.previous} = [ - "select_prev" - "snippet_backward" - "fallback" - ]; - }; - }; - }; - }; -} diff --git a/modules/plugins/completion/blink-cmp/default.nix b/modules/plugins/completion/blink-cmp/default.nix deleted file mode 100644 index 3e2d7e6b..00000000 --- a/modules/plugins/completion/blink-cmp/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./blink-cmp.nix - ./config.nix - ]; -} diff --git a/modules/plugins/completion/config.nix b/modules/plugins/completion/config.nix deleted file mode 100644 index 8fc09201..00000000 --- a/modules/plugins/completion/config.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib.modules) mkIf; - inherit (lib.nvim.attrsets) mapListToAttrs; - inherit (builtins) typeOf tryEval; - - cfg = config.vim.autocomplete; - getPluginName = plugin: - if typeOf plugin == "string" - then plugin - else if (plugin ? pname && (tryEval plugin.pname).success) - then plugin.pname - else plugin.name; -in { - config.vim = mkIf cfg.enableSharedCmpSources { - startPlugins = ["rtp-nvim"]; - lazy.plugins = - mapListToAttrs (package: { - name = getPluginName package; - value = { - inherit package; - lazy = true; - after = '' - local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/${getPluginName package}') - require("rtp_nvim").source_after_plugin_dir(path) - ''; - }; - }) - cfg.nvim-cmp.sourcePlugins; - }; -} diff --git a/modules/plugins/completion/default.nix b/modules/plugins/completion/default.nix index bf737580..0cae45f6 100644 --- a/modules/plugins/completion/default.nix +++ b/modules/plugins/completion/default.nix @@ -1,9 +1,5 @@ { imports = [ - ./module.nix - ./config.nix - ./nvim-cmp - ./blink-cmp ]; } diff --git a/modules/plugins/completion/module.nix b/modules/plugins/completion/module.nix deleted file mode 100644 index eb2a32f1..00000000 --- a/modules/plugins/completion/module.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkEnableOption; -in { - options.vim.autocomplete = { - enableSharedCmpSources = mkEnableOption "sources shared by blink.cmp and nvim-cmp"; - }; -} diff --git a/modules/plugins/completion/nvim-cmp/config.nix b/modules/plugins/completion/nvim-cmp/config.nix index ce058876..cfd3e53a 100644 --- a/modules/plugins/completion/nvim-cmp/config.nix +++ b/modules/plugins/completion/nvim-cmp/config.nix @@ -24,103 +24,114 @@ in { config = mkIf cfg.enable { vim = { - lazy.plugins = { - nvim-cmp = { - package = "nvim-cmp"; - after = '' - ${optionalString luasnipEnable "local luasnip = require('luasnip')"} - local cmp = require("cmp") + startPlugins = ["rtp-nvim"]; + lazy.plugins = mkMerge [ + (mapListToAttrs (package: { + name = getPluginName package; + value = { + inherit package; + lazy = true; + after = '' + local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/${getPluginName package}') + require("rtp_nvim").source_after_plugin_dir(path) + ''; + }; + }) + cfg.sourcePlugins) + { + nvim-cmp = { + package = "nvim-cmp"; + after = '' + ${optionalString luasnipEnable "local luasnip = require('luasnip')"} + local cmp = require("cmp") - local kinds = require("cmp.types").lsp.CompletionItemKind - local deprio = function(kind) - return function(e1, e2) - if e1:get_kind() == kind then - return false + local kinds = require("cmp.types").lsp.CompletionItemKind + local deprio = function(kind) + return function(e1, e2) + if e1:get_kind() == kind then + return false + end + if e2:get_kind() == kind then + return true + end + return nil end - if e2:get_kind() == kind then - return true - end - return nil end - end - cmp.setup(${toLuaObject cfg.setupOpts}) + cmp.setup(${toLuaObject cfg.setupOpts}) - ${optionalString config.vim.lazy.enable - (concatStringsSep "\n" (map - (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})") - cfg.sourcePlugins))} - ''; + ${optionalString config.vim.lazy.enable + (concatStringsSep "\n" (map + (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})") + cfg.sourcePlugins))} + ''; - event = ["InsertEnter" "CmdlineEnter"]; + event = ["InsertEnter" "CmdlineEnter"]; + }; + } + ]; + + autocomplete.nvim-cmp = { + sources = { + nvim-cmp = null; + buffer = "[Buffer]"; + path = "[Path]"; }; - }; - autocomplete = { - enableSharedCmpSources = true; + sourcePlugins = ["cmp-buffer" "cmp-path"]; - nvim-cmp = { - sources = { - nvim-cmp = null; - buffer = "[Buffer]"; - path = "[Path]"; + setupOpts = { + sources = map (s: {name = s;}) (attrNames cfg.sources); + + window = mkIf borders.enable { + completion.border = borders.style; + documentation.border = borders.style; }; - sourcePlugins = ["cmp-buffer" "cmp-path"]; + formatting.format = cfg.format; - setupOpts = { - sources = map (s: {name = s;}) (attrNames cfg.sources); + # `cmp` and `luasnip` are defined above, in the `nvim-cmp` section + mapping = { + ${mappings.complete} = mkLuaInline "cmp.mapping.complete()"; + ${mappings.close} = mkLuaInline "cmp.mapping.abort()"; + ${mappings.scrollDocsUp} = mkLuaInline "cmp.mapping.scroll_docs(-4)"; + ${mappings.scrollDocsDown} = mkLuaInline "cmp.mapping.scroll_docs(4)"; + ${mappings.confirm} = mkLuaInline "cmp.mapping.confirm({ select = true })"; - window = mkIf borders.enable { - completion.border = borders.style; - documentation.border = borders.style; - }; + ${mappings.next} = mkLuaInline '' + cmp.mapping(function(fallback) + local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end - formatting.format = cfg.format; + if cmp.visible() then + cmp.select_next_item() + ${optionalString luasnipEnable '' + elseif luasnip.locally_jumpable(1) then + luasnip.jump(1) + ''} + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end) + ''; - # `cmp` and `luasnip` are defined above, in the `nvim-cmp` section - mapping = { - ${mappings.complete} = mkLuaInline "cmp.mapping.complete()"; - ${mappings.close} = mkLuaInline "cmp.mapping.abort()"; - ${mappings.scrollDocsUp} = mkLuaInline "cmp.mapping.scroll_docs(-4)"; - ${mappings.scrollDocsDown} = mkLuaInline "cmp.mapping.scroll_docs(4)"; - ${mappings.confirm} = mkLuaInline "cmp.mapping.confirm({ select = true })"; - - ${mappings.next} = mkLuaInline '' - cmp.mapping(function(fallback) - local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil - end - - if cmp.visible() then - cmp.select_next_item() - ${optionalString luasnipEnable '' - elseif luasnip.locally_jumpable(1) then - luasnip.jump(1) - ''} - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end) - ''; - - ${mappings.previous} = mkLuaInline '' - cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - ${optionalString luasnipEnable '' - elseif luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - ''} - else - fallback() - end - end) - ''; - }; + ${mappings.previous} = mkLuaInline '' + cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + ${optionalString luasnipEnable '' + elseif luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + ''} + else + fallback() + end + end) + ''; }; }; }; diff --git a/modules/plugins/lsp/config.nix b/modules/plugins/lsp/config.nix index 0fa16e47..e73a5387 100644 --- a/modules/plugins/lsp/config.nix +++ b/modules/plugins/lsp/config.nix @@ -11,7 +11,6 @@ cfg = config.vim.lsp; usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable; - usingBlinkCmp = config.vim.autocomplete.blink-cmp.enable; self = import ./module.nix {inherit config lib pkgs;}; mappingDefinitions = self.options.vim.lsp.mappings; @@ -23,7 +22,7 @@ in { config = mkIf cfg.enable { vim = { - autocomplete.nvim-cmp = mkIf usingNvimCmp { + autocomplete.nvim-cmp = { sources = {nvim_lsp = "[LSP]";}; sourcePlugins = ["cmp-nvim-lsp"]; }; @@ -171,10 +170,6 @@ in { }, } ''} - - ${optionalString usingBlinkCmp '' - capabilities = require('blink.cmp').get_lsp_capabilities() - ''} ''; }; }; diff --git a/modules/plugins/lsp/lsp-signature/config.nix b/modules/plugins/lsp/lsp-signature/config.nix index 535b2534..c9940534 100644 --- a/modules/plugins/lsp/lsp-signature/config.nix +++ b/modules/plugins/lsp/lsp-signature/config.nix @@ -10,16 +10,6 @@ cfg = config.vim.lsp; in { config = mkIf (cfg.enable && cfg.lspSignature.enable) { - assertions = [ - { - assertion = !config.vim.autocomplete.blink-cmp.enable; - message = '' - lsp-signature does not work with blink.cmp. Please use blink.cmp's builtin signature feature: - - vim.autocomplete.blink-cmp.setupOpts.signature.enabled = true; - ''; - } - ]; vim = { startPlugins = [ "lsp-signature" diff --git a/modules/plugins/lsp/lspkind/config.nix b/modules/plugins/lsp/lspkind/config.nix index abe14524..2ef20ff8 100644 --- a/modules/plugins/lsp/lspkind/config.nix +++ b/modules/plugins/lsp/lspkind/config.nix @@ -8,18 +8,16 @@ inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.lsp.lspkind; - usingCmp = config.vim.autocomplete.nvim-cmp.enable; - usingBlink = config.vim.autocomplete.blink-cmp.enable; in { config = mkIf cfg.enable { assertions = [ { - assertion = usingCmp || usingBlink; + assertion = config.vim.autocomplete.nvim-cmp.enable; message = '' While lspkind supports Neovim's native lsp upstream, using that over - nvim-cmp/blink.cmp isn't recommended, nor supported by nvf. + nvim-cmp isn't recommended, nor supported by nvf. - Please migrate to nvim-cmp/blink.cmp if you want to use lspkind. + Please migrate to nvim-cmp if you want to use lspkind. ''; } ]; @@ -28,19 +26,9 @@ in { startPlugins = ["lspkind"]; lsp.lspkind.setupOpts.before = config.vim.autocomplete.nvim-cmp.format; - autocomplete = { - nvim-cmp = mkIf usingCmp { - setupOpts.formatting.format = mkForce (mkLuaInline '' - require("lspkind").cmp_format(${toLuaObject cfg.setupOpts}) - ''); - }; - - blink-cmp = mkIf usingBlink { - setupOpts.appearance.kind_icons = mkLuaInline '' - require("lspkind").symbol_map - ''; - }; - }; + autocomplete.nvim-cmp.setupOpts.formatting.format = mkForce (mkLuaInline '' + require("lspkind").cmp_format(${toLuaObject cfg.setupOpts}) + ''); }; }; } diff --git a/modules/plugins/notes/obsidian/obsidian.nix b/modules/plugins/notes/obsidian/obsidian.nix index 17369b88..2da2127b 100644 --- a/modules/plugins/notes/obsidian/obsidian.nix +++ b/modules/plugins/notes/obsidian/obsidian.nix @@ -7,8 +7,6 @@ inherit (lib.types) bool str nullOr; inherit (lib.modules) mkRenamedOptionModule; inherit (lib.nvim.types) mkPluginSetupOption; - - autocompleteCfg = config.vim.autocomplete; in { imports = let renamedSetupOption = oldPath: newPath: @@ -44,7 +42,7 @@ in { # If using nvim-cmp, otherwise set to false type = bool; description = "If using nvim-cmp, otherwise set to false"; - default = autocompleteCfg.nvim-cmp.enable || autocompleteCfg.blink-cmp.enable; + default = config.vim.autocomplete.nvim-cmp.enable; }; }; }; diff --git a/modules/plugins/snippets/luasnip/config.nix b/modules/plugins/snippets/luasnip/config.nix index 11be37c1..b05f9f27 100644 --- a/modules/plugins/snippets/luasnip/config.nix +++ b/modules/plugins/snippets/luasnip/config.nix @@ -20,7 +20,7 @@ in { after = cfg.loaders; }; startPlugins = cfg.providers; - autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { + autocomplete.nvim-cmp = { sources = {luasnip = "[LuaSnip]";}; sourcePlugins = ["cmp-luasnip"]; }; diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index 14aba5e1..566a716e 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -20,8 +20,7 @@ in { vim = { startPlugins = ["nvim-treesitter"]; - # cmp-treesitter doesn't work on blink.cmp - autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { + autocomplete.nvim-cmp = { sources = {treesitter = "[Treesitter]";}; sourcePlugins = ["cmp-treesitter"]; }; diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 88745fb5..46d99b36 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -61,7 +61,6 @@ "flutter-tools.dev_tools" ]; }; - inherit (pkgs) blink-cmp; }; buildConfigPlugins = plugins: