diff --git a/home-manager/common/software/cli/nixvim/base.nix b/home-manager/common/software/cli/nixvim/base.nix index ebd4f795..14fd22f9 100644 --- a/home-manager/common/software/cli/nixvim/base.nix +++ b/home-manager/common/software/cli/nixvim/base.nix @@ -68,26 +68,28 @@ (nmap "Tt" ":ToggleTerm" // desc "[T]oggle Terminal") (nmap "Ts" ":TermSelect" // desc "[S]elect a terminal") # Fugitive - (nmap "gc" ":Git cam \"" // desc "[C]ommit" ) - (nmap "gp" ":Git push" // desc "Git [p]ush") - (nmap "gP" ":Git pull" // desc "[P]ull") - (nmap "ga" ":Git add " // desc "[A]dd file...") + (nmap "gc" ":Git cam \"" // desc "[C]ommit" ) + (nmap "gp" ":Git push" // desc "Git [p]ush") + (nmap "gP" ":Git pull" // desc "[P]ull") + (nmap "ga" ":Git add " // desc "[A]dd file...") (nmap "gb" ":Git blame" // desc "[B]lame") - + (nmap "gd" ":Git diff" // desc "[D]iff") # Trouble + (nmap "tf" ":Trouble" // desc "[F]ocus") (nmap "tt" ":TroubleToggle" // desc "[T]oggle") - (nmap "tc" ":TroubleClose" // desc "[C]lose") - + (nmap "tc" ":TroubleClose" // desc "[C]lose") + # Navbuddy + (nmap "N" ":Navbuddy" // desc "[N]avbuddy") # Window Management - (nmap "wh" ":wincmd h" // desc "Move left") - (nmap "wl" ":wincmd l" // desc "Move right") - (nmap "wj" ":wincmd j" // desc "Move down") - (nmap "wk" ":wincmd k" // desc "Move up") - (nmap "wn" ":wincmd w" // desc "Move to next") - (nmap "wN" ":wincmd p" // desc "Move to previous") - (nmap "wc" ":wincmd c" // desc "[C]lose active window") - (nmap "woh" ":wincmd n" // desc "Open [H]orizontal window") - (nmap "wov" ":wincmd v" // desc "Open [V]ertical window") + (nmap "wh" ":wincmd h" // desc "Move left") + (nmap "wl" ":wincmd l" // desc "Move right") + (nmap "wj" ":wincmd j" // desc "Move down") + (nmap "wk" ":wincmd k" // desc "Move up") + (nmap "wn" ":wincmd w" // desc "Move to next") + (nmap "wN" ":wincmd p" // desc "Move to previous") + (nmap "wc" ":wincmd c" // desc "[C]lose active window") + (nmap "woh" ":wincmd n" // desc "Open [H]orizontal window") + (nmap "wov" ":wincmd v" // desc "Open [V]ertical window") # resize window (nmap "wrh" ":resize " // desc "Resize Horizontal") (nmap "wrv" ":vertical resize " // desc "Resize Vertical") @@ -105,48 +107,64 @@ ]; plugins = { - # Multicursor support - multicursors.enable = true; - # auto bracket completion - nvim-autopairs.enable = true; - # Parser generator tool - treesitter.enable = true; - # Snippet engine for neovim - luasnip.enable = true; - # winbar that uses nvim-navic in order to get LSP context from your language server. - barbecue.enable = true; - # Nix language syntax highlighting / file type associations - nix.enable = true; - # Run nix develop / shell without exiting vim - nix-develop.enable = true; - # tab bar like Firefox or Chrome - bufferline.enable = true; - # Automatic indent - intellitab.enable = true; - # Highlight all entries of the currently selected word - illuminate.enable = true; - # sidebar file browser - nvim-tree.enable = true; + # Git related # Gutter information for git modifications gitsigns.enable = true; - # Terminal in vim - toggleterm.enable = true; + # git plugin for vim + fugitive.enable = true; + + # pretty stuff # Rainbow matching {} [] () 's rainbow-delimiters.enable = true; # Colorize hex colors inline nvim-colorizer.enable = true; - # git plugin for vim - fugitive.enable = true; - # Alerts / CodActions - trouble.enable = true; + + # Nix related + # Nix language syntax highlighting / file type associations + nix.enable = true; + # Run nix develop / shell without exiting vim + nix-develop.enable = true; + + # Efficiency + # Multicursor support + multicursors.enable = true; + # auto bracket completion + nvim-autopairs.enable = true; # Indentation guides indent-blankline.enable = true; # Surround text blocks surround.enable = true; - # cmp + # Automatic indent + intellitab.enable = true; + # Code navigation + navbuddy.enable = true; + navbuddy.lsp.autoAttach = true; + + # Layout Related + # winbar that uses nvim-navic in order to get LSP context from your language server. + barbecue.enable = true; + # tab bar like Firefox or Chrome + bufferline.enable = true; + # sidebar file browser + nvim-tree.enable = true; + # Terminal in vim + toggleterm.enable = true; + # Alerts / CodeActions + trouble.enable = true; + + # Code Related + # Parser generator tool + treesitter.enable = true; + # Snippet engine for neovim + luasnip.enable = true; + cmp_luasnip.enable = true; + # CMP Addons cmp-buffer.enable = true; cmp-path.enable = true; cmp-nvim-lsp.enable = true; + cmp-nvim-lsp-document-symbol.enable = true; + cmp-nvim-lsp-signature-help.enable = true; + # List of linters for nixvim lint = { @@ -167,7 +185,6 @@ }; }; - # Popup to show shortcuts which-key = { enable = true; @@ -268,10 +285,34 @@ }; sources = [ { name = "nvim_lua"; } - { name = "nvim_llsp"; } - { name = "path"; } - { name = "buffer"; } + { name = "nvim_lsp"; } + { name = "nvim_lsp_signature_help"; } + { name = "calc"; } + { name = "path"; } + { name = "buffer"; } + { name = "luasnip"; } ]; + snippet.expand = "luasnip"; + window = { + completion.border = "rounded"; + documentation.border = "rounded"; + }; + formatting = { + fields = [ "menu" "abbr" "kind" ]; + # https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/ + format = '' + function(entry, item) + local menu_icon ={ + nvim_lsp = 'λ', + luasnip = '⋗', + buffer = 'Ω', + path = '🖫', + } + item.menu = menu_icon[entry.source.name] + return item + end, + ''; + }; }; }; diff --git a/home-manager/common/software/cli/starship.nix b/home-manager/common/software/cli/starship.nix index 8ead493b..6647babc 100644 --- a/home-manager/common/software/cli/starship.nix +++ b/home-manager/common/software/cli/starship.nix @@ -95,6 +95,12 @@ in format = "[ $status]($style)"; disabled = false; }; + + rust = { + disabled = false; + format = "[ via $symbol($version )]($style)"; + style = "fg:${statusFG} bg:${statusBG}"; + }; time = { disabled = false;