adding vim or something
This commit is contained in:
62
modules/features/vim/vimrc
Normal file
62
modules/features/vim/vimrc
Normal file
@@ -0,0 +1,62 @@
|
||||
" Set colorscheme and enable highlighting
|
||||
colorscheme catppuccin
|
||||
set termguicolors
|
||||
syntax on
|
||||
|
||||
" Set tab stuff
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
set softtabstop=2
|
||||
|
||||
" Enable line numbers
|
||||
set number
|
||||
set relativenumber
|
||||
set cursorline
|
||||
" Make cursorlinenum a different color
|
||||
augroup colorAutoCmds
|
||||
autocmd!
|
||||
autocmd ColorScheme * highlight CursorLineNr cterm=bold guifg=#cba6f7
|
||||
augroup END
|
||||
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set hlsearch
|
||||
set incsearch
|
||||
|
||||
" Set different cursor shapes depending on mode
|
||||
let &t_SI = "\e[6 q"
|
||||
let &t_EI = "\e[2 q"
|
||||
augroup cursorCmds
|
||||
au!
|
||||
autocmd VimEnter * silent !echo -ne "\e[2 q"
|
||||
augroup END
|
||||
|
||||
" 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>"
|
||||
|
||||
set omnifunc=ale#completion#OmniFunc
|
||||
nnoremap K <cmd>ALEHover<CR>
|
||||
nnoremap <leader>gd <cmd>ALEGoToDefinition<CR>
|
||||
nnoremap <leader>gr <cmd>ALEFindReferences<CR>
|
||||
nnoremap <leader>ca <cmd>ALECodeAc
|
||||
let g:ale_completion_enabled = 1
|
||||
|
||||
autocmd User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'nixd',
|
||||
\ 'cmd': ['nixd'],
|
||||
\ 'allowlist': ['nix'],
|
||||
\ })
|
||||
|
||||
let g:ale_linters = {
|
||||
\ 'nix': ['nixd'],
|
||||
\}
|
||||
|
||||
let g:ale_fixers = {
|
||||
\ 'nix': ['alejandra'],
|
||||
\}
|
||||
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
Reference in New Issue
Block a user