summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorZofia Szweda <sophies@disroot.org>2026-09-08 16:05:21 +0200
committerZofia Szweda <sophies@disroot.org>2026-09-08 16:05:48 +0200
commitcbe5d41992473b75f483560ed294013528c6a7b3 (patch)
treeef1157ddc76586a3ad4a9238002f50356675a4f2 /vim/.vimrc
parent808e03971883fbc8a372bb32f88a82fecf6a901c (diff)
vim: add linting for css, html and js [stylelint, htmlhint, eslint]
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc12
1 files changed, 9 insertions, 3 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 7ee6530..496a87f 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -31,7 +31,7 @@ set fileformat=unix
set encoding=UTF-8
set number
set nowrap
-set rnu
+set relativenumber
set expandtab
set tabstop=4
set shiftwidth=4
@@ -61,9 +61,13 @@ inoremap <silent> <Esc> <Esc>l
nnoremap <nowait> y w
nnoremap <leader>c "+y
vnoremap <leader>c "+y
-autocmd FileType html,css EmmetInstall
"let
-let g:ale_linters = {'vim': ['vint']}
+let g:ale_linters = {
+ \'vim': ['vint'],
+ \'css': ['stylelint'],
+ \'html': ['htmlhint'],
+ \'js': ['eslint']
+ \}
let g:ale_sign_column_always = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_lint_on_save = 1
@@ -87,6 +91,7 @@ let g:which_key_map.b = {
\ }
call which_key#register('<Space>', 'g:which_key_map')
" lsp
+augroup lsp
autocmd User LspSetup call LspOptionsSet(#{
\ autoComplete: v:true,
\ autoHighlightDiags: v:true,
@@ -120,6 +125,7 @@ function! s:lsp_keymaps() abort
autocmd BufWritePre <buffer> LspFormat
endif
endfunction
+augroup END
function! s:prettier_format() abort
if !executable('prettier')
return