mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-02 20:06:36 +00:00
Compare commits
No commits in common. "d61de135ce174f4e04b4e509de02e1afe040a834" and "22fb0d22cc474e85f94c5aa95b6c550c81ca7278" have entirely different histories.
d61de135ce
...
22fb0d22cc
2 changed files with 10 additions and 22 deletions
|
|
@ -486,9 +486,3 @@
|
|||
|
||||
- Add [nvim-biscuits] to show block context. Available at
|
||||
`vim.utility.nvim-biscuits`.
|
||||
|
||||
[JManch](https://github.com/JManch):
|
||||
|
||||
- Fix default [blink.cmp] sources "path" and "buffer" not working when
|
||||
`autocomplete.nvim-cmp.enable` was disabled and
|
||||
`autocomplete.nvim-cmp.sources` had not been modified.
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.attrsets) optionalAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.attrsets) attrValues filterAttrs mapAttrsToList;
|
||||
inherit (lib.lists) map optional optionals elem;
|
||||
inherit (lib.lists) map optional elem;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs removeAttrs;
|
||||
inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs;
|
||||
|
||||
cfg = config.vim.autocomplete.blink-cmp;
|
||||
cmpCfg = config.vim.autocomplete.nvim-cmp;
|
||||
|
|
@ -56,7 +55,7 @@ in {
|
|||
after =
|
||||
# lua
|
||||
''
|
||||
${optionalString (config.vim.lazy.enable && cmpCfg.enable)
|
||||
${optionalString config.vim.lazy.enable
|
||||
(concatStringsSep "\n" (map
|
||||
(package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})")
|
||||
cmpCfg.sourcePlugins))}
|
||||
|
|
@ -67,10 +66,7 @@ in {
|
|||
autocomplete = {
|
||||
enableSharedCmpSources = true;
|
||||
blink-cmp.setupOpts = {
|
||||
sources = let
|
||||
# We do not want nvim-cmp compat sources overriding built-in blink sources
|
||||
filteredCmpSources = removeAttrs cmpCfg.sources blinkBuiltins;
|
||||
in {
|
||||
sources = {
|
||||
default =
|
||||
[
|
||||
"lsp"
|
||||
|
|
@ -78,16 +74,14 @@ in {
|
|||
"snippets"
|
||||
"buffer"
|
||||
]
|
||||
++ optionals cmpCfg.enable (attrNames filteredCmpSources)
|
||||
++ (attrNames cmpCfg.sources)
|
||||
++ (attrNames enabledBlinkSources);
|
||||
providers =
|
||||
optionalAttrs cmpCfg.enable (
|
||||
mapAttrs (name: _: {
|
||||
inherit name;
|
||||
module = "blink.compat.source";
|
||||
})
|
||||
filteredCmpSources
|
||||
)
|
||||
mapAttrs (name: _: {
|
||||
inherit name;
|
||||
module = "blink.compat.source";
|
||||
})
|
||||
cmpCfg.sources
|
||||
// (mapAttrs (name: definition: {
|
||||
inherit name;
|
||||
inherit (definition) module;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue