summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorZofia Szweda <sophies@disroot.org>2026-09-12 12:27:32 +0200
committerZofia Szweda <sophies@disroot.org>2026-09-12 12:27:32 +0200
commita2f848cc9c5c0bc9fb32cef1a7a8a4d2be462a54 (patch)
tree3c68526df0ae231a49f9b1b6e3e0b5021d1cc85a /vim
parent8680ba2e9c2e7da59df9ce78cd0b146a9ed299f5 (diff)
vim: move from eslint + ts-language-server to an oxlint-based webdev setup
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc17
1 files changed, 14 insertions, 3 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 73a67e3..58ab2a3 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -66,16 +66,25 @@ nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
inoremap <silent> <Esc> <Esc>l
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
"let
+function! Oxlint_fix(buffer) abort
+ return {
+ \ 'command': 'oxlint --fix --stdin --stdin-filename %s < %t'
+ \}
+endfunction
+execute ale#fix#registry#Add('oxlint', 'Oxlint_fix', ['javascript', 'typescript'], 'oxlint')
let g:ale_linters = {
\'vim': ['vint'],
\'css': ['stylelint'],
\'html': ['tidy', 'htmlhint'],
- \'js': ['eslint'],
+ \'javascript': [],
+ \'typescript': [],
\'go': ['golangci-lint'],
\'markdown': [],
\}
let g:ale_fixers = {
\'html': ['tidy'],
+ \'javascript': ['oxlint'],
+ \'typescript': ['oxlint'],
\}
let g:ale_html_tidy_options = '-indent -asxhtml -q '
let g:ale_sign_column_always = 1
@@ -106,16 +115,18 @@ autocmd User LspSetup call LspOptionsSet(#{
\ autoComplete: v:true,
\ autoHighlightDiags: v:true,
\ noNewlineCompletion: v:true,
+ \ showDiagInPopup: v:true,
\ formatFallback: v:false,
\ })
autocmd User LspSetup call LspAddServer([
- \ #{name: 'hs', filetype: ['hs', 'lhs'], path: 'haskell-language-server-wrapper'},
+ \ #{name: 'hs', filetype: ['haskell', 'lhaskell'], path: 'haskell-language-server-wrapper'},
\ #{name: 'pylsp', filetype: 'python', path: 'pylsp'},
\ #{name: 'clangd', filetype: ['c', 'cpp', 'objc', 'objcpp'], path: 'clangd', args: ['--background-index']},
\ #{name: 'html', filetype: 'html', path: 'vscode-html-language-server', args: ['--stdio']},
\ #{name: 'css', filetype: ['css', 'scss', 'less'], path: 'vscode-css-language-server', args: ['--stdio']},
- \ #{name: 'js', filetype: ['ts', 'js', 'jsx'], path: 'typescript-language-server', args: []},
+ \ #{name: 'ts', filetype: ['typescript', 'javascript', 'javascriptreact', 'typescriptreact'], path: 'typescript-language-server', args: ['--stdio']},
+ \ #{name: 'oxlint', filetype: ['typescript', 'javascript', 'javascriptreact', 'typescriptreact'], path: 'oxlint', args: ['--lsp']},
\ #{name: 'vim', filetype: 'vim', path: 'vim-language-server', args: ['--stdio']},
\ #{name: 'go', filetype: 'go', path: 'gopls', args: ['--stdio']},
\ #{name: 'zk', filetype: 'markdown', path: 'zk', args: ['lsp']},