Update vim
This commit is contained in:
parent
745bda462e
commit
d8663a36d8
2 changed files with 96 additions and 49 deletions
|
@ -68,26 +68,28 @@
|
|||
(nmap "<leader>Tt" ":ToggleTerm<CR>" // desc "[T]oggle Terminal")
|
||||
(nmap "<leader>Ts" ":TermSelect<CR>" // desc "[S]elect a terminal")
|
||||
# Fugitive
|
||||
(nmap "<leader>gc" ":Git cam \"" // desc "[C]ommit" )
|
||||
(nmap "<leader>gp" ":Git push<CR>" // desc "Git [p]ush")
|
||||
(nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull")
|
||||
(nmap "<leader>ga" ":Git add " // desc "[A]dd file...")
|
||||
(nmap "<leader>gc" ":Git cam \"" // desc "[C]ommit" )
|
||||
(nmap "<leader>gp" ":Git push<CR>" // desc "Git [p]ush")
|
||||
(nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull")
|
||||
(nmap "<leader>ga" ":Git add " // desc "[A]dd file...")
|
||||
(nmap "<leader>gb" ":Git blame<CR>" // desc "[B]lame")
|
||||
|
||||
(nmap "<leader>gd" ":Git diff<CR>" // desc "[D]iff")
|
||||
# Trouble
|
||||
(nmap "<leader>tf" ":Trouble<CR>" // desc "[F]ocus")
|
||||
(nmap "<leader>tt" ":TroubleToggle<CR>" // desc "[T]oggle")
|
||||
(nmap "<leader>tc" ":TroubleClose<CR>" // desc "[C]lose")
|
||||
|
||||
(nmap "<leader>tc" ":TroubleClose<CR>" // desc "[C]lose")
|
||||
# Navbuddy
|
||||
(nmap "<leader>N" ":Navbuddy<CR>" // desc "[N]avbuddy")
|
||||
# Window Management
|
||||
(nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left")
|
||||
(nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right")
|
||||
(nmap "<leader>wj" ":wincmd j<CR>" // desc "Move down")
|
||||
(nmap "<leader>wk" ":wincmd k<CR>" // desc "Move up")
|
||||
(nmap "<leader>wn" ":wincmd w<CR>" // desc "Move to next")
|
||||
(nmap "<leader>wN" ":wincmd p<CR>" // desc "Move to previous")
|
||||
(nmap "<leader>wc" ":wincmd c<CR>" // desc "[C]lose active window")
|
||||
(nmap "<leader>woh" ":wincmd n<CR>" // desc "Open [H]orizontal window")
|
||||
(nmap "<leader>wov" ":wincmd v<CR>" // desc "Open [V]ertical window")
|
||||
(nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left")
|
||||
(nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right")
|
||||
(nmap "<leader>wj" ":wincmd j<CR>" // desc "Move down")
|
||||
(nmap "<leader>wk" ":wincmd k<CR>" // desc "Move up")
|
||||
(nmap "<leader>wn" ":wincmd w<CR>" // desc "Move to next")
|
||||
(nmap "<leader>wN" ":wincmd p<CR>" // desc "Move to previous")
|
||||
(nmap "<leader>wc" ":wincmd c<CR>" // desc "[C]lose active window")
|
||||
(nmap "<leader>woh" ":wincmd n<CR>" // desc "Open [H]orizontal window")
|
||||
(nmap "<leader>wov" ":wincmd v<CR>" // desc "Open [V]ertical window")
|
||||
# resize window
|
||||
(nmap "<leader>wrh" ":resize " // desc "Resize Horizontal")
|
||||
(nmap "<leader>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,
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -96,6 +96,12 @@ in
|
|||
disabled = false;
|
||||
};
|
||||
|
||||
rust = {
|
||||
disabled = false;
|
||||
format = "[ via $symbol($version )]($style)";
|
||||
style = "fg:${statusFG} bg:${statusBG}";
|
||||
};
|
||||
|
||||
time = {
|
||||
disabled = false;
|
||||
time_format = "%R"; # Hour:Minute Format
|
||||
|
|
Loading…
Reference in a new issue