Update vim

This commit is contained in:
albert 2024-04-01 12:38:00 +09:00
parent 745bda462e
commit d8663a36d8
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
2 changed files with 96 additions and 49 deletions

View file

@ -73,11 +73,13 @@
(nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull") (nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull")
(nmap "<leader>ga" ":Git add " // desc "[A]dd file...") (nmap "<leader>ga" ":Git add " // desc "[A]dd file...")
(nmap "<leader>gb" ":Git blame<CR>" // desc "[B]lame") (nmap "<leader>gb" ":Git blame<CR>" // desc "[B]lame")
(nmap "<leader>gd" ":Git diff<CR>" // desc "[D]iff")
# Trouble # Trouble
(nmap "<leader>tf" ":Trouble<CR>" // desc "[F]ocus")
(nmap "<leader>tt" ":TroubleToggle<CR>" // desc "[T]oggle") (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 # Window Management
(nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left") (nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left")
(nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right") (nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right")
@ -105,48 +107,64 @@
]; ];
plugins = { plugins = {
# Multicursor support # Git related
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;
# Gutter information for git modifications # Gutter information for git modifications
gitsigns.enable = true; gitsigns.enable = true;
# Terminal in vim # git plugin for vim
toggleterm.enable = true; fugitive.enable = true;
# pretty stuff
# Rainbow matching {} [] () 's # Rainbow matching {} [] () 's
rainbow-delimiters.enable = true; rainbow-delimiters.enable = true;
# Colorize hex colors inline # Colorize hex colors inline
nvim-colorizer.enable = true; nvim-colorizer.enable = true;
# git plugin for vim
fugitive.enable = true; # Nix related
# Alerts / CodActions # Nix language syntax highlighting / file type associations
trouble.enable = true; 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 # Indentation guides
indent-blankline.enable = true; indent-blankline.enable = true;
# Surround text blocks # Surround text blocks
surround.enable = true; 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-buffer.enable = true;
cmp-path.enable = true; cmp-path.enable = true;
cmp-nvim-lsp.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 # List of linters for nixvim
lint = { lint = {
@ -167,7 +185,6 @@
}; };
}; };
# Popup to show shortcuts # Popup to show shortcuts
which-key = { which-key = {
enable = true; enable = true;
@ -268,10 +285,34 @@
}; };
sources = [ sources = [
{ name = "nvim_lua"; } { name = "nvim_lua"; }
{ name = "nvim_llsp"; } { name = "nvim_lsp"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "calc"; }
{ name = "path"; } { name = "path"; }
{ name = "buffer"; } { 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,
'';
};
}; };
}; };

View file

@ -96,6 +96,12 @@ in
disabled = false; disabled = false;
}; };
rust = {
disabled = false;
format = "[ via $symbol($version )]($style)";
style = "fg:${statusFG} bg:${statusBG}";
};
time = { time = {
disabled = false; disabled = false;
time_format = "%R"; # Hour:Minute Format time_format = "%R"; # Hour:Minute Format