nixos-configs/common/home/neovim/base.vim

35 lines
966 B
VimL
Raw Normal View History

" by default, the indent is 2 spaces.
set smartindent
set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=2
" for html/rb files, 2 spaces
autocmd Filetype html setlocal ts=2 sw=2 expandtab
autocmd Filetype ruby setlocal ts=2 sw=2 expandtab
" for js/coffee/jade files, 4 spaces
autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 expandtab
2023-12-22 03:06:15 -05:00
autocmd Filetype typescript setlocal ts=4 sw=4 sts=0 expandtab
autocmd Filetype java setlocal ts=4 sw=4 sts=0 expandtab
autocmd Filetype sh setlocal ts=4 sw=4 sts=0 expandtab
autocmd Filetype hyprlang setlocal ts=4 sw=4 sts=0 expandtab
" support scss @
autocmd FileType scss setl iskeyword+=@-@
set number
set relativenumber
2024-01-04 03:39:14 -05:00
" TODO: make this work for nix-on-droid
set undofile
set undodir=/home/matt/.cache/nvim/
" remove highlight on words
nnoremap <silent> <esc> :noh<cr><esc>
2023-12-13 23:23:39 -05:00
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved
set signcolumn=yes