Ported config from nixvim.
Made some changes to taste along the way, though there are some still to come.
This commit is contained in:
		
							parent
							
								
									9a78fd2d53
								
							
						
					
					
						commit
						3bd72ab98f
					
				
					 13 changed files with 601 additions and 740 deletions
				
			
		
							
								
								
									
										5
									
								
								.editorconfig
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.editorconfig
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					root = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[*]
 | 
				
			||||||
 | 
					indent_size = 2
 | 
				
			||||||
 | 
					indent_style = space
 | 
				
			||||||
| 
						 | 
					@ -1 +0,0 @@
 | 
				
			||||||
vim.cmd([[hi LineNr guifg=#bb9af7]])
 | 
					 | 
				
			||||||
							
								
								
									
										453
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										453
									
								
								flake.nix
									
										
									
									
									
								
							| 
						 | 
					@ -1,66 +1,23 @@
 | 
				
			||||||
# Copyright (c) 2023 BirdeeHub
 | 
					# Copyright (c) 2023 BirdeeHub and Gabriel Venberg
 | 
				
			||||||
# Licensed under the MIT license
 | 
					# Licensed under the MIT license
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Welcome to the main example config of nixCats!
 | 
					 | 
				
			||||||
# there is a minimal flake the starter templates use
 | 
					 | 
				
			||||||
# within the nix directory without the nixpkgs input,
 | 
					 | 
				
			||||||
# but this one would work too!
 | 
					 | 
				
			||||||
# Every config based on nixCats is a full nixCats.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This example config doesnt use lazy.nvim, and
 | 
					 | 
				
			||||||
# it loads everything via nix.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# It has some useful tricks
 | 
					 | 
				
			||||||
# in it, especially for lsps, so if you have any questions,
 | 
					 | 
				
			||||||
# first look through the docs, and then here!
 | 
					 | 
				
			||||||
# It has examples of most of the things you would want to do
 | 
					 | 
				
			||||||
# in your main nvim configuration.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# If there is still not adequate info, ask in discussions
 | 
					 | 
				
			||||||
# on the nixCats repo (or open a PR to add the info to the help!)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  description = "A Lua-natic's neovim flake, with extra cats! nixCats!";
 | 
					  description = "Gabes neovim config, based on NixCats";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  inputs = {
 | 
					  inputs = {
 | 
				
			||||||
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
 | 
					    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
 | 
				
			||||||
    nixCats.url = "github:BirdeeHub/nixCats-nvim";
 | 
					    nixCats.url = "github:BirdeeHub/nixCats-nvim";
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # see :help nixCats.flake.inputs
 | 
					 | 
				
			||||||
    # If you want your plugin to be loaded by the standard overlay,
 | 
					 | 
				
			||||||
    # i.e. if it wasnt on nixpkgs, but doesnt have an extra build step.
 | 
					 | 
				
			||||||
    # Then you should name it "plugins-something"
 | 
					 | 
				
			||||||
    # If you wish to define a custom build step not handled by nixpkgs,
 | 
					 | 
				
			||||||
    # then you should name it in a different format, and deal with that in the
 | 
					 | 
				
			||||||
    # overlay defined for custom builds in the overlays directory.
 | 
					 | 
				
			||||||
    # for specific tags, branches and commits, see:
 | 
					 | 
				
			||||||
    # https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#examples
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # No longer fetched to avoid forcing people to import it, but this remains here as a tutorial.
 | 
					 | 
				
			||||||
    # How to import it into your config is shown farther down in the startupPlugins set.
 | 
					 | 
				
			||||||
    # You put it here like this, and then below you would use it with `pkgs.neovimPlugins.hlargs`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # "plugins-hlargs" = {
 | 
					 | 
				
			||||||
    #   url = "github:m-demare/hlargs.nvim";
 | 
					 | 
				
			||||||
    #   flake = false;
 | 
					 | 
				
			||||||
    # };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # neovim-nightly-overlay = {
 | 
					 | 
				
			||||||
    #   url = "github:nix-community/neovim-nightly-overlay";
 | 
					 | 
				
			||||||
    # };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # see :help nixCats.flake.outputs
 | 
					  # see :help nixCats.flake.outputs
 | 
				
			||||||
  outputs = { self, nixpkgs, ... }@inputs: let
 | 
					  outputs = {
 | 
				
			||||||
 | 
					    self,
 | 
				
			||||||
 | 
					    nixpkgs,
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					  } @ inputs: let
 | 
				
			||||||
    inherit (inputs.nixCats) utils;
 | 
					    inherit (inputs.nixCats) utils;
 | 
				
			||||||
    luaPath = ./.;
 | 
					    luaPath = ./.;
 | 
				
			||||||
    # this is flake-utils eachSystem
 | 
					    # this is flake-utils eachSystem
 | 
				
			||||||
    forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
 | 
					    forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
 | 
				
			||||||
    # the following extra_pkg_config contains any values
 | 
					 | 
				
			||||||
    # which you want to pass to the config set of nixpkgs
 | 
					 | 
				
			||||||
    # import nixpkgs { config = extra_pkg_config; inherit system; }
 | 
					 | 
				
			||||||
    # will not apply to module imports
 | 
					 | 
				
			||||||
    # as that will have your system values
 | 
					 | 
				
			||||||
    extra_pkg_config = {
 | 
					    extra_pkg_config = {
 | 
				
			||||||
      # allowUnfree = true;
 | 
					      # allowUnfree = true;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
| 
						 | 
					@ -74,26 +31,31 @@
 | 
				
			||||||
    # without fear.
 | 
					    # without fear.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # see :help nixCats.flake.outputs.overlays
 | 
					    # see :help nixCats.flake.outputs.overlays
 | 
				
			||||||
    dependencyOverlays = /* (import ./overlays inputs) ++ */ [
 | 
					    dependencyOverlays =
 | 
				
			||||||
 | 
					      /*
 | 
				
			||||||
 | 
					      (import ./overlays inputs) ++
 | 
				
			||||||
 | 
					      */
 | 
				
			||||||
 | 
					      [
 | 
				
			||||||
        # This overlay grabs all the inputs named in the format
 | 
					        # This overlay grabs all the inputs named in the format
 | 
				
			||||||
        # `plugins-<pluginName>`
 | 
					        # `plugins-<pluginName>`
 | 
				
			||||||
        # Once we add this overlay to our nixpkgs, we are able to
 | 
					        # Once we add this overlay to our nixpkgs, we are able to
 | 
				
			||||||
        # use `pkgs.neovimPlugins`, which is a set of our plugins.
 | 
					        # use `pkgs.neovimPlugins`, which is a set of our plugins.
 | 
				
			||||||
        (utils.standardPluginOverlay inputs)
 | 
					        (utils.standardPluginOverlay inputs)
 | 
				
			||||||
        # add any other flake overlays here.
 | 
					        # add any other flake overlays here.
 | 
				
			||||||
 | 
					 | 
				
			||||||
      # when other people mess up their overlays by wrapping them with system,
 | 
					 | 
				
			||||||
      # you may instead call this function on their overlay.
 | 
					 | 
				
			||||||
      # it will check if it has the system in the set, and if so return the desired overlay
 | 
					 | 
				
			||||||
      # (utils.fixSystemizedOverlay inputs.codeium.overlays
 | 
					 | 
				
			||||||
      #   (system: inputs.codeium.overlays.${system}.default)
 | 
					 | 
				
			||||||
      # )
 | 
					 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # see :help nixCats.flake.outputs.categories
 | 
					    # see :help nixCats.flake.outputs.categories
 | 
				
			||||||
    # and
 | 
					    # and
 | 
				
			||||||
    # :help nixCats.flake.outputs.categoryDefinitions.scheme
 | 
					    # :help nixCats.flake.outputs.categoryDefinitions.scheme
 | 
				
			||||||
    categoryDefinitions = { pkgs, settings, categories, extra, name, mkPlugin, ... }@packageDef: {
 | 
					    categoryDefinitions = {
 | 
				
			||||||
 | 
					      pkgs,
 | 
				
			||||||
 | 
					      settings,
 | 
				
			||||||
 | 
					      categories,
 | 
				
			||||||
 | 
					      extra,
 | 
				
			||||||
 | 
					      name,
 | 
				
			||||||
 | 
					      mkPlugin,
 | 
				
			||||||
 | 
					      ...
 | 
				
			||||||
 | 
					    } @ packageDef: {
 | 
				
			||||||
      # to define and use a new category, simply add a new list to a set here,
 | 
					      # to define and use a new category, simply add a new list to a set here,
 | 
				
			||||||
      # and later, you will include categoryname = true; in the set you
 | 
					      # and later, you will include categoryname = true; in the set you
 | 
				
			||||||
      # provide when you build the package using this builder function.
 | 
					      # provide when you build the package using this builder function.
 | 
				
			||||||
| 
						 | 
					@ -103,68 +65,85 @@
 | 
				
			||||||
      # this section is for dependencies that should be available
 | 
					      # this section is for dependencies that should be available
 | 
				
			||||||
      # at RUN TIME for plugins. Will be available to PATH within neovim terminal
 | 
					      # at RUN TIME for plugins. Will be available to PATH within neovim terminal
 | 
				
			||||||
      # this includes LSPs
 | 
					      # this includes LSPs
 | 
				
			||||||
      lspsAndRuntimeDeps = {
 | 
					      lspsAndRuntimeDeps = with pkgs; {
 | 
				
			||||||
        # some categories of stuff.
 | 
					        # some categories of stuff.
 | 
				
			||||||
        general = with pkgs; [
 | 
					        always = [
 | 
				
			||||||
          universal-ctags
 | 
					          universal-ctags
 | 
				
			||||||
          ripgrep
 | 
					          ripgrep
 | 
				
			||||||
          fd
 | 
					          fd
 | 
				
			||||||
 | 
					          fzf
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        # these names are arbitrary.
 | 
					        telescope = [
 | 
				
			||||||
        lint = with pkgs; [
 | 
					          zoxide
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        lsp = {
 | 
				
			||||||
 | 
					          rust = [
 | 
				
			||||||
 | 
					            rust-analyzer
 | 
				
			||||||
 | 
					            cargo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          lua = [
 | 
				
			||||||
 | 
					            lua-language-server
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          nix = [
 | 
				
			||||||
 | 
					            nix-doc
 | 
				
			||||||
 | 
					            nixd
 | 
				
			||||||
 | 
					            alejandra
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          python = [
 | 
				
			||||||
 | 
					            basedpyright
 | 
				
			||||||
 | 
					            ruff
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          C = [
 | 
				
			||||||
 | 
					            libclang
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
        # but you can choose which ones you want
 | 
					 | 
				
			||||||
        # per nvim package you export
 | 
					 | 
				
			||||||
        debug = with pkgs; {
 | 
					 | 
				
			||||||
          go = [ delve ];
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        go = with pkgs; [
 | 
					        format = [
 | 
				
			||||||
          gopls
 | 
					 | 
				
			||||||
          gotools
 | 
					 | 
				
			||||||
          go-tools
 | 
					 | 
				
			||||||
          gccgo
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        # and easily check if they are included in lua
 | 
					 | 
				
			||||||
        format = with pkgs; [
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
        neonixdev = {
 | 
					 | 
				
			||||||
          # also you can do this.
 | 
					 | 
				
			||||||
          inherit (pkgs) nix-doc lua-language-server nixd;
 | 
					 | 
				
			||||||
          # and each will be its own sub category
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # This is for plugins that will load at startup without using packadd:
 | 
					      # This is for plugins that will load at startup without using packadd:
 | 
				
			||||||
      startupPlugins = {
 | 
					      startupPlugins = with pkgs.vimPlugins; {
 | 
				
			||||||
        debug = with pkgs.vimPlugins; [
 | 
					 | 
				
			||||||
          nvim-nio
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
        general = with pkgs.vimPlugins; {
 | 
					 | 
				
			||||||
          # you can make subcategories!!!
 | 
					 | 
				
			||||||
          # (always isnt a special name, just the one I chose for this subcategory)
 | 
					 | 
				
			||||||
        always = [
 | 
					        always = [
 | 
				
			||||||
          lze
 | 
					          lze
 | 
				
			||||||
          lzextras
 | 
					          lzextras
 | 
				
			||||||
            vim-repeat
 | 
					 | 
				
			||||||
          plenary-nvim
 | 
					          plenary-nvim
 | 
				
			||||||
            nvim-notify
 | 
					 | 
				
			||||||
          ];
 | 
					 | 
				
			||||||
          extra = [
 | 
					 | 
				
			||||||
          oil-nvim
 | 
					          oil-nvim
 | 
				
			||||||
          nvim-web-devicons
 | 
					          nvim-web-devicons
 | 
				
			||||||
 | 
					          snacks-nvim
 | 
				
			||||||
 | 
					          nvim-numbertoggle
 | 
				
			||||||
 | 
					          lualine-nvim
 | 
				
			||||||
 | 
					          which-key-nvim
 | 
				
			||||||
 | 
					          todo-comments-nvim
 | 
				
			||||||
 | 
					          marks-nvim
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        lsp={
 | 
				
			||||||
 | 
					          rust = [
 | 
				
			||||||
 | 
					            rustaceanvim
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					        debug = [
 | 
				
			||||||
 | 
					          nvim-nio
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        treesitter = [
 | 
				
			||||||
 | 
					          comment-nvim
 | 
				
			||||||
 | 
					          rainbow-delimiters-nvim
 | 
				
			||||||
 | 
					          nvim-treesitter-context
 | 
				
			||||||
 | 
					          nvim-treesitter.withAllGrammars
 | 
				
			||||||
 | 
					          treesj
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
        # You can retreive information from the
 | 
					        # You can retreive information from the
 | 
				
			||||||
        # packageDefinitions of the package this was packaged with.
 | 
					        # packageDefinitions of the package this was packaged with.
 | 
				
			||||||
        # :help nixCats.flake.outputs.categoryDefinitions.scheme
 | 
					        # :help nixCats.flake.outputs.categoryDefinitions.scheme
 | 
				
			||||||
        themer = with pkgs.vimPlugins;
 | 
					        themer = with pkgs.vimPlugins; (
 | 
				
			||||||
          (builtins.getAttr (categories.colorscheme or "onedark") {
 | 
					          builtins.getAttr (categories.colorscheme or "gruvbox") {
 | 
				
			||||||
            # Theme switcher without creating a new category
 | 
					            # Theme switcher without creating a new category
 | 
				
			||||||
            "onedark" = onedark-nvim;
 | 
					            "onedark" = onedark-nvim;
 | 
				
			||||||
            "catppuccin" = catppuccin-nvim;
 | 
					            "catppuccin" = catppuccin-nvim;
 | 
				
			||||||
              "catppuccin-mocha" = catppuccin-nvim;
 | 
					 | 
				
			||||||
            "tokyonight" = tokyonight-nvim;
 | 
					            "tokyonight" = tokyonight-nvim;
 | 
				
			||||||
              "tokyonight-day" = tokyonight-nvim;
 | 
					            "nord" = nord-nvim;
 | 
				
			||||||
 | 
					            "gruvbox" = gruvbox-nvim;
 | 
				
			||||||
 | 
					            "solarized" = solarized-nvim;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        # This is obviously a fairly basic usecase for this, but still nice.
 | 
					        # This is obviously a fairly basic usecase for this, but still nice.
 | 
				
			||||||
| 
						 | 
					@ -175,127 +154,85 @@
 | 
				
			||||||
      # or a tool for organizing this like lze or lz.n!
 | 
					      # or a tool for organizing this like lze or lz.n!
 | 
				
			||||||
      # to get the name packadd expects, use the
 | 
					      # to get the name packadd expects, use the
 | 
				
			||||||
      # `:NixCats pawsible` command to see them all
 | 
					      # `:NixCats pawsible` command to see them all
 | 
				
			||||||
      optionalPlugins = {
 | 
					      optionalPlugins = with pkgs.vimPlugins; {
 | 
				
			||||||
        debug = with pkgs.vimPlugins; {
 | 
					        debug = {
 | 
				
			||||||
          # it is possible to add default values.
 | 
					 | 
				
			||||||
          # there is nothing special about the word "default"
 | 
					 | 
				
			||||||
          # but we have turned this subcategory into a default value
 | 
					 | 
				
			||||||
          # via the extraCats section at the bottom of categoryDefinitions.
 | 
					 | 
				
			||||||
          default = [
 | 
					          default = [
 | 
				
			||||||
            nvim-dap
 | 
					            nvim-dap
 | 
				
			||||||
            nvim-dap-ui
 | 
					            nvim-dap-ui
 | 
				
			||||||
            nvim-dap-virtual-text
 | 
					            nvim-dap-virtual-text
 | 
				
			||||||
 | 
					            telescope-dap-nvim
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
          go = [ nvim-dap-go ];
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        lint = with pkgs.vimPlugins; [
 | 
					        lint = [
 | 
				
			||||||
          nvim-lint
 | 
					          nvim-lint
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        format = with pkgs.vimPlugins; [
 | 
					        format = [
 | 
				
			||||||
          conform-nvim
 | 
					          conform-nvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        markdown = with pkgs.vimPlugins; [
 | 
					        markdown = [
 | 
				
			||||||
          markdown-preview-nvim
 | 
					          markdown-preview-nvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        neonixdev = with pkgs.vimPlugins; [
 | 
					        lsp = {
 | 
				
			||||||
 | 
					          default = [
 | 
				
			||||||
 | 
					            trouble-nvim
 | 
				
			||||||
 | 
					            lualine-lsp-progress
 | 
				
			||||||
 | 
					            nvim-lspconfig
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          zk = [
 | 
				
			||||||
 | 
					            zk-nvim
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          lua = [
 | 
				
			||||||
            lazydev-nvim
 | 
					            lazydev-nvim
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
        general = {
 | 
					        };
 | 
				
			||||||
          blink = with pkgs.vimPlugins; [
 | 
					        always = [
 | 
				
			||||||
 | 
					          gitsigns-nvim
 | 
				
			||||||
 | 
					          nvim-surround
 | 
				
			||||||
 | 
					          leap-nvim
 | 
				
			||||||
 | 
					          toggleterm-nvim
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        tree = [
 | 
				
			||||||
 | 
					          nvim-tree-lua
 | 
				
			||||||
 | 
					          fidget-nvim
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        completion = [
 | 
				
			||||||
          luasnip
 | 
					          luasnip
 | 
				
			||||||
 | 
					          friendly-snippets
 | 
				
			||||||
          cmp-cmdline
 | 
					          cmp-cmdline
 | 
				
			||||||
          blink-cmp
 | 
					          blink-cmp
 | 
				
			||||||
          blink-compat
 | 
					          blink-compat
 | 
				
			||||||
          colorful-menu-nvim
 | 
					          colorful-menu-nvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
          treesitter = with pkgs.vimPlugins; [
 | 
					        telescope = [
 | 
				
			||||||
            nvim-treesitter-textobjects
 | 
					 | 
				
			||||||
            nvim-treesitter.withAllGrammars
 | 
					 | 
				
			||||||
            # This is for if you only want some of the grammars
 | 
					 | 
				
			||||||
            # (nvim-treesitter.withPlugins (
 | 
					 | 
				
			||||||
            #   plugins: with plugins; [
 | 
					 | 
				
			||||||
            #     nix
 | 
					 | 
				
			||||||
            #     lua
 | 
					 | 
				
			||||||
            #   ]
 | 
					 | 
				
			||||||
            # ))
 | 
					 | 
				
			||||||
          ];
 | 
					 | 
				
			||||||
          telescope = with pkgs.vimPlugins; [
 | 
					 | 
				
			||||||
            telescope-fzf-native-nvim
 | 
					 | 
				
			||||||
          telescope-ui-select-nvim
 | 
					          telescope-ui-select-nvim
 | 
				
			||||||
          telescope-nvim
 | 
					          telescope-nvim
 | 
				
			||||||
 | 
					          telescope-zoxide
 | 
				
			||||||
 | 
					          telescope-file-browser-nvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
          always = with pkgs.vimPlugins; [
 | 
					        extra = [
 | 
				
			||||||
            nvim-lspconfig
 | 
					 | 
				
			||||||
            lualine-nvim
 | 
					 | 
				
			||||||
            gitsigns-nvim
 | 
					 | 
				
			||||||
            vim-sleuth
 | 
					 | 
				
			||||||
            vim-fugitive
 | 
					 | 
				
			||||||
            vim-rhubarb
 | 
					 | 
				
			||||||
            nvim-surround
 | 
					 | 
				
			||||||
          ];
 | 
					 | 
				
			||||||
          extra = with pkgs.vimPlugins; [
 | 
					 | 
				
			||||||
            fidget-nvim
 | 
					 | 
				
			||||||
            # lualine-lsp-progress
 | 
					 | 
				
			||||||
            which-key-nvim
 | 
					 | 
				
			||||||
            comment-nvim
 | 
					 | 
				
			||||||
            undotree
 | 
					 | 
				
			||||||
            indent-blankline-nvim
 | 
					 | 
				
			||||||
          vim-startuptime
 | 
					          vim-startuptime
 | 
				
			||||||
            # If it was included in your flake inputs as plugins-hlargs,
 | 
					 | 
				
			||||||
            # this would be how to add that plugin in your config.
 | 
					 | 
				
			||||||
            # pkgs.neovimPlugins.hlargs
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # shared libraries to be added to LD_LIBRARY_PATH
 | 
					      # shared libraries to be added to LD_LIBRARY_PATH
 | 
				
			||||||
      # variable available to nvim runtime
 | 
					      # variable available to nvim runtime
 | 
				
			||||||
      sharedLibraries = {
 | 
					      sharedLibraries = {
 | 
				
			||||||
        general = with pkgs; [ # <- this would be included if any of the subcategories of general are
 | 
					 | 
				
			||||||
          # libgit2
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # environmentVariables:
 | 
					      # environmentVariables:
 | 
				
			||||||
      # this section is for environmentVariables that should be available
 | 
					      # this section is for environmentVariables that should be available
 | 
				
			||||||
      # at RUN TIME for plugins. Will be available to path within neovim terminal
 | 
					      # at RUN TIME for plugins. Will be available to path within neovim terminal
 | 
				
			||||||
      environmentVariables = {
 | 
					      environmentVariables = {
 | 
				
			||||||
        test = {
 | 
					 | 
				
			||||||
          default = {
 | 
					 | 
				
			||||||
            CATTESTVARDEFAULT = "It worked!";
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
          subtest1 = {
 | 
					 | 
				
			||||||
            CATTESTVAR = "It worked!";
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
          subtest2 = {
 | 
					 | 
				
			||||||
            CATTESTVAR3 = "It didn't work!";
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # If you know what these are, you can provide custom ones by category here.
 | 
					      # If you know what these are, you can provide custom ones by category here.
 | 
				
			||||||
      # If you dont, check this link out:
 | 
					      # If you dont, check this link out:
 | 
				
			||||||
      # https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-wrapper.sh
 | 
					      # https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-wrapper.sh
 | 
				
			||||||
      extraWrapperArgs = {
 | 
					      extraWrapperArgs = {
 | 
				
			||||||
        test = [
 | 
					 | 
				
			||||||
          '' --set CATTESTVAR2 "It worked again!"''
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # lists of the functions you would have passed to
 | 
					 | 
				
			||||||
      # python.withPackages or lua.withPackages
 | 
					 | 
				
			||||||
      # do not forget to set `hosts.python3.enable` in package settings
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # get the path to this python environment
 | 
					 | 
				
			||||||
      # in your lua config via
 | 
					 | 
				
			||||||
      # vim.g.python3_host_prog
 | 
					 | 
				
			||||||
      # or run from nvim terminal via :!<packagename>-python3
 | 
					 | 
				
			||||||
      python3.libraries = {
 | 
					 | 
				
			||||||
        test = (_:[]);
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      # populates $LUA_PATH and $LUA_CPATH
 | 
					      # populates $LUA_PATH and $LUA_CPATH
 | 
				
			||||||
      extraLuaPackages = {
 | 
					      extraLuaPackages = {
 | 
				
			||||||
        general = [ (_:[]) ];
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # see :help nixCats.flake.outputs.categoryDefinitions.default_values
 | 
					      # see :help nixCats.flake.outputs.categoryDefinitions.default_values
 | 
				
			||||||
| 
						 | 
					@ -305,21 +242,17 @@
 | 
				
			||||||
      # The categories argument of this function is the FINAL value.
 | 
					      # The categories argument of this function is the FINAL value.
 | 
				
			||||||
      # You may use it in any of the other sets.
 | 
					      # You may use it in any of the other sets.
 | 
				
			||||||
      extraCats = {
 | 
					      extraCats = {
 | 
				
			||||||
        test = [
 | 
					 | 
				
			||||||
          [ "test" "default" ]
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
        debug = [
 | 
					        debug = [
 | 
				
			||||||
          ["debug" "default"]
 | 
					          ["debug" "default"]
 | 
				
			||||||
 | 
					          ["telescope"]
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
        go = [
 | 
					        lsp = [
 | 
				
			||||||
          [ "debug" "go" ] # yes it has to be a list of lists
 | 
					          ["lsp" "default"]
 | 
				
			||||||
 | 
					          ["telescope"]
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # packageDefinitions:
 | 
					    # packageDefinitions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Now build a package with specific categories from above
 | 
					    # Now build a package with specific categories from above
 | 
				
			||||||
| 
						 | 
					@ -333,124 +266,69 @@
 | 
				
			||||||
    packageDefinitions = {
 | 
					    packageDefinitions = {
 | 
				
			||||||
      # the name here is the name of the package
 | 
					      # the name here is the name of the package
 | 
				
			||||||
      # and also the default command name for it.
 | 
					      # and also the default command name for it.
 | 
				
			||||||
      nixCats = { pkgs, name, ... }@misc: {
 | 
					      nvim = {
 | 
				
			||||||
 | 
					        pkgs,
 | 
				
			||||||
 | 
					        name,
 | 
				
			||||||
 | 
					        ...
 | 
				
			||||||
 | 
					      } @ misc: {
 | 
				
			||||||
        # these also recieve our pkgs variable
 | 
					        # these also recieve our pkgs variable
 | 
				
			||||||
        # see :help nixCats.flake.outputs.packageDefinitions
 | 
					        # see :help nixCats.flake.outputs.packageDefinitions
 | 
				
			||||||
        settings = {
 | 
					        settings = {
 | 
				
			||||||
          suffix-path = true;
 | 
					          suffix-path = true;
 | 
				
			||||||
          suffix-LD = true;
 | 
					          suffix-LD = true;
 | 
				
			||||||
          # The name of the package, and the default launch name,
 | 
					 | 
				
			||||||
          # and the name of the .desktop file, is `nixCats`,
 | 
					 | 
				
			||||||
          # or, whatever you named the package definition in the packageDefinitions set.
 | 
					 | 
				
			||||||
          # WARNING: MAKE SURE THESE DONT CONFLICT WITH OTHER INSTALLED PACKAGES ON YOUR PATH
 | 
					          # WARNING: MAKE SURE THESE DONT CONFLICT WITH OTHER INSTALLED PACKAGES ON YOUR PATH
 | 
				
			||||||
          # That would result in a failed build, as nixos and home manager modules validate for collisions on your path
 | 
					          # That would result in a failed build, as nixos and home manager modules validate for collisions on your path
 | 
				
			||||||
          aliases = [ "vim" "vimcat" ];
 | 
					          aliases = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # explained below in the `regularCats` package's definition
 | 
					 | 
				
			||||||
          # OR see :help nixCats.flake.outputs.settings for all of the settings available
 | 
					 | 
				
			||||||
          wrapRc = true;
 | 
					          wrapRc = true;
 | 
				
			||||||
          configDirName = "nixCats-nvim";
 | 
					          configDirName = "nvim";
 | 
				
			||||||
          # neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
 | 
					 | 
				
			||||||
          hosts.python3.enable = true;
 | 
					 | 
				
			||||||
          hosts.node.enable = true;
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        # enable the categories you want from categoryDefinitions
 | 
					 | 
				
			||||||
        categories = {
 | 
					        categories = {
 | 
				
			||||||
 | 
					          always = true;
 | 
				
			||||||
 | 
					          treesitter = true;
 | 
				
			||||||
          markdown = true;
 | 
					          markdown = true;
 | 
				
			||||||
          general = true;
 | 
					          lsp = true;
 | 
				
			||||||
          lint = true;
 | 
					          completion = true;
 | 
				
			||||||
          format = true;
 | 
					          telescope = true;
 | 
				
			||||||
          neonixdev = true;
 | 
					          tree = true;
 | 
				
			||||||
          test = {
 | 
					          debug = true;
 | 
				
			||||||
            subtest1 = true;
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          # enabling this category will enable the go category,
 | 
					 | 
				
			||||||
          # and ALSO debug.go and debug.default due to our extraCats in categoryDefinitions.
 | 
					 | 
				
			||||||
          # go = true; # <- disabled but you could enable it with override or module on install
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          # this does not have an associated category of plugins, 
 | 
					 | 
				
			||||||
          # but lua can still check for it
 | 
					 | 
				
			||||||
          lspDebugMode = false;
 | 
					          lspDebugMode = false;
 | 
				
			||||||
          # you could also pass something else:
 | 
					 | 
				
			||||||
          # see :help nixCats
 | 
					 | 
				
			||||||
          themer = true;
 | 
					          themer = true;
 | 
				
			||||||
          colorscheme = "onedark";
 | 
					          colorscheme = "gruvbox";
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        extra = {
 | 
					        extra = {
 | 
				
			||||||
          # to keep the categories table from being filled with non category things that you want to pass
 | 
					 | 
				
			||||||
          # there is also an extra table you can use to pass extra stuff.
 | 
					 | 
				
			||||||
          # but you can pass all the same stuff in any of these sets and access it in lua
 | 
					 | 
				
			||||||
          nixdExtras = {
 | 
					 | 
				
			||||||
            nixpkgs = ''import ${pkgs.path} {}'';
 | 
					 | 
				
			||||||
            # or inherit nixpkgs;
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      };
 | 
					      nvim-minimal = {
 | 
				
			||||||
      regularCats = { pkgs, ... }@misc: {
 | 
					        pkgs,
 | 
				
			||||||
 | 
					        name,
 | 
				
			||||||
 | 
					        ...
 | 
				
			||||||
 | 
					      } @ misc: {
 | 
				
			||||||
        settings = {
 | 
					        settings = {
 | 
				
			||||||
          suffix-path = true;
 | 
					          suffix-path = true;
 | 
				
			||||||
          suffix-LD = true;
 | 
					          suffix-LD = true;
 | 
				
			||||||
          # IMPURE PACKAGE: normal config reload
 | 
					          # WARNING: MAKE SURE THESE DONT CONFLICT WITH OTHER INSTALLED PACKAGES ON YOUR PATH
 | 
				
			||||||
          # include same categories as main config,
 | 
					          # That would result in a failed build, as nixos and home manager modules validate for collisions on your path
 | 
				
			||||||
          # will load from vim.fn.stdpath('config')
 | 
					          aliases = ["vim"];
 | 
				
			||||||
          wrapRc = false;
 | 
					          wrapRc = true;
 | 
				
			||||||
          # or tell it some other place to load
 | 
					          configDirName = "nvim-minimal";
 | 
				
			||||||
          # unwrappedCfgPath = "/some/path/to/your/config";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          # configDirName: will now look for nixCats-nvim within .config and .local and others
 | 
					 | 
				
			||||||
          # this can be changed so that you can choose which ones share data folders for auths
 | 
					 | 
				
			||||||
          # :h $NVIM_APPNAME
 | 
					 | 
				
			||||||
          configDirName = "nixCats-nvim";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          aliases = [ "testCat" ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          # If you wanted nightly, uncomment this, and the flake input.
 | 
					 | 
				
			||||||
          # neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
 | 
					 | 
				
			||||||
          # Probably add the cache stuff they recommend too.
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        categories = {
 | 
					        categories = {
 | 
				
			||||||
          markdown = true;
 | 
					          always = true;
 | 
				
			||||||
          general = true;
 | 
					          treesitter = true;
 | 
				
			||||||
          neonixdev = true;
 | 
					          completion = true;
 | 
				
			||||||
          lint = true;
 | 
					          telescope = true;
 | 
				
			||||||
          format = true;
 | 
					          tree = true;
 | 
				
			||||||
          test = true;
 | 
					 | 
				
			||||||
          # go = true; # <- disabled but you could enable it with override or module on install
 | 
					 | 
				
			||||||
          lspDebugMode = false;
 | 
					          lspDebugMode = false;
 | 
				
			||||||
          themer = true;
 | 
					          themer = true;
 | 
				
			||||||
          colorscheme = "catppuccin";
 | 
					          colorscheme = "gruvbox";
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        extra = {
 | 
					        extra = {
 | 
				
			||||||
          # nixCats.extra("path.to.val") will perform vim.tbl_get(nixCats.extra, "path" "to" "val")
 | 
					 | 
				
			||||||
          # this is different from the main nixCats("path.to.cat") in that
 | 
					 | 
				
			||||||
          # the main nixCats("path.to.cat") will report true if `path.to = true`
 | 
					 | 
				
			||||||
          # even though path.to.cat would be an indexing error in that case.
 | 
					 | 
				
			||||||
          # this is to mimic the concept of "subcategories" but may get in the way of just fetching values.
 | 
					 | 
				
			||||||
          nixdExtras = {
 | 
					 | 
				
			||||||
            nixpkgs = ''import ${pkgs.path} {}'';
 | 
					 | 
				
			||||||
            # or inherit nixpkgs;
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
          # yes even tortured inputs work.
 | 
					 | 
				
			||||||
          theBestCat = "says meow!!";
 | 
					 | 
				
			||||||
          theWorstCat = {
 | 
					 | 
				
			||||||
            thing'1 = [ "MEOW" '']]' ]=][=[HISSS]]"[['' ];
 | 
					 | 
				
			||||||
            thing2 = [
 | 
					 | 
				
			||||||
              {
 | 
					 | 
				
			||||||
                thing3 = [ "give" "treat" ];
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
              "I LOVE KEYBOARDS"
 | 
					 | 
				
			||||||
              (utils.mkLuaInline ''[[I am a]] .. [[ lua ]] .. type("value")'')
 | 
					 | 
				
			||||||
            ];
 | 
					 | 
				
			||||||
            thing4 = "couch is for scratching";
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    defaultPackageName = "nixCats";
 | 
					    defaultPackageName = "nvim";
 | 
				
			||||||
    # I did not here, but you might want to create a package named nvim.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # defaultPackageName is also passed to utils.mkNixosModules and utils.mkHomeModules
 | 
					    # defaultPackageName is also passed to utils.mkNixosModules and utils.mkHomeModules
 | 
				
			||||||
    # and it controls the name of the top level option set.
 | 
					    # and it controls the name of the top level option set.
 | 
				
			||||||
    # If you made a package named `nixCats` your default package as we did here,
 | 
					    # If you made a package named `nixCats` your default package as we did here,
 | 
				
			||||||
| 
						 | 
					@ -463,16 +341,17 @@
 | 
				
			||||||
    # In addition, every package exports its own module via passthru, and is overrideable.
 | 
					    # In addition, every package exports its own module via passthru, and is overrideable.
 | 
				
			||||||
    # so you can yourpackage.homeModule and then the namespace would be that packages name.
 | 
					    # so you can yourpackage.homeModule and then the namespace would be that packages name.
 | 
				
			||||||
  in
 | 
					  in
 | 
				
			||||||
  # you shouldnt need to change much past here, but you can if you wish.
 | 
					 | 
				
			||||||
  # but you should at least eventually try to figure out whats going on here!
 | 
					 | 
				
			||||||
    # see :help nixCats.flake.outputs.exports
 | 
					    # see :help nixCats.flake.outputs.exports
 | 
				
			||||||
    forEachSystem (system: let
 | 
					    forEachSystem (system: let
 | 
				
			||||||
      # and this will be our builder! it takes a name from our packageDefinitions as an argument, and builds an nvim.
 | 
					      # and this will be our builder! it takes a name from our packageDefinitions as an argument, and builds an nvim.
 | 
				
			||||||
    nixCatsBuilder = utils.baseBuilder luaPath {
 | 
					      nixCatsBuilder =
 | 
				
			||||||
 | 
					        utils.baseBuilder luaPath {
 | 
				
			||||||
          # we pass in the things to make a pkgs variable to build nvim with later
 | 
					          # we pass in the things to make a pkgs variable to build nvim with later
 | 
				
			||||||
          inherit nixpkgs system dependencyOverlays extra_pkg_config;
 | 
					          inherit nixpkgs system dependencyOverlays extra_pkg_config;
 | 
				
			||||||
          # and also our categoryDefinitions and packageDefinitions
 | 
					          # and also our categoryDefinitions and packageDefinitions
 | 
				
			||||||
    } categoryDefinitions packageDefinitions;
 | 
					        }
 | 
				
			||||||
 | 
					        categoryDefinitions
 | 
				
			||||||
 | 
					        packageDefinitions;
 | 
				
			||||||
      # call it with our defaultPackageName
 | 
					      # call it with our defaultPackageName
 | 
				
			||||||
      defaultPackage = nixCatsBuilder defaultPackageName;
 | 
					      defaultPackage = nixCatsBuilder defaultPackageName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -501,29 +380,46 @@
 | 
				
			||||||
          '';
 | 
					          '';
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
  }) // (let
 | 
					    // (let
 | 
				
			||||||
      # we also export a nixos module to allow reconfiguration from configuration.nix
 | 
					      # we also export a nixos module to allow reconfiguration from configuration.nix
 | 
				
			||||||
      nixosModule = utils.mkNixosModules {
 | 
					      nixosModule = utils.mkNixosModules {
 | 
				
			||||||
        moduleNamespace = [defaultPackageName];
 | 
					        moduleNamespace = [defaultPackageName];
 | 
				
			||||||
      inherit defaultPackageName dependencyOverlays luaPath
 | 
					        inherit
 | 
				
			||||||
        categoryDefinitions packageDefinitions extra_pkg_config nixpkgs;
 | 
					          defaultPackageName
 | 
				
			||||||
 | 
					          dependencyOverlays
 | 
				
			||||||
 | 
					          luaPath
 | 
				
			||||||
 | 
					          categoryDefinitions
 | 
				
			||||||
 | 
					          packageDefinitions
 | 
				
			||||||
 | 
					          extra_pkg_config
 | 
				
			||||||
 | 
					          nixpkgs
 | 
				
			||||||
 | 
					          ;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      # and the same for home manager
 | 
					      # and the same for home manager
 | 
				
			||||||
      homeModule = utils.mkHomeModules {
 | 
					      homeModule = utils.mkHomeModules {
 | 
				
			||||||
        moduleNamespace = [defaultPackageName];
 | 
					        moduleNamespace = [defaultPackageName];
 | 
				
			||||||
      inherit defaultPackageName dependencyOverlays luaPath
 | 
					        inherit
 | 
				
			||||||
        categoryDefinitions packageDefinitions extra_pkg_config nixpkgs;
 | 
					          defaultPackageName
 | 
				
			||||||
 | 
					          dependencyOverlays
 | 
				
			||||||
 | 
					          luaPath
 | 
				
			||||||
 | 
					          categoryDefinitions
 | 
				
			||||||
 | 
					          packageDefinitions
 | 
				
			||||||
 | 
					          extra_pkg_config
 | 
				
			||||||
 | 
					          nixpkgs
 | 
				
			||||||
 | 
					          ;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    in {
 | 
					    in {
 | 
				
			||||||
 | 
					 | 
				
			||||||
      # these outputs will be NOT wrapped with ${system}
 | 
					      # these outputs will be NOT wrapped with ${system}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # this will make an overlay out of each of the packageDefinitions defined above
 | 
					      # this will make an overlay out of each of the packageDefinitions defined above
 | 
				
			||||||
      # and set the default overlay to the one named here.
 | 
					      # and set the default overlay to the one named here.
 | 
				
			||||||
    overlays = utils.makeOverlays luaPath {
 | 
					      overlays =
 | 
				
			||||||
 | 
					        utils.makeOverlays luaPath {
 | 
				
			||||||
          inherit nixpkgs dependencyOverlays extra_pkg_config;
 | 
					          inherit nixpkgs dependencyOverlays extra_pkg_config;
 | 
				
			||||||
    } categoryDefinitions packageDefinitions defaultPackageName;
 | 
					        }
 | 
				
			||||||
 | 
					        categoryDefinitions
 | 
				
			||||||
 | 
					        packageDefinitions
 | 
				
			||||||
 | 
					        defaultPackageName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      nixosModules.default = nixosModule;
 | 
					      nixosModules.default = nixosModule;
 | 
				
			||||||
      homeModules.default = homeModule;
 | 
					      homeModules.default = homeModule;
 | 
				
			||||||
| 
						 | 
					@ -531,5 +427,4 @@
 | 
				
			||||||
      inherit utils nixosModule homeModule;
 | 
					      inherit utils nixosModule homeModule;
 | 
				
			||||||
      inherit (utils) templates;
 | 
					      inherit (utils) templates;
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,6 +2,47 @@ local catUtils = require('nixCatsUtils')
 | 
				
			||||||
if (catUtils.isNixCats and nixCats('lspDebugMode')) then
 | 
					if (catUtils.isNixCats and nixCats('lspDebugMode')) then
 | 
				
			||||||
  vim.lsp.set_log_level("debug")
 | 
					  vim.lsp.set_log_level("debug")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					-- we create a function that lets us more easily define mappings specific
 | 
				
			||||||
 | 
					-- for LSP related items. It sets the mode, buffer and description for us each time.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local lspmap = function(keys, func, desc)
 | 
				
			||||||
 | 
					  if desc then
 | 
				
			||||||
 | 
					    desc = 'LSP: ' .. desc
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- all of our LSP keybindings will be namespaced under <leader>l
 | 
				
			||||||
 | 
					  keys = '<leader>l' .. keys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					lspmap('r', vim.lsp.buf.rename, '[R]ename')
 | 
				
			||||||
 | 
					lspmap('a', vim.lsp.buf.code_action, '[C]ode Action')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					lspmap('d', vim.lsp.buf.definition, 'Goto [D]efinition')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- NOTE: why are these functions that call the telescope builtin?
 | 
				
			||||||
 | 
					-- because otherwise they would load telescope eagerly when this is defined.
 | 
				
			||||||
 | 
					-- due to us using the on_require handler to make sure it is available.
 | 
				
			||||||
 | 
					if nixCats('telescope') then
 | 
				
			||||||
 | 
					  lspmap('R', function() require('telescope.builtin').lsp_references() end, 'Goto [R]eferences')
 | 
				
			||||||
 | 
					  lspmap('I', function() require('telescope.builtin').lsp_implementations() end, 'Goto [I]mplementation')
 | 
				
			||||||
 | 
					  lspmap('s', function() require('telescope.builtin').lsp_document_symbols() end, 'Document [S]ymbols')
 | 
				
			||||||
 | 
					  lspmap('ws', function() require('telescope.builtin').lsp_dynamic_workspace_symbols() end, '[W]orkspace [S]ymbols')
 | 
				
			||||||
 | 
					end   -- TODO: Investigate whether I can replace these with snacsk.nvim.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					lspmap('D', vim.lsp.buf.type_definition, 'Type [D]efinition')
 | 
				
			||||||
 | 
					lspmap('h', vim.lsp.buf.hover, 'Hover Documentation')
 | 
				
			||||||
 | 
					lspmap('s', vim.lsp.buf.signature_help, 'Signature Documentation')
 | 
				
			||||||
 | 
					lspmap('f', vim.lsp.buf.format, 'Format buffer')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Lesser used LSP functionality
 | 
				
			||||||
 | 
					lspmap('D', vim.lsp.buf.declaration, 'Goto [D]eclaration')
 | 
				
			||||||
 | 
					lspmap('wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
 | 
				
			||||||
 | 
					lspmap('wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
 | 
				
			||||||
 | 
					lspmap('wl', function()
 | 
				
			||||||
 | 
					  print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
 | 
				
			||||||
 | 
					end, '[W]orkspace [L]ist Folders')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- NOTE: This file uses lzextras.lsp handler https://github.com/BirdeeHub/lzextras?tab=readme-ov-file#lsp-handler
 | 
					-- NOTE: This file uses lzextras.lsp handler https://github.com/BirdeeHub/lzextras?tab=readme-ov-file#lsp-handler
 | 
				
			||||||
-- This is a slightly more performant fallback function
 | 
					-- This is a slightly more performant fallback function
 | 
				
			||||||
| 
						 | 
					@ -9,7 +50,8 @@ end
 | 
				
			||||||
-- nixCats gives us the paths, which is faster than searching the rtp!
 | 
					-- nixCats gives us the paths, which is faster than searching the rtp!
 | 
				
			||||||
local old_ft_fallback = require('lze').h.lsp.get_ft_fallback()
 | 
					local old_ft_fallback = require('lze').h.lsp.get_ft_fallback()
 | 
				
			||||||
require('lze').h.lsp.set_ft_fallback(function(name)
 | 
					require('lze').h.lsp.set_ft_fallback(function(name)
 | 
				
			||||||
  local lspcfg = nixCats.pawsible({ "allPlugins", "opt", "nvim-lspconfig" }) or nixCats.pawsible({ "allPlugins", "start", "nvim-lspconfig" })
 | 
					  local lspcfg = nixCats.pawsible({ "allPlugins", "opt", "nvim-lspconfig" }) or
 | 
				
			||||||
 | 
					      nixCats.pawsible({ "allPlugins", "start", "nvim-lspconfig" })
 | 
				
			||||||
  if lspcfg then
 | 
					  if lspcfg then
 | 
				
			||||||
    local ok, cfg = pcall(dofile, lspcfg .. "/lsp/" .. name .. ".lua")
 | 
					    local ok, cfg = pcall(dofile, lspcfg .. "/lsp/" .. name .. ".lua")
 | 
				
			||||||
    if not ok then
 | 
					    if not ok then
 | 
				
			||||||
| 
						 | 
					@ -23,7 +65,7 @@ end)
 | 
				
			||||||
require('lze').load {
 | 
					require('lze').load {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "nvim-lspconfig",
 | 
					    "nvim-lspconfig",
 | 
				
			||||||
    for_cat = "general.core",
 | 
					    for_cat = "lsp",
 | 
				
			||||||
    on_require = { "lspconfig" },
 | 
					    on_require = { "lspconfig" },
 | 
				
			||||||
    -- NOTE: define a function for lsp,
 | 
					    -- NOTE: define a function for lsp,
 | 
				
			||||||
    -- and it will run for all specs with type(plugin.lsp) == table
 | 
					    -- and it will run for all specs with type(plugin.lsp) == table
 | 
				
			||||||
| 
						 | 
					@ -32,11 +74,6 @@ require('lze').load {
 | 
				
			||||||
      vim.lsp.config(plugin.name, plugin.lsp or {})
 | 
					      vim.lsp.config(plugin.name, plugin.lsp or {})
 | 
				
			||||||
      vim.lsp.enable(plugin.name)
 | 
					      vim.lsp.enable(plugin.name)
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
    before = function(_)
 | 
					 | 
				
			||||||
      vim.lsp.config('*', {
 | 
					 | 
				
			||||||
        on_attach = require('myLuaConf.LSPs.on_attach'),
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    end,
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "mason.nvim",
 | 
					    "mason.nvim",
 | 
				
			||||||
| 
						 | 
					@ -54,7 +91,7 @@ require('lze').load {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    -- lazydev makes your lsp way better in your config without needing extra lsp configuration.
 | 
					    -- lazydev makes your lsp way better in your config without needing extra lsp configuration.
 | 
				
			||||||
    "lazydev.nvim",
 | 
					    "lazydev.nvim",
 | 
				
			||||||
    for_cat = "neonixdev",
 | 
					    for_cat = "lua",
 | 
				
			||||||
    cmd = { "LazyDev" },
 | 
					    cmd = { "LazyDev" },
 | 
				
			||||||
    ft = "lua",
 | 
					    ft = "lua",
 | 
				
			||||||
    after = function(_)
 | 
					    after = function(_)
 | 
				
			||||||
| 
						 | 
					@ -68,7 +105,7 @@ require('lze').load {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    -- name of the lsp
 | 
					    -- name of the lsp
 | 
				
			||||||
    "lua_ls",
 | 
					    "lua_ls",
 | 
				
			||||||
    enabled = nixCats('lua') or nixCats('neonixdev') or false,
 | 
					    enabled = nixCats('lua'),
 | 
				
			||||||
    -- provide a table containing filetypes,
 | 
					    -- provide a table containing filetypes,
 | 
				
			||||||
    -- and then whatever your functions defined in the function type specs expect.
 | 
					    -- and then whatever your functions defined in the function type specs expect.
 | 
				
			||||||
    -- in our case, it just expects the normal lspconfig setup options,
 | 
					    -- in our case, it just expects the normal lspconfig setup options,
 | 
				
			||||||
| 
						 | 
					@ -93,33 +130,9 @@ require('lze').load {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    -- also these are regular specs and you can use before and after and all the other normal fields
 | 
					    -- also these are regular specs and you can use before and after and all the other normal fields
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "gopls",
 | 
					 | 
				
			||||||
    for_cat = "go",
 | 
					 | 
				
			||||||
    -- if you don't provide the filetypes it asks lspconfig for them
 | 
					 | 
				
			||||||
    lsp = {
 | 
					 | 
				
			||||||
      filetypes = { "go", "gomod", "gowork", "gotmpl" },
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "rnix",
 | 
					 | 
				
			||||||
    -- mason doesn't have nixd
 | 
					 | 
				
			||||||
    enabled = not catUtils.isNixCats,
 | 
					 | 
				
			||||||
    lsp = {
 | 
					 | 
				
			||||||
      filetypes = { "nix" },
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "nil_ls",
 | 
					 | 
				
			||||||
    -- mason doesn't have nixd
 | 
					 | 
				
			||||||
    enabled = not catUtils.isNixCats,
 | 
					 | 
				
			||||||
    lsp = {
 | 
					 | 
				
			||||||
      filetypes = { "nix" },
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "nixd",
 | 
					    "nixd",
 | 
				
			||||||
    enabled = catUtils.isNixCats and (nixCats('nix') or nixCats('neonixdev')) or false,
 | 
					    enabled = catUtils.isNixCats and nixCats('lsp.nix'),
 | 
				
			||||||
    lsp = {
 | 
					    lsp = {
 | 
				
			||||||
      filetypes = { "nix" },
 | 
					      filetypes = { "nix" },
 | 
				
			||||||
      settings = {
 | 
					      settings = {
 | 
				
			||||||
| 
						 | 
					@ -132,7 +145,7 @@ require('lze').load {
 | 
				
			||||||
          nixpkgs = {
 | 
					          nixpkgs = {
 | 
				
			||||||
            -- in the extras set of your package definition:
 | 
					            -- in the extras set of your package definition:
 | 
				
			||||||
            -- nixdExtras.nixpkgs = ''import ${pkgs.path} {}''
 | 
					            -- nixdExtras.nixpkgs = ''import ${pkgs.path} {}''
 | 
				
			||||||
            expr = nixCats.extra("nixdExtras.nixpkgs") or [[import <nixpkgs> {}]],
 | 
					            expr = nixCats.extra("nixdExtras.nixpkgs")
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          options = {
 | 
					          options = {
 | 
				
			||||||
            -- If you integrated with your system flake,
 | 
					            -- If you integrated with your system flake,
 | 
				
			||||||
| 
						 | 
					@ -152,7 +165,7 @@ require('lze').load {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          formatting = {
 | 
					          formatting = {
 | 
				
			||||||
            command = { "nixfmt" }
 | 
					            command = { "alejandra" }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          diagnostic = {
 | 
					          diagnostic = {
 | 
				
			||||||
            suppress = {
 | 
					            suppress = {
 | 
				
			||||||
| 
						 | 
					@ -163,4 +176,8 @@ require('lze').load {
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "rustaceanvim",
 | 
				
			||||||
 | 
					    for_cat = "lsp.rust",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,47 +0,0 @@
 | 
				
			||||||
return function(_, bufnr)
 | 
					 | 
				
			||||||
  -- we create a function that lets us more easily define mappings specific
 | 
					 | 
				
			||||||
  -- for LSP related items. It sets the mode, buffer and description for us each time.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  local nmap = function(keys, func, desc)
 | 
					 | 
				
			||||||
    if desc then
 | 
					 | 
				
			||||||
      desc = 'LSP: ' .. desc
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
 | 
					 | 
				
			||||||
  nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  -- NOTE: why are these functions that call the telescope builtin?
 | 
					 | 
				
			||||||
  -- because otherwise they would load telescope eagerly when this is defined.
 | 
					 | 
				
			||||||
  -- due to us using the on_require handler to make sure it is available.
 | 
					 | 
				
			||||||
  if nixCats('general.telescope') then
 | 
					 | 
				
			||||||
    nmap('gr', function() require('telescope.builtin').lsp_references() end, '[G]oto [R]eferences')
 | 
					 | 
				
			||||||
    nmap('gI', function() require('telescope.builtin').lsp_implementations() end, '[G]oto [I]mplementation')
 | 
					 | 
				
			||||||
    nmap('<leader>ds', function() require('telescope.builtin').lsp_document_symbols() end, '[D]ocument [S]ymbols')
 | 
					 | 
				
			||||||
    nmap('<leader>ws', function() require('telescope.builtin').lsp_dynamic_workspace_symbols() end, '[W]orkspace [S]ymbols')
 | 
					 | 
				
			||||||
  end -- TODO: someone who knows the builtin versions of these to do instead help me out please.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  -- See `:help K` for why this keymap
 | 
					 | 
				
			||||||
  nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
 | 
					 | 
				
			||||||
  nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  -- Lesser used LSP functionality
 | 
					 | 
				
			||||||
  nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
 | 
					 | 
				
			||||||
  nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
 | 
					 | 
				
			||||||
  nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
 | 
					 | 
				
			||||||
  nmap('<leader>wl', function()
 | 
					 | 
				
			||||||
    print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
 | 
					 | 
				
			||||||
  end, '[W]orkspace [L]ist Folders')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  -- Create a command `:Format` local to the LSP buffer
 | 
					 | 
				
			||||||
  vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
 | 
					 | 
				
			||||||
    vim.lsp.buf.format()
 | 
					 | 
				
			||||||
  end, { desc = 'Format current buffer with LSP' })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
end
 | 
					 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@ require('lze').load {
 | 
				
			||||||
      { "<leader>B", desc = "Debug: Set Breakpoint" },
 | 
					      { "<leader>B", desc = "Debug: Set Breakpoint" },
 | 
				
			||||||
      { "<F7>",      desc = "Debug: See last session result." },
 | 
					      { "<F7>",      desc = "Debug: See last session result." },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    -- colorscheme = "",
 | 
					 | 
				
			||||||
    load = (require('nixCatsUtils').isNixCats and function(name)
 | 
					    load = (require('nixCatsUtils').isNixCats and function(name)
 | 
				
			||||||
      vim.cmd.packadd(name)
 | 
					      vim.cmd.packadd(name)
 | 
				
			||||||
      vim.cmd.packadd("nvim-dap-ui")
 | 
					      vim.cmd.packadd("nvim-dap-ui")
 | 
				
			||||||
| 
						 | 
					@ -29,6 +28,7 @@ require('lze').load {
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      local dap = require 'dap'
 | 
					      local dap = require 'dap'
 | 
				
			||||||
      local dapui = require 'dapui'
 | 
					      local dapui = require 'dapui'
 | 
				
			||||||
 | 
					      require('telescope').load_extension('dap')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      -- Basic debugging keymaps, feel free to change to your liking!
 | 
					      -- Basic debugging keymaps, feel free to change to your liking!
 | 
				
			||||||
      vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
 | 
					      vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
 | 
				
			||||||
| 
						 | 
					@ -105,15 +105,7 @@ require('lze').load {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      -- NOTE: Install lang specific config
 | 
					      -- NOTE: Install lang specific config
 | 
				
			||||||
      -- either in here, or in a separate plugin spec as demonstrated for go below.
 | 
					      -- either in here, or in a separate plugin spec as demonstrated for go below.
 | 
				
			||||||
 | 
					    end,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    end,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "nvim-dap-go",
 | 
					 | 
				
			||||||
    for_cat = { cat = 'debug.go', default = false },
 | 
					 | 
				
			||||||
    on_plugin = { "nvim-dap", },
 | 
					 | 
				
			||||||
    after = function(plugin)
 | 
					 | 
				
			||||||
      require("dap-go").setup()
 | 
					 | 
				
			||||||
    end,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,12 +15,6 @@ require('lze').load {
 | 
				
			||||||
        -- javascript = { 'eslint' },
 | 
					        -- javascript = { 'eslint' },
 | 
				
			||||||
        -- typescript = { 'eslint' },
 | 
					        -- typescript = { 'eslint' },
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					 | 
				
			||||||
      vim.api.nvim_create_autocmd({ "BufWritePost" }, {
 | 
					 | 
				
			||||||
        callback = function()
 | 
					 | 
				
			||||||
          require("lint").try_lint()
 | 
					 | 
				
			||||||
        end,
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,7 +24,7 @@ require('nixCatsUtils.catPacker').setup({
 | 
				
			||||||
  { "BirdeeHub/lze", },
 | 
					  { "BirdeeHub/lze", },
 | 
				
			||||||
  { "BirdeeHub/lzextras", },
 | 
					  { "BirdeeHub/lzextras", },
 | 
				
			||||||
  { "stevearc/oil.nvim", },
 | 
					  { "stevearc/oil.nvim", },
 | 
				
			||||||
  { 'joshdick/onedark.vim', },
 | 
					  { 'ellisonleao/gruvbox.nvim', },
 | 
				
			||||||
  { 'nvim-tree/nvim-web-devicons', },
 | 
					  { 'nvim-tree/nvim-web-devicons', },
 | 
				
			||||||
  { 'nvim-lua/plenary.nvim', },
 | 
					  { 'nvim-lua/plenary.nvim', },
 | 
				
			||||||
  { 'tpope/vim-repeat', },
 | 
					  { 'tpope/vim-repeat', },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
-- NOTE: These 2 need to be set up before any plugins are loaded.
 | 
					-- NOTE: These 2 need to be set up before any plugins are loaded.
 | 
				
			||||||
vim.g.mapleader = ' '
 | 
					vim.g.mapleader = ';'
 | 
				
			||||||
vim.g.maplocalleader = ' '
 | 
					vim.g.maplocalleader = ';'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Setting options ]]
 | 
					-- [[ Setting options ]]
 | 
				
			||||||
-- See `:help vim.o`
 | 
					-- See `:help vim.o`
 | 
				
			||||||
| 
						 | 
					@ -10,66 +10,77 @@ vim.g.maplocalleader = ' '
 | 
				
			||||||
--  See `:help 'list'`
 | 
					--  See `:help 'list'`
 | 
				
			||||||
--  and `:help 'listchars'`
 | 
					--  and `:help 'listchars'`
 | 
				
			||||||
vim.opt.list = true
 | 
					vim.opt.list = true
 | 
				
			||||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
 | 
					vim.opt.listchars = { eol = "↲", extends = "⟩", nbsp = "␣", precedes = "⟨", tab = ">-", trail = "•" }
 | 
				
			||||||
 | 
					vim.opt.showbreak = "↪";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Set highlight on search
 | 
					-- Set highlight on search
 | 
				
			||||||
vim.opt.hlsearch = true
 | 
					vim.opt.hlsearch = true
 | 
				
			||||||
 | 
					vim.opt.incsearch = true
 | 
				
			||||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
 | 
					vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Preview substitutions live, as you type!
 | 
					-- Preview substitutions live, as you type!
 | 
				
			||||||
vim.opt.inccommand = 'split'
 | 
					vim.opt.inccommand = 'split'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Automatically load changed files
 | 
				
			||||||
 | 
					vim.opt.autoread = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Minimal number of screen lines to keep above and below the cursor.
 | 
					-- Minimal number of screen lines to keep above and below the cursor.
 | 
				
			||||||
vim.opt.scrolloff = 10
 | 
					vim.opt.scrolloff = 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Make line numbers default
 | 
					-- Make line numbers default
 | 
				
			||||||
vim.wo.number = true
 | 
					vim.opt.number = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Enable mouse mode
 | 
					-- Enable mouse mode
 | 
				
			||||||
vim.o.mouse = 'a'
 | 
					vim.opt.mouse = 'a'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- no hard wrapping
 | 
				
			||||||
 | 
					vim.opt.textwidth = 0
 | 
				
			||||||
 | 
					vim.opt.wrapmargin = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- get nice visual guides for 80, 100, and 120 cols.
 | 
				
			||||||
 | 
					vim.opt.colorcolumn = { "90", "100", "120", }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- add line numbers
 | 
				
			||||||
 | 
					vim.opt.number = true
 | 
				
			||||||
 | 
					vim.opt.numberwidth = 3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Indent
 | 
					-- Indent
 | 
				
			||||||
-- vim.o.smarttab = true
 | 
					vim.opt.smarttab = true
 | 
				
			||||||
vim.opt.cpoptions:append('I')
 | 
					vim.opt.expandtab = true
 | 
				
			||||||
vim.o.expandtab = true
 | 
					vim.opt.smartindent = true
 | 
				
			||||||
-- vim.o.smartindent = true
 | 
					vim.opt.autoindent = true
 | 
				
			||||||
-- vim.o.autoindent = true
 | 
					vim.opt.tabstop = 4
 | 
				
			||||||
-- vim.o.tabstop = 4
 | 
					vim.opt.softtabstop = -1
 | 
				
			||||||
-- vim.o.softtabstop = 4
 | 
					vim.opt.shiftwidth = 4
 | 
				
			||||||
-- vim.o.shiftwidth = 4
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- stops line wrapping from being confusing
 | 
					-- stops line wrapping from being confusing
 | 
				
			||||||
vim.o.breakindent = true
 | 
					vim.opt.breakindent = true
 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Save undo history
 | 
					 | 
				
			||||||
vim.o.undofile = true
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Case-insensitive searching UNLESS \C or capital in search
 | 
					-- Case-insensitive searching UNLESS \C or capital in search
 | 
				
			||||||
vim.o.ignorecase = true
 | 
					vim.opt.ignorecase = true
 | 
				
			||||||
vim.o.smartcase = true
 | 
					vim.opt.smartcase = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Keep signcolumn on by default
 | 
					-- Keep signcolumn on by default
 | 
				
			||||||
vim.wo.signcolumn = 'yes'
 | 
					vim.opt.signcolumn = 'yes'
 | 
				
			||||||
vim.wo.relativenumber = true
 | 
					vim.opt.relativenumber = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Decrease update time
 | 
					-- Decrease update time
 | 
				
			||||||
vim.o.updatetime = 250
 | 
					vim.opt.updatetime = 250
 | 
				
			||||||
vim.o.timeoutlen = 300
 | 
					vim.opt.timeoutlen = 300
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Set completeopt to have a better completion experience
 | 
					-- Set completeopt to have a better completion experience
 | 
				
			||||||
vim.o.completeopt = 'menu,preview,noselect'
 | 
					vim.opt.completeopt = { 'menu', 'preview', 'noselect' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- NOTE: You should make sure your terminal supports this
 | 
					vim.opt.termguicolors = true
 | 
				
			||||||
vim.o.termguicolors = true
 | 
					
 | 
				
			||||||
 | 
					-- disable unneded files
 | 
				
			||||||
 | 
					vim.opt.swapfile = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Disable auto comment on enter ]]
 | 
					-- [[ Disable auto comment on enter ]]
 | 
				
			||||||
-- See :help formatoptions
 | 
					-- See :help formatoptions
 | 
				
			||||||
vim.api.nvim_create_autocmd("FileType", {
 | 
					
 | 
				
			||||||
  desc = "remove formatoptions",
 | 
					-- set options for auto-commenting and using gq
 | 
				
			||||||
  callback = function()
 | 
					vim.opt.formatoptions = "rojq"
 | 
				
			||||||
    vim.opt.formatoptions:remove({ "c", "r", "o" })
 | 
					 | 
				
			||||||
  end,
 | 
					 | 
				
			||||||
})
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Highlight on yank ]]
 | 
					-- [[ Highlight on yank ]]
 | 
				
			||||||
-- See `:help vim.highlight.on_yank()`
 | 
					-- See `:help vim.highlight.on_yank()`
 | 
				
			||||||
| 
						 | 
					@ -86,29 +97,12 @@ vim.g.netrw_liststyle=0
 | 
				
			||||||
vim.g.netrw_banner = 0
 | 
					vim.g.netrw_banner = 0
 | 
				
			||||||
-- [[ Basic Keymaps ]]
 | 
					-- [[ Basic Keymaps ]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Keymaps for better default experience
 | 
					-- make quick system clipboard opts easier
 | 
				
			||||||
-- See `:help vim.keymap.set()`
 | 
					vim.keymap.set({ 'n', 'v', 'x' }, '<leader>p', '"+p', { noremap = true, silent = true, desc = 'Paste from clipboard' })
 | 
				
			||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = 'Moves Line Down' })
 | 
					vim.keymap.set({ "v", "x", "n" }, '<leader>y', '"+y', { noremap = true, silent = true, desc = 'Yank to clipboard' })
 | 
				
			||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = 'Moves Line Up' })
 | 
					vim.keymap.set({ "n", "v", "x" }, '<leader>Y', '"+yy', { noremap = true, silent = true, desc = 'Yank line to clipboard' })
 | 
				
			||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = 'Scroll Down' })
 | 
					vim.keymap.set('i', '<C-p>', '<C-r><C-p>+',
 | 
				
			||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = 'Scroll Up' })
 | 
					  { noremap = true, silent = true, desc = 'Paste from clipboard from within insert mode' })
 | 
				
			||||||
vim.keymap.set("n", "n", "nzzzv", { desc = 'Next Search Result' })
 | 
					 | 
				
			||||||
vim.keymap.set("n", "N", "Nzzzv", { desc = 'Previous Search Result' })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
vim.keymap.set("n", "<leader><leader>[", "<cmd>bprev<CR>", { desc = 'Previous buffer' })
 | 
					 | 
				
			||||||
vim.keymap.set("n", "<leader><leader>]", "<cmd>bnext<CR>", { desc = 'Next buffer' })
 | 
					 | 
				
			||||||
vim.keymap.set("n", "<leader><leader>l", "<cmd>b#<CR>", { desc = 'Last buffer' })
 | 
					 | 
				
			||||||
vim.keymap.set("n", "<leader><leader>d", "<cmd>bdelete<CR>", { desc = 'delete buffer' })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- see help sticky keys on windows
 | 
					 | 
				
			||||||
vim.cmd([[command! W w]])
 | 
					 | 
				
			||||||
vim.cmd([[command! Wq wq]])
 | 
					 | 
				
			||||||
vim.cmd([[command! WQ wq]])
 | 
					 | 
				
			||||||
vim.cmd([[command! Q q]])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Remap for dealing with word wrap
 | 
					 | 
				
			||||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
 | 
					 | 
				
			||||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Diagnostic keymaps
 | 
					-- Diagnostic keymaps
 | 
				
			||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
 | 
					vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
 | 
				
			||||||
| 
						 | 
					@ -116,21 +110,8 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
 | 
				
			||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
 | 
					vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
 | 
				
			||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
 | 
					vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- moving between splits
 | 
				
			||||||
-- kickstart.nvim starts you with this. 
 | 
					vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'move to right split' })
 | 
				
			||||||
-- But it constantly clobbers your system clipboard whenever you delete anything.
 | 
					vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'move to below split' })
 | 
				
			||||||
 | 
					vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'move to above split' })
 | 
				
			||||||
-- Sync clipboard between OS and Neovim.
 | 
					vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = 'move to left split' })
 | 
				
			||||||
--  Remove this option if you want your OS clipboard to remain independent.
 | 
					 | 
				
			||||||
--  See `:help 'clipboard'`
 | 
					 | 
				
			||||||
-- vim.o.clipboard = 'unnamedplus'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- You should instead use these keybindings so that they are still easy to use, but dont conflict
 | 
					 | 
				
			||||||
vim.keymap.set({"v", "x", "n"}, '<leader>y', '"+y', { noremap = true, silent = true, desc = 'Yank to clipboard' })
 | 
					 | 
				
			||||||
vim.keymap.set({"n", "v", "x"}, '<leader>Y', '"+yy', { noremap = true, silent = true, desc = 'Yank line to clipboard' })
 | 
					 | 
				
			||||||
vim.keymap.set({"n", "v", "x"}, '<C-a>', 'gg0vG$', { noremap = true, silent = true, desc = 'Select all' })
 | 
					 | 
				
			||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>p', '"+p', { noremap = true, silent = true, desc = 'Paste from clipboard' })
 | 
					 | 
				
			||||||
vim.keymap.set('i', '<C-p>', '<C-r><C-p>+', { noremap = true, silent = true, desc = 'Paste from clipboard from within insert mode' })
 | 
					 | 
				
			||||||
vim.keymap.set("x", "<leader>P", '"_dP', { noremap = true, silent = true, desc = 'Paste over selection without erasing unnamed register' })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,20 +6,21 @@ end
 | 
				
			||||||
return {
 | 
					return {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "cmp-cmdline",
 | 
					    "cmp-cmdline",
 | 
				
			||||||
    for_cat = "general.blink",
 | 
					    for_cat = "completion",
 | 
				
			||||||
    on_plugin = { "blink.cmp" },
 | 
					    on_plugin = { "blink.cmp" },
 | 
				
			||||||
    load = load_w_after,
 | 
					    load = load_w_after,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "blink.compat",
 | 
					    "blink.compat",
 | 
				
			||||||
    for_cat = "general.blink",
 | 
					    for_cat = "completion",
 | 
				
			||||||
    dep_of = { "cmp-cmdline" },
 | 
					    dep_of = { "cmp-cmdline" },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "luasnip",
 | 
					    "luasnip",
 | 
				
			||||||
    for_cat = "general.blink",
 | 
					    for_cat = "completion",
 | 
				
			||||||
    dep_of = { "blink.cmp" },
 | 
					    dep_of = { "blink.cmp" },
 | 
				
			||||||
    after = function(_)
 | 
					    after = function(_)
 | 
				
			||||||
 | 
					      vim.cmd.packadd("friendly-snippets")
 | 
				
			||||||
      local luasnip = require 'luasnip'
 | 
					      local luasnip = require 'luasnip'
 | 
				
			||||||
      require('luasnip.loaders.from_vscode').lazy_load()
 | 
					      require('luasnip.loaders.from_vscode').lazy_load()
 | 
				
			||||||
      luasnip.config.setup {}
 | 
					      luasnip.config.setup {}
 | 
				
			||||||
| 
						 | 
					@ -35,23 +36,31 @@ return {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "colorful-menu.nvim",
 | 
					    "colorful-menu.nvim",
 | 
				
			||||||
    for_cat = "general.blink",
 | 
					    for_cat = "completion",
 | 
				
			||||||
    on_plugin = { "blink.cmp" },
 | 
					    on_plugin = { "blink.cmp" },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "blink.cmp",
 | 
					    "blink.cmp",
 | 
				
			||||||
    for_cat = "general.blink",
 | 
					    for_cat = "completion",
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    after = function(_)
 | 
					    after = function(_)
 | 
				
			||||||
      require("blink.cmp").setup({
 | 
					      require("blink.cmp").setup({
 | 
				
			||||||
        -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
 | 
					        -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
 | 
				
			||||||
        -- See :h blink-cmp-config-keymap for configuring keymaps
 | 
					        -- See :h blink-cmp-config-keymap for configuring keymaps
 | 
				
			||||||
        keymap = {
 | 
					        keymap = {
 | 
				
			||||||
          preset = 'default',
 | 
					          preset = "enter",
 | 
				
			||||||
 | 
					          ["<Tab>"] = { "select_next", "fallback" },
 | 
				
			||||||
 | 
					          ["<S-Tab>"] = { "select_prev", "fallback" },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        cmdline = {
 | 
					        cmdline = {
 | 
				
			||||||
          enabled = true,
 | 
					          enabled = true,
 | 
				
			||||||
          completion = {
 | 
					          completion = {
 | 
				
			||||||
 | 
					            list = {
 | 
				
			||||||
 | 
					              selection = {
 | 
				
			||||||
 | 
					                preselect = false,
 | 
				
			||||||
 | 
					                -- auto_insert = false,
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            menu = {
 | 
					            menu = {
 | 
				
			||||||
              auto_show = true,
 | 
					              auto_show = true,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
local colorschemeName = nixCats('colorscheme')
 | 
					local colorschemeName = nixCats('colorscheme')
 | 
				
			||||||
if not require('nixCatsUtils').isNixCats then
 | 
					if not require('nixCatsUtils').isNixCats then
 | 
				
			||||||
  colorschemeName = 'onedark'
 | 
					  colorschemeName = 'gruvbox'
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
-- Could I lazy load on colorscheme with lze?
 | 
					-- Could I lazy load on colorscheme with lze?
 | 
				
			||||||
-- sure. But I was going to call vim.cmd.colorscheme() during startup anyway
 | 
					-- sure. But I was going to call vim.cmd.colorscheme() during startup anyway
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ if ok then
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- NOTE: you can check if you included the category with the thing wherever you want.
 | 
					-- NOTE: you can check if you included the category with the thing wherever you want.
 | 
				
			||||||
if nixCats('general.extra') then
 | 
					if nixCats('always') then
 | 
				
			||||||
  -- I didnt want to bother with lazy loading this.
 | 
					  -- I didnt want to bother with lazy loading this.
 | 
				
			||||||
  -- I could put it in opt and put it in a spec anyway
 | 
					  -- I could put it in opt and put it in a spec anyway
 | 
				
			||||||
  -- and then not set any handlers and it would load at startup,
 | 
					  -- and then not set any handlers and it would load at startup,
 | 
				
			||||||
| 
						 | 
					@ -74,7 +74,7 @@ require('lze').load {
 | 
				
			||||||
    -- it is defined in luaUtils template in lua/nixCatsUtils/lzUtils.lua
 | 
					    -- it is defined in luaUtils template in lua/nixCatsUtils/lzUtils.lua
 | 
				
			||||||
    -- you could replace this with enabled = nixCats('cat.name') == true
 | 
					    -- you could replace this with enabled = nixCats('cat.name') == true
 | 
				
			||||||
    -- if you didnt care to set a different default for when not using nix than the default you already set
 | 
					    -- if you didnt care to set a different default for when not using nix than the default you already set
 | 
				
			||||||
    for_cat = 'general.markdown',
 | 
					    for_cat = 'markdown',
 | 
				
			||||||
    cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle", },
 | 
					    cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle", },
 | 
				
			||||||
    ft = "markdown",
 | 
					    ft = "markdown",
 | 
				
			||||||
    keys = {
 | 
					    keys = {
 | 
				
			||||||
| 
						 | 
					@ -87,43 +87,32 @@ require('lze').load {
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "undotree",
 | 
					    "leap.nvim",
 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    cmd = { "UndotreeToggle", "UndotreeHide", "UndotreeShow", "UndotreeFocus", "UndotreePersistUndo", },
 | 
					 | 
				
			||||||
    keys = { { "<leader>U", "<cmd>UndotreeToggle<CR>", mode = { "n" }, desc = "Undo Tree" }, },
 | 
					 | 
				
			||||||
    before = function(_)
 | 
					 | 
				
			||||||
      vim.g.undotree_WindowLayout = 1
 | 
					 | 
				
			||||||
      vim.g.undotree_SplitWidth = 40
 | 
					 | 
				
			||||||
    end,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "comment.nvim",
 | 
					 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      require('Comment').setup()
 | 
					      require('leap').set_default_mappings()
 | 
				
			||||||
    end,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "indent-blankline.nvim",
 | 
					 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					 | 
				
			||||||
    after = function(plugin)
 | 
					 | 
				
			||||||
      require("ibl").setup()
 | 
					 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "nvim-surround",
 | 
					    "nvim-surround",
 | 
				
			||||||
    for_cat = 'general.always',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    -- keys = "",
 | 
					    -- keys = "",
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      require('nvim-surround').setup()
 | 
					      require('nvim-surround').setup()
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "marks.nvim",
 | 
				
			||||||
 | 
					    for_cat = "always",
 | 
				
			||||||
 | 
					    after = function(plugin)
 | 
				
			||||||
 | 
					      require('marks').setup({})
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "vim-startuptime",
 | 
					    "vim-startuptime",
 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					    for_cat = 'extra',
 | 
				
			||||||
    cmd = { "StartupTime" },
 | 
					    cmd = { "StartupTime" },
 | 
				
			||||||
    before = function(_)
 | 
					    before = function(_)
 | 
				
			||||||
      vim.g.startuptime_event_width = 0
 | 
					      vim.g.startuptime_event_width = 0
 | 
				
			||||||
| 
						 | 
					@ -133,71 +122,86 @@ require('lze').load {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "fidget.nvim",
 | 
					    "fidget.nvim",
 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    -- keys = "",
 | 
					    -- keys = "",
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      require('fidget').setup({})
 | 
					      require('fidget').setup({})
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  -- {
 | 
					  {
 | 
				
			||||||
  --   "hlargs",
 | 
					    "toggleterm.nvim",
 | 
				
			||||||
  --   for_cat = 'general.extra',
 | 
					    for_cat = "always",
 | 
				
			||||||
  --   event = "DeferredUIEnter",
 | 
					    after = function(plugin)
 | 
				
			||||||
  --   -- keys = "",
 | 
					      require("toggleterm").setup({
 | 
				
			||||||
  --   dep_of = { "nvim-lspconfig" },
 | 
					        direction = "horizontal",
 | 
				
			||||||
  --   after = function(plugin)
 | 
					        insert_mappings = false,
 | 
				
			||||||
  --     require('hlargs').setup {
 | 
					        open_mapping = [[<c-\>]],
 | 
				
			||||||
  --       color = '#32a88f',
 | 
					        terminal_mappings = false,
 | 
				
			||||||
  --     }
 | 
					      })
 | 
				
			||||||
  --     vim.cmd([[hi clear @lsp.type.parameter]])
 | 
					
 | 
				
			||||||
  --     vim.cmd([[hi link @lsp.type.parameter Hlargs]])
 | 
					      local Terminal = require("toggleterm.terminal").Terminal
 | 
				
			||||||
  --   end,
 | 
					      Floatingterm = Terminal:new({
 | 
				
			||||||
  -- },
 | 
					        hidden = true,
 | 
				
			||||||
 | 
					        direction = "float",
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vim.keymap.set(
 | 
				
			||||||
 | 
					        "n",
 | 
				
			||||||
 | 
					        "<leader>s",
 | 
				
			||||||
 | 
					        function()
 | 
				
			||||||
 | 
					          Floatingterm:toggle()
 | 
				
			||||||
 | 
					        end,
 | 
				
			||||||
 | 
					        { desc = "toggle [S]cratch terminal", }
 | 
				
			||||||
 | 
					      )
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "lualine.nvim",
 | 
					    "lualine.nvim",
 | 
				
			||||||
    for_cat = 'general.always',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    -- cmd = { "" },
 | 
					    -- cmd = { "" },
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    -- ft = "",
 | 
					    -- ft = "",
 | 
				
			||||||
    -- keys = "",
 | 
					    -- keys = "",
 | 
				
			||||||
    -- colorscheme = "",
 | 
					    -- colorscheme = "",
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
 | 
					 | 
				
			||||||
      require('lualine').setup({
 | 
					      require('lualine').setup({
 | 
				
			||||||
        options = {
 | 
					        options = {
 | 
				
			||||||
          icons_enabled = false,
 | 
					          alwaysDivideMiddle = true,
 | 
				
			||||||
          theme = colorschemeName,
 | 
					          icons_enabled = true,
 | 
				
			||||||
          component_separators = '|',
 | 
					          component_separators = { left = '', right = '' },
 | 
				
			||||||
          section_separators = '',
 | 
					          section_separators = { left = '', right = '' },
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        sections = {
 | 
					 | 
				
			||||||
          lualine_c = {
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
              'filename', path = 1, status = true,
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        inactive_sections = {
 | 
					        inactive_sections = {
 | 
				
			||||||
          lualine_b = {
 | 
					          lualine_a = {},
 | 
				
			||||||
            {
 | 
					          lualine_b = {},
 | 
				
			||||||
              'filename', path = 3, status = true,
 | 
					          lualine_c = { "filename" },
 | 
				
			||||||
 | 
					          lualine_x = { "filetype" },
 | 
				
			||||||
 | 
					          lualine_y = {},
 | 
				
			||||||
 | 
					          lualine_z = {},
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
          },
 | 
					        sections = {
 | 
				
			||||||
          lualine_x = {'filetype'},
 | 
					          lualine_a = { "mode" },
 | 
				
			||||||
 | 
					          lualine_b = { "branch", "diff", "diagnostics" },
 | 
				
			||||||
 | 
					          lualine_c = { { "filename", path = 1 } },
 | 
				
			||||||
 | 
					          lualine_x = { "encoding", "fileformat", "filetype" },
 | 
				
			||||||
 | 
					          lualine_y = { "progress" },
 | 
				
			||||||
 | 
					          lualine_z = { "location" },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tabline = {
 | 
					        tabline = {
 | 
				
			||||||
          lualine_a = { 'buffers' },
 | 
					          lualine_a = { { "buffers", mode = 4 } },
 | 
				
			||||||
          -- if you use lualine-lsp-progress, I have mine here instead of fidget
 | 
					          lualine_b = {},
 | 
				
			||||||
          -- lualine_b = { 'lsp_progress', },
 | 
					          lualine_c = {},
 | 
				
			||||||
          lualine_z = { 'tabs' }
 | 
					          lualine_x = {},
 | 
				
			||||||
 | 
					          lualine_y = {},
 | 
				
			||||||
 | 
					          lualine_z = { { "tabs", mode = 2 } }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "gitsigns.nvim",
 | 
					    "gitsigns.nvim",
 | 
				
			||||||
    for_cat = 'general.always',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    -- cmd = { "" },
 | 
					    -- cmd = { "" },
 | 
				
			||||||
    -- ft = "",
 | 
					    -- ft = "",
 | 
				
			||||||
| 
						 | 
					@ -281,35 +285,80 @@ require('lze').load {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "which-key.nvim",
 | 
					    "which-key.nvim",
 | 
				
			||||||
    for_cat = 'general.extra',
 | 
					    for_cat = 'always',
 | 
				
			||||||
    -- cmd = { "" },
 | 
					 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					 | 
				
			||||||
    -- ft = "",
 | 
					 | 
				
			||||||
    -- keys = "",
 | 
					 | 
				
			||||||
    -- colorscheme = "",
 | 
					 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      require('which-key').setup({
 | 
					      require('which-key').setup({
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      require('which-key').add {
 | 
					      require('which-key').add {
 | 
				
			||||||
        { "<leader><leader>", group = "buffer commands" },
 | 
					 | 
				
			||||||
        { "<leader><leader>_", hidden = true },
 | 
					 | 
				
			||||||
        { "<leader>c", group = "[c]ode" },
 | 
					 | 
				
			||||||
        { "<leader>c_", hidden = true },
 | 
					 | 
				
			||||||
        { "<leader>d", group = "[d]ocument" },
 | 
					 | 
				
			||||||
        { "<leader>d_", hidden = true },
 | 
					 | 
				
			||||||
        { "<leader>g", group = "[g]it" },
 | 
					        { "<leader>g", group = "[g]it" },
 | 
				
			||||||
        { "<leader>g_", hidden = true },
 | 
					        { "<leader>gt", group = "[t]oggle" },
 | 
				
			||||||
        { "<leader>m", group = "[m]arkdown" },
 | 
					        { "<leader>m", group = "[m]arkdown" },
 | 
				
			||||||
        { "<leader>m_", hidden = true },
 | 
					        { "<leader>f", group = "[f]ind" },
 | 
				
			||||||
        { "<leader>r", group = "[r]ename" },
 | 
					        { "<leader>t", group = "[t]ree" },
 | 
				
			||||||
        { "<leader>r_", hidden = true },
 | 
					        { "<leader>c", group = "[c]heck" },
 | 
				
			||||||
        { "<leader>s", group = "[s]earch" },
 | 
					        { "<leader>l", group = "[l]sp" },
 | 
				
			||||||
        { "<leader>s_", hidden = true },
 | 
					        { "<leader>lw", group = "[l]sp [w]orkspace" },
 | 
				
			||||||
        { "<leader>t", group = "[t]oggles" },
 | 
					 | 
				
			||||||
        { "<leader>t_", hidden = true },
 | 
					 | 
				
			||||||
        { "<leader>w", group = "[w]orkspace" },
 | 
					 | 
				
			||||||
        { "<leader>w_", hidden = true },
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "nvim-tree.lua",
 | 
				
			||||||
 | 
					    for_cat = "tree",
 | 
				
			||||||
 | 
					    keys = {
 | 
				
			||||||
 | 
					      { "<leader>t", "<cmd>NvimTreeToggle<CR>", desc = "Toggle file tree", },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    after = function(plugin)
 | 
				
			||||||
 | 
					      require("nvim-tree").setup()
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    -- TODO: Replace toggle term and nvim-tree with snacks equivilants?
 | 
				
			||||||
 | 
					    -- Potentially checkout the lazygit module. Might even be able to replace
 | 
				
			||||||
 | 
					    -- telescope?
 | 
				
			||||||
 | 
					    -- if you do replace telescope, the picker module has a *ton* of interesting pickers, such as an undotree.
 | 
				
			||||||
 | 
					    "snacks.nvim",
 | 
				
			||||||
 | 
					    for_cat = "always",
 | 
				
			||||||
 | 
					    priority = 10,
 | 
				
			||||||
 | 
					    after = function()
 | 
				
			||||||
 | 
					      local Snacks = require("snacks")
 | 
				
			||||||
 | 
					      Snacks.setup({
 | 
				
			||||||
 | 
					        input = {},
 | 
				
			||||||
 | 
					        image = {},
 | 
				
			||||||
 | 
					        notifier = {},
 | 
				
			||||||
 | 
					        scroll = {},
 | 
				
			||||||
 | 
					        picker = {
 | 
				
			||||||
 | 
					          enabled = true,
 | 
				
			||||||
 | 
					          ui_select = true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        terminal = {},
 | 
				
			||||||
 | 
					        indent = {
 | 
				
			||||||
 | 
					          animate = { enabled = true },
 | 
				
			||||||
 | 
					          scope = { enabled = true },
 | 
				
			||||||
 | 
					          chunk = { enabled = true },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      -- setup rename autocmds
 | 
				
			||||||
 | 
					      local prev = { new_name = "", old_name = "" } -- Prevents duplicate events
 | 
				
			||||||
 | 
					      vim.api.nvim_create_autocmd("User", {
 | 
				
			||||||
 | 
					        pattern = "NvimTreeSetup",
 | 
				
			||||||
 | 
					        callback = function()
 | 
				
			||||||
 | 
					          local events = require("nvim-tree.api").events
 | 
				
			||||||
 | 
					          events.subscribe(events.Event.NodeRenamed, function(data)
 | 
				
			||||||
 | 
					            if prev.new_name ~= data.new_name or prev.old_name ~= data.old_name then
 | 
				
			||||||
 | 
					              data = data
 | 
				
			||||||
 | 
					              Snacks.rename.on_rename_file(data.old_name, data.new_name)
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end)
 | 
				
			||||||
 | 
					        end,
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      vim.api.nvim_create_autocmd("User", {
 | 
				
			||||||
 | 
					        pattern = "OilActionsPost",
 | 
				
			||||||
 | 
					        callback = function(event)
 | 
				
			||||||
 | 
					          if event.data.actions.type == "move" then
 | 
				
			||||||
 | 
					            Snacks.rename.on_rename_file(event.data.actions.src_url, event.data.actions.dest_url)
 | 
				
			||||||
 | 
					          end
 | 
				
			||||||
 | 
					        end,
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,7 +57,7 @@ end
 | 
				
			||||||
return {
 | 
					return {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "telescope.nvim",
 | 
					    "telescope.nvim",
 | 
				
			||||||
    for_cat = 'general.telescope',
 | 
					    for_cat = 'telescope',
 | 
				
			||||||
    cmd = { "Telescope", "LiveGrepGitRoot" },
 | 
					    cmd = { "Telescope", "LiveGrepGitRoot" },
 | 
				
			||||||
    -- NOTE: our on attach function defines keybinds that call telescope.
 | 
					    -- NOTE: our on attach function defines keybinds that call telescope.
 | 
				
			||||||
    -- so, the on_require handler will load telescope when we use those.
 | 
					    -- so, the on_require handler will load telescope when we use those.
 | 
				
			||||||
| 
						 | 
					@ -65,49 +65,37 @@ return {
 | 
				
			||||||
    -- event = "",
 | 
					    -- event = "",
 | 
				
			||||||
    -- ft = "",
 | 
					    -- ft = "",
 | 
				
			||||||
    keys = {
 | 
					    keys = {
 | 
				
			||||||
      { "<leader>sM", '<cmd>Telescope notify<CR>', mode = {"n"}, desc = '[S]earch [M]essage', },
 | 
					      { "<leader>fM", '<cmd>Telescope notify<CR>', mode = {"n"}, desc = '[F]ind [M]essage', },
 | 
				
			||||||
      { "<leader>sp",live_grep_git_root, mode = {"n"}, desc = '[S]earch git [P]roject root', },
 | 
					      { "<leader>fp",live_grep_git_root, mode = {"n"}, desc = '[F]ind git [P]roject root', },
 | 
				
			||||||
      { "<leader>/", function()
 | 
					      { "<leader>f/", function()
 | 
				
			||||||
        -- Slightly advanced example of overriding default behavior and theme
 | 
					 | 
				
			||||||
        -- You can pass additional configuration to telescope to change theme, layout, etc.
 | 
					 | 
				
			||||||
        require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
 | 
					 | 
				
			||||||
          winblend = 10,
 | 
					 | 
				
			||||||
          previewer = false,
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      end, mode = {"n"}, desc = '[/] Fuzzily search in current buffer', },
 | 
					 | 
				
			||||||
      { "<leader>s/", function()
 | 
					 | 
				
			||||||
        require('telescope.builtin').live_grep {
 | 
					        require('telescope.builtin').live_grep {
 | 
				
			||||||
          grep_open_files = true,
 | 
					          grep_open_files = true,
 | 
				
			||||||
          prompt_title = 'Live Grep in Open Files',
 | 
					          prompt_title = 'Live Grep in Open Files',
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      end, mode = {"n"}, desc = '[S]earch [/] in Open Files' },
 | 
					      end, mode = {"n"}, desc = '[F]ind [/] in Open Files' },
 | 
				
			||||||
      { "<leader><leader>s", function() return require('telescope.builtin').buffers() end, mode = {"n"}, desc = '[ ] Find existing buffers', },
 | 
					      { "<leader>fb", function() return require('telescope.builtin').buffers() end, mode = {"n"}, desc = '[F]ind [B]uffers', },
 | 
				
			||||||
      { "<leader>s.", function() return require('telescope.builtin').oldfiles() end, mode = {"n"}, desc = '[S]earch Recent Files ("." for repeat)', },
 | 
					      { "<leader>fr", function() return require('telescope.builtin').resume() end, mode = {"n"}, desc = '[F]ind [R]esume', },
 | 
				
			||||||
      { "<leader>sr", function() return require('telescope.builtin').resume() end, mode = {"n"}, desc = '[S]earch [R]esume', },
 | 
					      { "<leader>fd", function() return require('telescope.builtin').diagnostics() end, mode = {"n"}, desc = '[F]ind [D]iagnostics', },
 | 
				
			||||||
      { "<leader>sd", function() return require('telescope.builtin').diagnostics() end, mode = {"n"}, desc = '[S]earch [D]iagnostics', },
 | 
					      { "<leader>fg", function() return require('telescope.builtin').live_grep() end, mode = {"n"}, desc = '[F]ind by [G]rep', },
 | 
				
			||||||
      { "<leader>sg", function() return require('telescope.builtin').live_grep() end, mode = {"n"}, desc = '[S]earch by [G]rep', },
 | 
					      { "<leader>fs", function() return require('telescope.builtin').builtin() end, mode = {"n"}, desc = '[F]ind [S]elect Telescope', },
 | 
				
			||||||
      { "<leader>sw", function() return require('telescope.builtin').grep_string() end, mode = {"n"}, desc = '[S]earch current [W]ord', },
 | 
					      { "<leader>ff", function() return require('telescope.builtin').find_files() end, mode = {"n"}, desc = '[F]ind [F]iles', },
 | 
				
			||||||
      { "<leader>ss", function() return require('telescope.builtin').builtin() end, mode = {"n"}, desc = '[S]earch [S]elect Telescope', },
 | 
					      { "<leader>fk", function() return require('telescope.builtin').keymaps() end, mode = {"n"}, desc = '[F]ind [K]eymaps', },
 | 
				
			||||||
      { "<leader>sf", function() return require('telescope.builtin').find_files() end, mode = {"n"}, desc = '[S]earch [F]iles', },
 | 
					      { "<leader>fh", function() return require('telescope.builtin').help_tags() end, mode = {"n"}, desc = '[F]ind [H]elp', },
 | 
				
			||||||
      { "<leader>sk", function() return require('telescope.builtin').keymaps() end, mode = {"n"}, desc = '[S]earch [K]eymaps', },
 | 
					      { "<leader>fz", function() require("telescope").extensions.zoxide.list() end, mode = {"n"}, desc = '[F]ind [Z]oxide',},
 | 
				
			||||||
      { "<leader>sh", function() return require('telescope.builtin').help_tags() end, mode = {"n"}, desc = '[S]earch [H]elp', },
 | 
					      { "<leader>fi", function() require("telescope").extensions.file_browser.file_browser() end, mode={"n"}, desc = '[F]ind [I]nteractive file browser',},
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    -- colorscheme = "",
 | 
					 | 
				
			||||||
    load = function (name)
 | 
					    load = function (name)
 | 
				
			||||||
        vim.cmd.packadd(name)
 | 
					        vim.cmd.packadd(name)
 | 
				
			||||||
        vim.cmd.packadd("telescope-fzf-native.nvim")
 | 
					 | 
				
			||||||
        vim.cmd.packadd("telescope-ui-select.nvim")
 | 
					        vim.cmd.packadd("telescope-ui-select.nvim")
 | 
				
			||||||
 | 
					        vim.cmd.packadd("telescope-file-browser.nvim")
 | 
				
			||||||
 | 
					        vim.cmd.packadd("telescope-zoxide")
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
    after = function (plugin)
 | 
					    after = function (plugin)
 | 
				
			||||||
      require('telescope').setup {
 | 
					      local telescope = require("telescope")
 | 
				
			||||||
 | 
					      telescope.setup {
 | 
				
			||||||
        -- You can put your default mappings / updates / etc. in here
 | 
					        -- You can put your default mappings / updates / etc. in here
 | 
				
			||||||
        --  All the info you're looking for is in `:help telescope.setup()`
 | 
					        --  All the info you're looking for is in `:help telescope.setup()`
 | 
				
			||||||
        --
 | 
					        --
 | 
				
			||||||
        defaults = {
 | 
					 | 
				
			||||||
          mappings = {
 | 
					 | 
				
			||||||
            i = { ['<c-enter>'] = 'to_fuzzy_refine' },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        -- pickers = {}
 | 
					        -- pickers = {}
 | 
				
			||||||
        extensions = {
 | 
					        extensions = {
 | 
				
			||||||
          ['ui-select'] = {
 | 
					          ['ui-select'] = {
 | 
				
			||||||
| 
						 | 
					@ -117,8 +105,9 @@ return {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      -- Enable telescope extensions, if they are installed
 | 
					      -- Enable telescope extensions, if they are installed
 | 
				
			||||||
      pcall(require('telescope').load_extension, 'fzf')
 | 
					      telescope.load_extension('ui-select')
 | 
				
			||||||
      pcall(require('telescope').load_extension, 'ui-select')
 | 
					      telescope.load_extension('zoxide')
 | 
				
			||||||
 | 
					      telescope.load_extension('file_browser')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {})
 | 
					      vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {})
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@
 | 
				
			||||||
return {
 | 
					return {
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    "nvim-treesitter",
 | 
					    "nvim-treesitter",
 | 
				
			||||||
    for_cat = 'general.treesitter',
 | 
					    for_cat = 'treesitter',
 | 
				
			||||||
    -- cmd = { "" },
 | 
					    -- cmd = { "" },
 | 
				
			||||||
    event = "DeferredUIEnter",
 | 
					    event = "DeferredUIEnter",
 | 
				
			||||||
    -- ft = "",
 | 
					    -- ft = "",
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,7 @@ return {
 | 
				
			||||||
    -- colorscheme = "",
 | 
					    -- colorscheme = "",
 | 
				
			||||||
    load = function(name)
 | 
					    load = function(name)
 | 
				
			||||||
      vim.cmd.packadd(name)
 | 
					      vim.cmd.packadd(name)
 | 
				
			||||||
        vim.cmd.packadd("nvim-treesitter-textobjects")
 | 
					      vim.cmd.packadd("rainbow-delimiters.nvim")
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
    after = function(plugin)
 | 
					    after = function(plugin)
 | 
				
			||||||
      -- [[ Configure Treesitter ]]
 | 
					      -- [[ Configure Treesitter ]]
 | 
				
			||||||
| 
						 | 
					@ -28,51 +28,29 @@ return {
 | 
				
			||||||
            node_decremental = '<M-space>',
 | 
					            node_decremental = '<M-space>',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        textobjects = {
 | 
					 | 
				
			||||||
          select = {
 | 
					 | 
				
			||||||
            enable = true,
 | 
					 | 
				
			||||||
            lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
 | 
					 | 
				
			||||||
            keymaps = {
 | 
					 | 
				
			||||||
              -- You can use the capture groups defined in textobjects.scm
 | 
					 | 
				
			||||||
              ['aa'] = '@parameter.outer',
 | 
					 | 
				
			||||||
              ['ia'] = '@parameter.inner',
 | 
					 | 
				
			||||||
              ['af'] = '@function.outer',
 | 
					 | 
				
			||||||
              ['if'] = '@function.inner',
 | 
					 | 
				
			||||||
              ['ac'] = '@class.outer',
 | 
					 | 
				
			||||||
              ['ic'] = '@class.inner',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          move = {
 | 
					 | 
				
			||||||
            enable = true,
 | 
					 | 
				
			||||||
            set_jumps = true, -- whether to set jumps in the jumplist
 | 
					 | 
				
			||||||
            goto_next_start = {
 | 
					 | 
				
			||||||
              [']m'] = '@function.outer',
 | 
					 | 
				
			||||||
              [']]'] = '@class.outer',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            goto_next_end = {
 | 
					 | 
				
			||||||
              [']M'] = '@function.outer',
 | 
					 | 
				
			||||||
              [']['] = '@class.outer',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            goto_previous_start = {
 | 
					 | 
				
			||||||
              ['[m'] = '@function.outer',
 | 
					 | 
				
			||||||
              ['[['] = '@class.outer',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            goto_previous_end = {
 | 
					 | 
				
			||||||
              ['[M'] = '@function.outer',
 | 
					 | 
				
			||||||
              ['[]'] = '@class.outer',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          swap = {
 | 
					 | 
				
			||||||
            enable = true,
 | 
					 | 
				
			||||||
            swap_next = {
 | 
					 | 
				
			||||||
              ['<leader>a'] = '@parameter.inner',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            swap_previous = {
 | 
					 | 
				
			||||||
              ['<leader>A'] = '@parameter.inner',
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    end,
 | 
					    end,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "comment.nvim",
 | 
				
			||||||
 | 
					    for_cat = 'telescope',
 | 
				
			||||||
 | 
					    after = function(plugin)
 | 
				
			||||||
 | 
					      require('Comment').setup()
 | 
				
			||||||
 | 
					    end,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "nvim-treesitter-context",
 | 
				
			||||||
 | 
					    for_cat = 'treesitter',
 | 
				
			||||||
 | 
					    keys = { { "<leader>x", "<cmd>TsContext toggle<CR>", mode = { "n" }, desc = "Toggle Context" }, },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    "treesj",
 | 
				
			||||||
 | 
					    for_cat = 'treesitter',
 | 
				
			||||||
 | 
					    keys = { { "<leader>j", "<cmd>TSJToggle<CR>", mode = { "n" }, desc = "Treesitter join" }, },
 | 
				
			||||||
 | 
					    after = function(_)
 | 
				
			||||||
 | 
					      require("treesj").setup({
 | 
				
			||||||
 | 
					        use_default_keymaps = false
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue