Configuring vim
This commit is contained in:
2 files changed
+46
-2
No files matched your search
@@ -6,7 +6,51 @@
|
|||||||
kitty tmux
|
kitty tmux
|
||||||
|
|
||||||
# Text Editor
|
# 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
|
# Building Tools
|
||||||
pkg-config meson
|
pkg-config meson
|
||||||
|
|||||||
Reference in new issue
Block a user