mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-03 20:22:21 +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
 | 
					- Add [nvim-biscuits] to show block context. Available at
 | 
				
			||||||
  `vim.utility.nvim-biscuits`.
 | 
					  `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
 | 
					}: let
 | 
				
			||||||
  inherit (lib.modules) mkIf;
 | 
					  inherit (lib.modules) mkIf;
 | 
				
			||||||
  inherit (lib.strings) optionalString;
 | 
					  inherit (lib.strings) optionalString;
 | 
				
			||||||
  inherit (lib.attrsets) optionalAttrs;
 | 
					 | 
				
			||||||
  inherit (lib.generators) mkLuaInline;
 | 
					  inherit (lib.generators) mkLuaInline;
 | 
				
			||||||
  inherit (lib.attrsets) attrValues filterAttrs mapAttrsToList;
 | 
					  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 (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;
 | 
					  cfg = config.vim.autocomplete.blink-cmp;
 | 
				
			||||||
  cmpCfg = config.vim.autocomplete.nvim-cmp;
 | 
					  cmpCfg = config.vim.autocomplete.nvim-cmp;
 | 
				
			||||||
| 
						 | 
					@ -56,7 +55,7 @@ in {
 | 
				
			||||||
        after =
 | 
					        after =
 | 
				
			||||||
          # lua
 | 
					          # lua
 | 
				
			||||||
          ''
 | 
					          ''
 | 
				
			||||||
            ${optionalString (config.vim.lazy.enable && cmpCfg.enable)
 | 
					            ${optionalString config.vim.lazy.enable
 | 
				
			||||||
              (concatStringsSep "\n" (map
 | 
					              (concatStringsSep "\n" (map
 | 
				
			||||||
                (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})")
 | 
					                (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})")
 | 
				
			||||||
                cmpCfg.sourcePlugins))}
 | 
					                cmpCfg.sourcePlugins))}
 | 
				
			||||||
| 
						 | 
					@ -67,10 +66,7 @@ in {
 | 
				
			||||||
    autocomplete = {
 | 
					    autocomplete = {
 | 
				
			||||||
      enableSharedCmpSources = true;
 | 
					      enableSharedCmpSources = true;
 | 
				
			||||||
      blink-cmp.setupOpts = {
 | 
					      blink-cmp.setupOpts = {
 | 
				
			||||||
        sources = let
 | 
					        sources = {
 | 
				
			||||||
          # We do not want nvim-cmp compat sources overriding built-in blink sources
 | 
					 | 
				
			||||||
          filteredCmpSources = removeAttrs cmpCfg.sources blinkBuiltins;
 | 
					 | 
				
			||||||
        in {
 | 
					 | 
				
			||||||
          default =
 | 
					          default =
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
              "lsp"
 | 
					              "lsp"
 | 
				
			||||||
| 
						 | 
					@ -78,16 +74,14 @@ in {
 | 
				
			||||||
              "snippets"
 | 
					              "snippets"
 | 
				
			||||||
              "buffer"
 | 
					              "buffer"
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
            ++ optionals cmpCfg.enable (attrNames filteredCmpSources)
 | 
					            ++ (attrNames cmpCfg.sources)
 | 
				
			||||||
            ++ (attrNames enabledBlinkSources);
 | 
					            ++ (attrNames enabledBlinkSources);
 | 
				
			||||||
          providers =
 | 
					          providers =
 | 
				
			||||||
            optionalAttrs cmpCfg.enable (
 | 
					            mapAttrs (name: _: {
 | 
				
			||||||
              mapAttrs (name: _: {
 | 
					              inherit name;
 | 
				
			||||||
                inherit name;
 | 
					              module = "blink.compat.source";
 | 
				
			||||||
                module = "blink.compat.source";
 | 
					            })
 | 
				
			||||||
              })
 | 
					            cmpCfg.sources
 | 
				
			||||||
              filteredCmpSources
 | 
					 | 
				
			||||||
            )
 | 
					 | 
				
			||||||
            // (mapAttrs (name: definition: {
 | 
					            // (mapAttrs (name: definition: {
 | 
				
			||||||
                inherit name;
 | 
					                inherit name;
 | 
				
			||||||
                inherit (definition) module;
 | 
					                inherit (definition) module;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue