diff --git a/modules/plugins/completion/nvim-cmp/config.nix b/modules/plugins/completion/nvim-cmp/config.nix index 749ebb7c..ce058876 100644 --- a/modules/plugins/completion/nvim-cmp/config.nix +++ b/modules/plugins/completion/nvim-cmp/config.nix @@ -60,6 +60,12 @@ in { enableSharedCmpSources = true; nvim-cmp = { + sources = { + nvim-cmp = null; + buffer = "[Buffer]"; + path = "[Path]"; + }; + sourcePlugins = ["cmp-buffer" "cmp-path"]; setupOpts = { diff --git a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix index 2c8c77d3..0c790455 100644 --- a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix +++ b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix @@ -98,16 +98,14 @@ in { sources = mkOption { type = attrsOf (nullOr str); - default = { - nvim-cmp = null; - buffer = "[Buffer]"; - path = "[Path]"; - }; - example = { - nvim-cmp = null; - buffer = "[Buffer]"; - }; + default = {}; description = "The list of sources used by nvim-cmp"; + example = literalExpression '' + { + nvim-cmp = null; + buffer = "[Buffer]"; + } + ''; }; sourcePlugins = mkOption {