Compare commits

...

8 Commits

Author SHA1 Message Date
913e4e88d4
update language-client config 2024-06-22 23:16:23 +02:00
69446e5a1e
add jsonnet lsp config 2024-06-22 23:16:04 +02:00
a77f8c0e28
add vale as markdown linter 2024-06-22 23:15:40 +02:00
cfd2f9f786
improve python lsp config 2024-06-22 23:15:05 +02:00
7db485bfaa
improve rust lsp config 2024-06-22 23:14:37 +02:00
a4ac2e3d6d
fix: do not trigger sql autocomp 2024-06-22 23:13:41 +02:00
1a312c5d4c
update deps 2024-06-22 23:13:06 +02:00
3fb065daab
update copilot.vim 2024-06-22 23:10:06 +02:00
7 changed files with 39 additions and 10 deletions

View File

@ -9,13 +9,13 @@ let g:ale_sign_warning = '~>'
let g:ale_elixir_elixir_ls_release = '/usr/lib/elixir-ls/' let g:ale_elixir_elixir_ls_release = '/usr/lib/elixir-ls/'
let g:ale_java_javalsp_executable = '/usr/bin/java-language-server' let g:ale_java_javalsp_executable = '/usr/bin/java-language-server'
"\ 'rust': ['rust-analyzer'],
let g:ale_linters = { let g:ale_linters = {
\ 'javascript': ['eslint'], \ 'javascript': ['eslint'],
\ 'javascriptreact': ['eslint'], \ 'javascriptreact': ['eslint'],
\ 'typescript': ['tsserver', 'tslint'], \ 'typescript': ['tsserver', 'tslint'],
\ 'typescriptreact': ['tsserver', 'tslint'], \ 'typescriptreact': ['tsserver', 'tslint'],
\ 'python': ['pyright'], \ 'python': ['pyright'],
\ 'rust': ['rust-analyzer'],
\ 'elixir': ['elixir-ls'], \ 'elixir': ['elixir-ls'],
\ 'go': ['gopls'], \ 'go': ['gopls'],
\ 'json': ['jsonlint'], \ 'json': ['jsonlint'],
@ -27,6 +27,7 @@ let g:ale_linters = {
\ 'promql': ['promql-langserver'], \ 'promql': ['promql-langserver'],
\ 'java': ['javalsp'], \ 'java': ['javalsp'],
\ 'ps1': ['powershell'], \ 'ps1': ['powershell'],
\ 'markdown': ['vale'],
\} \}
let g:ale_fixers = { let g:ale_fixers = {
@ -35,20 +36,22 @@ let g:ale_fixers = {
\ 'javascriptreact': ['prettier'], \ 'javascriptreact': ['prettier'],
\ 'typescriptreact': ['prettier'], \ 'typescriptreact': ['prettier'],
\ 'python': ['black'], \ 'python': ['black'],
\ 'rust': ['rustfmt'],
\ 'elixir': ['mix_format'], \ 'elixir': ['mix_format'],
\ 'graphql': ['prettier'], \ 'graphql': ['prettier'],
\ 'perl': ['perltidy'], \ 'perl': ['perltidy'],
\ 'go': ['gofmt'], \ 'go': ['gofmt'],
\ 'rust': ['rustfmt'],
\ 'json': ['prettier'], \ 'json': ['prettier'],
\ 'vala': ['uncrustify'], \ 'vala': ['uncrustify'],
\ 'dart': ['dartfmt'], \ 'dart': ['dartfmt'],
\ 'scss': ['prettier'], \ 'scss': ['prettier'],
\ 'jsonnet': ['jsonnetfmt'],
\} \}
let g:ale_rust_rls_config = { let g:ale_rust_rls_config = {
\ 'rust': { \ 'rust': {
\ 'clippy_preference': 'on' \ 'clippy_preference': 'on',
\ 'ale_rust_cargo_default_feature_behavior': 'all'
\ } \ }
\ } \ }

View File

@ -9,26 +9,46 @@ set hidden
" \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'], " \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
" \ } " \ }
if !empty($RUST_VERSION)
let g:LanguageClient_rustVersion = $RUST_VERSION
else
let g:LanguageClient_rustVersion = 'stable'
endif
let g:LanguageClient_serverCommands = { let g:LanguageClient_serverCommands = {
\ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'], "\ 'rust': ['/usr/bin/rustup', 'run', g:LanguageClient_rustVersion, 'rust-analyzer'],
\ 'rust': {
\ 'name': 'rust-analyzer',
\ 'command': ['/usr/bin/rustup', 'run', g:LanguageClient_rustVersion, 'rust-analyzer'],
\ 'initializationOptions': {
\ 'cargo': {
\ 'features': 'true',
\ }
\ },
\ },
\ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'], \ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'],
\ 'elm': ['/usr/bin/elm-language-server'], \ 'elm': ['/usr/bin/elm-language-server'],
\ 'python': ['/usr/bin/pyls'], \ 'python': ['/usr/bin/pylsp'],
\ 'go': ['/usr/bin/gopls'], \ 'go': ['/usr/bin/gopls'],
\ 'promql': ['/usr/local/bin/promql-langserver'], \ 'promql': ['/usr/local/bin/promql-langserver'],
\ 'java': ['/usr/bin/java-language-server'], \ 'java': ['/usr/bin/java-language-server'],
\ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'], \ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'typescriptreact': ['/usr/bin/typescript-language-server', '--stdio'], \ 'typescriptreact': ['/usr/bin/typescript-language-server', '--stdio'],
"\ 'Dockerfile': ['/usr/bin/docker-langserver', '--stdio'],
\ 'hcl': ['/usr/bin/terraform-ls'],
\ 'jsonnet': ['/usr/bin/jsonnet-language-server'],
\ } \ }
let g:LanguageClient_rootMarkers = { let g:LanguageClient_rootMarkers = {
\ 'elm': ['elm.json'], \ 'elm': ['elm.json'],
\ 'typescript': ['package.json'], \ 'typescript': ['package.json'],
\ 'typescriptreact': ['package.json'], \ 'typescriptreact': ['package.json'],
\ 'rust': ['Cargo.toml'],
\ 'python': ['pyproject.toml', 'setup.cfg'],
\ 'jsonnet': ['jsonnetfile.json', 'jsonnetfile.lock.json'],
\ } \ }
let g:LanguageClient_hoverPreview = 'always' let g:LanguageClient_hoverPreview = 'always'
let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log')
function LC_maps() function LC_maps()
if has_key(g:LanguageClient_serverCommands, &filetype) if has_key(g:LanguageClient_serverCommands, &filetype)
@ -46,11 +66,11 @@ function LC_maps()
" noremap <buffer> <silent> gd <Plug>(lcn-definition) " noremap <buffer> <silent> gd <Plug>(lcn-definition)
" noremap <buffer> <silent> <F2> <Plug>(lcn-rename) " noremap <buffer> <silent> <F2> <Plug>(lcn-rename)
let g:LanguageClient_loggingLevel = 'DEBUG'
let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log')
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync() set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
endif endif
endfunction endfunction
autocmd FileType * call LC_maps() autocmd FileType * call LC_maps()
let g:LanguageClient_loggingLevel = 'DEBUG'
let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log')

@ -0,0 +1 @@
Subproject commit 2a31e6bcea5977209c05c728c4253d82fd873c82

@ -1 +1 @@
Subproject commit 1358e8e45ecedc53daf971924a0541ddf6224faf Subproject commit 0668308e68b0ac28b332b204b469fbe04601536a

@ -0,0 +1 @@
Subproject commit 4f48ae3a8bb820c174ef73293942a6b109f446ce

@ -0,0 +1 @@
Subproject commit 889b9a7515db477f4cb6808bef1769e53493c578

3
vimrc
View File

@ -142,6 +142,9 @@ endif
""" Set dockerfile syntax """ Set dockerfile syntax
autocmd BufNewFile,BufRead Dockerfile* set ft=Dockerfile autocmd BufNewFile,BufRead Dockerfile* set ft=Dockerfile
""" Disable SQLAutocomplete
let g:loaded_sql_completion = 0
""" keybindings """ keybindings