Configuring vim

This commit is contained in:
metallaxis committed 2026-11-04 16:00:25 +02:00
1 parent 0f4feabf1d
commit c373bca077
2 files changed
+46 -2

No files matched your search

+1 -1
View File
@@ -98,4 +98,4 @@
};
};
};
}
}
+45 -1
View File
@@ -6,7 +6,51 @@
kitty tmux
# Text Editor
vim
((vim-full.override { }).customize{
name = "vim";
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
start = [
vim-nix # Essential syntax highlighting and indents for Nix files
rust-vim # Official Rust plugin for detection, syntax, and formatting
vim-lsp # Lightweight Language Server Protocol client for C/C++ and Rust autocomplete
vim-lsp-settings # Automatically configures LSPs (like clangd and rust-analyzer)
asyncomplete-vim # Required to give you popup auto-complete menus for vim-lsp
asyncomplete-lsp-vim
vim-lastplace # Reopens files at your last edit position
];
opt = [];
};
vimrcConfig.customRC = ''
" Basic Defaults
set nocompatible
set backspace=indent,eol,start
" Enable line numbers
set number
set relativenumber
" Indentation rules
set tabstop=4
set shiftwidth=4
set expandtab
" Better searching
set hlsearch
set incsearch
set ignorecase
set smartcase
" Enable syntax highlighting and mouse support
syntax on
set mouse=a
" LSP Configuration (Tab to navigate completion menu)
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() . "\<cr>" : "\<cr>"
'';
})
# Building Tools
pkg-config meson