added a few tools, including carapace completer.
This commit is contained in:
		
							parent
							
								
									cef27f07ce
								
							
						
					
					
						commit
						2069707238
					
				
					 6 changed files with 55 additions and 50 deletions
				
			
		
							
								
								
									
										18
									
								
								nix/home.nix
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								nix/home.nix
									
										
									
									
									
								
							| 
						 | 
					@ -14,6 +14,8 @@
 | 
				
			||||||
  home.packages = with pkgs; [
 | 
					  home.packages = with pkgs; [
 | 
				
			||||||
    zellij
 | 
					    zellij
 | 
				
			||||||
    sshfs
 | 
					    sshfs
 | 
				
			||||||
 | 
					    just
 | 
				
			||||||
 | 
					    espeak
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Home Manager is pretty good at managing dotfiles. The primary way to manage
 | 
					  # Home Manager is pretty good at managing dotfiles. The primary way to manage
 | 
				
			||||||
| 
						 | 
					@ -36,7 +38,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  home.shellAliases = {
 | 
					  home.shellAliases = {
 | 
				
			||||||
    say = "espeak -p 10 -s 150 -a 200";
 | 
					    say = "espeak -p 10 -s 150 -a 200";
 | 
				
			||||||
    tmux = "tmux -u";
 | 
					 | 
				
			||||||
    pdfmk = "latexmk -lualatex -pvc";
 | 
					    pdfmk = "latexmk -lualatex -pvc";
 | 
				
			||||||
    doc2pdf = "loffice --convert-to-pdf --headless *.docx";
 | 
					    doc2pdf = "loffice --convert-to-pdf --headless *.docx";
 | 
				
			||||||
    sshmnt = "sshfs -o idmap=user,compression=no,reconnect,follow_symlinks,dir_cache=yes,ServerAliveInterval=15";
 | 
					    sshmnt = "sshfs -o idmap=user,compression=no,reconnect,follow_symlinks,dir_cache=yes,ServerAliveInterval=15";
 | 
				
			||||||
| 
						 | 
					@ -50,11 +51,16 @@
 | 
				
			||||||
    ./nvim/nvim.nix
 | 
					    ./nvim/nvim.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  programs.yazi.enable = true;
 | 
					  programs = {
 | 
				
			||||||
 | 
					    yazi.enable = true;
 | 
				
			||||||
  programs.zoxide.enable = true;
 | 
					    zoxide.enable = true;
 | 
				
			||||||
 | 
					    fzf.enable = true;
 | 
				
			||||||
  programs.fzf.enable = true;
 | 
					    ripgrep.enable = true;
 | 
				
			||||||
 | 
					    bat.enable = true;
 | 
				
			||||||
 | 
					    tealdeer.enable = true;
 | 
				
			||||||
 | 
					    btop.enable = true;
 | 
				
			||||||
 | 
					    carapace.enable = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.ssh-agent.enable = true;
 | 
					  services.ssh-agent.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,3 @@ switch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bootstrap:
 | 
					bootstrap:
 | 
				
			||||||
    nix run --extra-experimental-features "nix-command flakes" --no-write-lock-file github:nix-community/home-manager/ -- --extra-experimental-features "nix-command flakes" --flake . switch
 | 
					    nix run --extra-experimental-features "nix-command flakes" --no-write-lock-file github:nix-community/home-manager/ -- --extra-experimental-features "nix-command flakes" --flake . switch
 | 
				
			||||||
 | 
					 | 
				
			||||||
check:
 | 
					 | 
				
			||||||
    home-manager --flake . build
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -136,24 +136,24 @@ let light_theme = {
 | 
				
			||||||
    shape_vardecl: purple
 | 
					    shape_vardecl: purple
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let fish_completer = {|spans|
 | 
					# let fish_completer = {|spans|
 | 
				
			||||||
    fish --command $'complete "--do-complete=($spans | str join " ")"'
 | 
					#     fish --command $'complete "--do-complete=($spans | str join " ")"'
 | 
				
			||||||
    | $"value(char tab)description(char newline)" + $in
 | 
					#     | $"value(char tab)description(char newline)" + $in
 | 
				
			||||||
    | from tsv --flexible --no-infer
 | 
					#     | from tsv --flexible --no-infer
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
let carapace_completer = {|spans: list<string>|
 | 
					# let carapace_completer = {|spans: list<string>|
 | 
				
			||||||
    carapace $spans.0 nushell ...$spans
 | 
					#     carapace $spans.0 nushell ...$spans
 | 
				
			||||||
    | from json
 | 
					#     | from json
 | 
				
			||||||
    | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
 | 
					#     | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
let zoxide_completer = {|spans|
 | 
					# let zoxide_completer = {|spans|
 | 
				
			||||||
    $spans | skip 1 | zoxide query -l $in | lines | where {|x| $x != $env.PWD}
 | 
					#     $spans | skip 1 | zoxide query -l $in | lines | where {|x| $x != $env.PWD}
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
# This completer will use carapace by default
 | 
					# # This completer will use carapace by default
 | 
				
			||||||
let external_completer = $fish_completer
 | 
					let external_completer = null
 | 
				
			||||||
# The default config record. This is where much of your global configuration is setup.
 | 
					# The default config record. This is where much of your global configuration is setup.
 | 
				
			||||||
$env.config = {
 | 
					$env.config = {
 | 
				
			||||||
    show_banner: true # true or false to enable or disable the welcome banner at startup
 | 
					    show_banner: true # true or false to enable or disable the welcome banner at startup
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,4 +17,5 @@
 | 
				
			||||||
  programs.yazi.enableNushellIntegration = true;
 | 
					  programs.yazi.enableNushellIntegration = true;
 | 
				
			||||||
  programs.zoxide.enableNushellIntegration = true;
 | 
					  programs.zoxide.enableNushellIntegration = true;
 | 
				
			||||||
  programs.starship.enableNushellIntegration = true;
 | 
					  programs.starship.enableNushellIntegration = true;
 | 
				
			||||||
 | 
					  programs.carapace.enableNushellIntegration = true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,32 +4,32 @@
 | 
				
			||||||
  ...
 | 
					  ...
 | 
				
			||||||
}: {
 | 
					}: {
 | 
				
			||||||
  programs.nixvim = {
 | 
					  programs.nixvim = {
 | 
				
			||||||
    plugins.lsp={
 | 
					    plugins.lsp = {
 | 
				
			||||||
      enable=true;
 | 
					      enable = true;
 | 
				
			||||||
      servers={
 | 
					      servers = {
 | 
				
			||||||
        bashls.enable=true;
 | 
					        bashls.enable = true;
 | 
				
			||||||
        clangd.enable=true;
 | 
					        clangd.enable = true;
 | 
				
			||||||
        lua-ls.enable=true;
 | 
					        lua-ls.enable = true;
 | 
				
			||||||
        nil_ls.enable=true;
 | 
					        nil_ls.enable = true;
 | 
				
			||||||
        nushell.enable=true;
 | 
					        nushell.enable = true;
 | 
				
			||||||
        pyright.enable=true;
 | 
					        pyright.enable = true;
 | 
				
			||||||
        ruff-lsp.enable=true;
 | 
					        ruff-lsp.enable = true;
 | 
				
			||||||
        rust-analyzer={
 | 
					        rust-analyzer = {
 | 
				
			||||||
          enable=true;
 | 
					          enable = true;
 | 
				
			||||||
          installCargo=true;
 | 
					          installCargo = true;
 | 
				
			||||||
          installRustc=true;
 | 
					          installRustc = true;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        texlab.enable=true;
 | 
					        texlab.enable = true;
 | 
				
			||||||
        typst-lsp.enable=true;
 | 
					        typst-lsp.enable = true;
 | 
				
			||||||
        taplo.enable=true;
 | 
					        taplo.enable = true;
 | 
				
			||||||
        yamlls.enable=true;
 | 
					        yamlls.enable = true;
 | 
				
			||||||
        marksman.enable=true;
 | 
					        marksman.enable = true;
 | 
				
			||||||
        jsonls.enable=true;
 | 
					        jsonls.enable = true;
 | 
				
			||||||
        hls.enable=true;
 | 
					        hls.enable = true;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    plugins.cmp.settings.sources=[
 | 
					    plugins.cmp.settings.sources = [
 | 
				
			||||||
      {name="nvim_lsp";}
 | 
					      {name = "nvim_lsp";}
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
    plugins.which-key.registrations = {
 | 
					    plugins.which-key.registrations = {
 | 
				
			||||||
      "<leader>l" = "+lsp";
 | 
					      "<leader>l" = "+lsp";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@
 | 
				
			||||||
  programs.fzf.enableZshIntegration = true;
 | 
					  programs.fzf.enableZshIntegration = true;
 | 
				
			||||||
  programs.zoxide.enableZshIntegration = true;
 | 
					  programs.zoxide.enableZshIntegration = true;
 | 
				
			||||||
  programs.yazi.enableZshIntegration = true;
 | 
					  programs.yazi.enableZshIntegration = true;
 | 
				
			||||||
 | 
					  programs.carapace.enableZshIntegration = true;
 | 
				
			||||||
  programs.zsh = {
 | 
					  programs.zsh = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    enableCompletion = true;
 | 
					    enableCompletion = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue