diff options
Diffstat (limited to 'vim/.vimrc')
| -rw-r--r-- | vim/.vimrc | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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']}, |
