diff --git a/README.md b/README.md index 2c02ff3a..1dc95f35 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d | Hy | hyuga | Yes | Yes | | JSON | json-languageserver | Yes | Yes | | JSON | rome | Yes | Yes | +| Jsonnet | jsonnet-language-server | Yes | Yes | | Java | eclipse-jdt-ls | Yes | Yes | | Java | java-language-server | No | Yes | | JavaScript | typescript-language-server | Yes | Yes | @@ -131,6 +132,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d | Markdown (remark) | remark-language-server | Yes | Yes | | Markdown | Marksman | Yes | Yes | | Nim | nimls | No | No | +| Nix | nixd | Yes | Yes | | Nix | rnix-lsp | Yes | Yes | | PHP | intelephense | Yes | Yes | | PHP | psalm-language-server | Yes | Yes | @@ -145,6 +147,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d | Python | pyright-langserver | Yes | Yes | | Python | pylsp-all (pylsp with dependencies) | Yes | Yes | | Python | pylsp (pylsp without dependencies) | Yes | Yes | +| Python | ruff-lsp | Yes | Yes | | Prisma | prisma-language-server | Yes | Yes | | R | languageserver | Yes | No | | Racket | racket-lsp | Yes | No | @@ -153,6 +156,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d | Ruby | solargraph | Yes | Yes | | Ruby | steep | Yes | Yes | | Ruby | typeprof | Yes | Yes | +| Ruby | rubocop (lsp mode) | Yes | No | | Rust | rls | Yes | No | | Rust | rust-analyzer | Yes | Yes | | Sphinx | esbonio | Yes | Yes | @@ -178,6 +182,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d | Veryl | veryl-ls | Yes | Yes | | Vue | volar-server | Yes | Yes | | Vue | vls | Yes | Yes | +| V | v-analyzer | Yes | Yes | | V | vlang-vls | Yes | Yes | | XML | lemminx | Yes | Yes | | YAML | yaml-language-server | Yes | Yes | @@ -231,7 +236,7 @@ If you don't want to use `import_map.json`, you may put `.vim-lsp-settings/setti } ``` -Recommend to add `let g:markdown_fenced_languages = ['ts=typescript']` to your +Recommend to add `let g:markdown_fenced_languages = ['ts=typescript']` to your vimrc for hover(preview) Deno's library. Note that `deno` language server is specified. @@ -297,6 +302,10 @@ To use older version `golangci-lint`, please run `:LspSettingsGlobalEdit` and pu } ``` +### [rubocop lsp mode (Ruby)](https://docs.rubocop.org/rubocop/usage/lsp.html) + +To use rubocop-lsp-mode, you need to install rubocop in your Ruby project using bundler. + ## Extra Configurations Most of the configurations are not required. diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index f6313561..6c999fb9 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -66,7 +66,7 @@ function! lsp_settings#executable(cmd) abort endif let l:paths .= ',' . lsp_settings#servers_dir() . '/' . a:cmd if !has('win32') - let l:found = globpath(l:paths, a:cmd, 1) + let l:found = filter(split(globpath(l:paths, a:cmd, 1), "\n"), 'executable(v:val)') return !empty(l:found) endif for l:ext in ['.exe', '.cmd', '.bat'] diff --git a/installer/install-eclipse-jdt-ls.cmd b/installer/install-eclipse-jdt-ls.cmd index 256da7a6..879ddfbb 100644 --- a/installer/install-eclipse-jdt-ls.cmd +++ b/installer/install-eclipse-jdt-ls.cmd @@ -3,7 +3,7 @@ curl -LO "https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz" curl -o lombok.jar "https://projectlombok.org/downloads/lombok.jar" tar xvf jdt-language-server-latest.tar.gz -rm jdt-language-server-latest.tar.gz +del jdt-language-server-latest.tar.gz echo @echo off ^ diff --git a/installer/install-elixir-ls.cmd b/installer/install-elixir-ls.cmd index 2d70149b..dfdd6c44 100644 --- a/installer/install-elixir-ls.cmd +++ b/installer/install-elixir-ls.cmd @@ -1,10 +1,11 @@ @echo off setlocal -set VERSION=0.13.0 -curl -L -o elixir-ls.zip "https://github.com/elixir-lsp/elixir-ls/releases/download/v%VERSION%/elixir-ls.zip" -call "%~dp0\run_unzip.cmd" elixir-ls.zip -del elixir-ls.zip +set VERSION=v0.15.1 +set ZIP=elixir-ls-%VERSION%.zip +curl -L -o "%ZIP%" "https://github.com/elixir-lsp/elixir-ls/releases/download/%VERSION%/%ZIP%" +call "%~dp0\run_unzip.cmd" "%ZIP%" +del "%ZIP%" echo @echo off ^ diff --git a/installer/install-elixir-ls.sh b/installer/install-elixir-ls.sh index cde84a68..46bb060a 100755 --- a/installer/install-elixir-ls.sh +++ b/installer/install-elixir-ls.sh @@ -2,11 +2,12 @@ set -e -version="v0.13.0" -url="https://github.com/elixir-lsp/elixir-ls/releases/download/$version/elixir-ls.zip" -curl -LO "$url" -unzip elixir-ls.zip -rm elixir-ls.zip +version="v0.15.1" +zip="elixir-ls-$version.zip" +url="https://github.com/elixir-lsp/elixir-ls/releases/download/$version/$zip" +curl -L -o "$zip" "$url" +unzip "$zip" +rm "$zip" cat <elixir-ls #!/bin/sh diff --git a/installer/install-jsonnet-language-server.cmd b/installer/install-jsonnet-language-server.cmd new file mode 100644 index 00000000..55571ca4 --- /dev/null +++ b/installer/install-jsonnet-language-server.cmd @@ -0,0 +1,3 @@ +@echo off + +call "%~dp0\go_install.cmd" github.com/grafana/jsonnet-language-server@latest diff --git a/installer/install-jsonnet-language-server.sh b/installer/install-jsonnet-language-server.sh new file mode 100755 index 00000000..1dbf803c --- /dev/null +++ b/installer/install-jsonnet-language-server.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +"$(dirname "$0")/go_install.sh" github.com/grafana/jsonnet-language-server@latest diff --git a/installer/install-kotlin-language-server.cmd b/installer/install-kotlin-language-server.cmd index 144ed3d7..d8f3c4ba 100644 --- a/installer/install-kotlin-language-server.cmd +++ b/installer/install-kotlin-language-server.cmd @@ -1,7 +1,7 @@ @echo off setlocal -set VERSION=0.5.2 +set VERSION=1.3.3 curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/download/%VERSION%/server.zip" call "%~dp0\run_unzip.cmd" server.zip del server.zip diff --git a/installer/install-kotlin-language-server.sh b/installer/install-kotlin-language-server.sh index 016bf5a0..690cf598 100755 --- a/installer/install-kotlin-language-server.sh +++ b/installer/install-kotlin-language-server.sh @@ -2,7 +2,7 @@ set -e -version="0.5.2" +version="1.3.3" curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/download/$version/server.zip" unzip server.zip rm server.zip diff --git a/installer/install-marksman.sh b/installer/install-marksman.sh index a62107d5..81f357cd 100755 --- a/installer/install-marksman.sh +++ b/installer/install-marksman.sh @@ -3,10 +3,15 @@ set -e os=$(uname -s | tr "[:upper:]" "[:lower:]") - +if [ $(uname -m) = "x86_64" ]; +then + arch="x64" +else + arch="arm64" +fi case $os in linux) - platform="linux" + platform="linux-"$arch ;; darwin) platform="macos" diff --git a/installer/install-nixd-lsp.cmd b/installer/install-nixd-lsp.cmd new file mode 100644 index 00000000..325d123f --- /dev/null +++ b/installer/install-nixd-lsp.cmd @@ -0,0 +1,3 @@ +@echo off + +call nix-env -i -f "https://github.com/nix-community/nixd/archive/master.tar.gz" diff --git a/installer/install-nixd-lsp.sh b/installer/install-nixd-lsp.sh new file mode 100755 index 00000000..6881726f --- /dev/null +++ b/installer/install-nixd-lsp.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +nix-env -i -f "https://github.com/nix-community/nixd/archive/master.tar.gz" diff --git a/installer/install-rubocop-lsp-mode.cmd b/installer/install-rubocop-lsp-mode.cmd new file mode 100644 index 00000000..db7c9799 --- /dev/null +++ b/installer/install-rubocop-lsp-mode.cmd @@ -0,0 +1,18 @@ +@echo off + +echo @echo off ^ + +setlocal ^ + +set TARGET_DIR=%%1 ^ + +shift ^ + +cd %%TARGET_DIR%% ^ + +bundle exec rubocop %%* ^ + +> rubocop-lsp-mode.cmd + +echo Install Done. +echo **You need add rubocop dependencies in Gemfile.** diff --git a/installer/install-rubocop-lsp-mode.sh b/installer/install-rubocop-lsp-mode.sh new file mode 100755 index 00000000..3b5be413 --- /dev/null +++ b/installer/install-rubocop-lsp-mode.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +cat <rubocop-lsp-mode +#!/bin/sh + +TARGET_DIR=\$1 +shift +cd \${TARGET_DIR} +bundle exec rubocop \$* +EOF + +chmod +x rubocop-lsp-mode + +echo 'Install Done.' +echo '**You need add rubocop dependencies in Gemfile.**' diff --git a/installer/install-ruff-lsp.cmd b/installer/install-ruff-lsp.cmd new file mode 100644 index 00000000..4e57b1ae --- /dev/null +++ b/installer/install-ruff-lsp.cmd @@ -0,0 +1,3 @@ +@echo off + +call "%~dp0\pip_install.cmd" ruff-lsp ruff-lsp diff --git a/installer/install-ruff-lsp.sh b/installer/install-ruff-lsp.sh new file mode 100755 index 00000000..7366b7c1 --- /dev/null +++ b/installer/install-ruff-lsp.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +"$(dirname "$0")/pip_install.sh" ruff-lsp ruff-lsp diff --git a/installer/install-tailwindcss-intellisense.cmd b/installer/install-tailwindcss-intellisense.cmd index def8f464..db45b098 100644 --- a/installer/install-tailwindcss-intellisense.cmd +++ b/installer/install-tailwindcss-intellisense.cmd @@ -1,7 +1,7 @@ @echo off setlocal -set VERSION=0.5.10 +set VERSION=0.10.0 curl -L -o "vscode-tailwindcss.vsix" "https://github.com/tailwindlabs/tailwindcss-intellisense/releases/download/v%VERSION%/vscode-tailwindcss-%VERSION%.vsix" call "%~dp0\run_unzip.cmd" vscode-tailwindcss.vsix @@ -9,6 +9,6 @@ rem del vscode-tailwindcss.vsix echo @echo off ^ -node %%~dp0\extension\dist\server\index.js %%* ^ +node %%~dp0\extension\dist\tailwindServer.js %%* ^ > tailwindcss-intellisense.cmd diff --git a/installer/install-tailwindcss-intellisense.sh b/installer/install-tailwindcss-intellisense.sh index 9558c487..ae180190 100755 --- a/installer/install-tailwindcss-intellisense.sh +++ b/installer/install-tailwindcss-intellisense.sh @@ -2,7 +2,7 @@ set -e -version="0.5.10" +version="0.10.0" url="https://github.com/tailwindlabs/tailwindcss-intellisense/releases/download/v$version/vscode-tailwindcss-$version.vsix" asset="vscode-tailwindcss.vsix" @@ -10,13 +10,13 @@ curl -L "$url" -o "$asset" unzip "$asset" rm "$asset" \[Content_Types\].xml extension.vsixmanifest -chmod +x extension/dist/server/index.js +chmod +x extension/dist/tailwindServer.js cat <tailwindcss-intellisense #!/bin/sh DIR=\$(cd \$(dirname \$0); pwd) -node \$DIR/extension/dist/server/index.js \$* +node \$DIR/extension/dist/tailwindServer.js \$* EOF chmod +x tailwindcss-intellisense diff --git a/installer/install-taplo-lsp.sh b/installer/install-taplo-lsp.sh index 4b1439fd..eec52258 100755 --- a/installer/install-taplo-lsp.sh +++ b/installer/install-taplo-lsp.sh @@ -3,13 +3,21 @@ set -e os=$(uname -s | tr "[:upper:]" "[:lower:]") +architecture=$(uname -m) case $os in linux) - platform="linux-"$(uname -m) + platform="linux-$architecture" ;; darwin) - platform="darwin-"$(uname -m) + case $architecture in + arm64) + platform="darwin-aarch64" + ;; + *) + platform="darwin-$architecture" + ;; + esac ;; esac diff --git a/installer/install-v-analyzer.cmd b/installer/install-v-analyzer.cmd new file mode 100644 index 00000000..c1c8a8f9 --- /dev/null +++ b/installer/install-v-analyzer.cmd @@ -0,0 +1,14 @@ +@echo off + +curl -o install.vsh "https://raw.githubusercontent.com/v-analyzer/v-analyzer/master/install.vsh" + +for /f "delims=" %%a in (install.vsh) do ( + set line=%%a + setlocal enabledelayedexpansion + echo !line:'~/.config/v-analyzer='.!>>install2.vsh + endlocal +) + +v install2.vsh +del install.vsh install2.vsh +move bin\v-analyzer.exe . diff --git a/installer/install-v-analyzer.sh b/installer/install-v-analyzer.sh new file mode 100755 index 00000000..969ea8e5 --- /dev/null +++ b/installer/install-v-analyzer.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +url="https://raw.githubusercontent.com/v-analyzer/v-analyzer/master/install.vsh" + +# Replace hard-coded installation path "~/.config/v-analyzer" with "." +v -e "$(curl -fsSL "$url" | sed 's#~/.config/v-analyzer#.#g')" +mv bin/v-analyzer v-analyzer diff --git a/installer/install-volar-server.cmd b/installer/install-volar-server.cmd index 5fe2c062..140380f2 100644 --- a/installer/install-volar-server.cmd +++ b/installer/install-volar-server.cmd @@ -1,5 +1,5 @@ @echo off -call "%~dp0\npm_install.cmd" vue-language-server @volar/vue-language-server@~1.2.0 +call "%~dp0\npm_install.cmd" vue-language-server @vue/language-server@~1.8.0 ren vue-language-server.cmd volar-server.cmd -call npm install typescript@4.8 +call npm install typescript@5.0.2 diff --git a/installer/install-volar-server.sh b/installer/install-volar-server.sh index dc890289..133ba208 100755 --- a/installer/install-volar-server.sh +++ b/installer/install-volar-server.sh @@ -2,6 +2,6 @@ set -e -"$(dirname "$0")/npm_install.sh" vue-language-server @volar/vue-language-server@~1.2.0 +"$(dirname "$0")/npm_install.sh" vue-language-server @vue/language-server@~1.8.0 mv vue-language-server volar-server -npm install typescript@4.8 +npm install typescript@5.0.2 diff --git a/settings.json b/settings.json index 2f980d5b..1331bb04 100644 --- a/settings.json +++ b/settings.json @@ -793,6 +793,16 @@ } } ], + "jsonnet": [ + { + "command": "jsonnet-language-server", + "url": "https://github.com/grafana/jsonnet-language-server", + "description": "A Language Server Protocol (LSP) server for Jsonnet", + "requires": [ + "go" + ] + } + ], "julia": [ { "command": "julia-language-server", @@ -901,6 +911,14 @@ "requires": [ "nix" ] + }, + { + "command": "nixd", + "url": "https://github.com/nix-community/nixd", + "description": "Nix language server, based on nix libraries", + "requires": [ + "nix" + ] } ], "objc": [ @@ -1219,6 +1237,22 @@ "requires": [ "python3" ] + }, + { + "command": "ruff-lsp", + "url": "https://github.com/charliermarsh/ruff-lsp", + "description": "A Language Server Protocol implementation for Ruff.", + "requires": [ + "py" + ] + }, + { + "command": "ruff-lsp", + "url": "https://github.com/charliermarsh/ruff-lsp", + "description": "A Language Server Protocol implementation for Ruff.", + "requires": [ + "python3" + ] } ], "r": [ @@ -1312,6 +1346,17 @@ "requires": [ "gem" ] + }, + { + "command": "rubocop-lsp-mode", + "url": "https://github.com/rubocop/rubocop", + "description": "A Ruby static code analyzer and formatter, based on the community Ruby style guide.", + "requires": [ + "bundle" + ], + "root_uri_patterns": [ + "Gemfile" + ] } ], "rust": [ @@ -1661,6 +1706,17 @@ } ], "vlang": [ + { + "command": "v-analyzer", + "url": "https://github.com/v-analyzer/v-analyzer", + "description": "Bring IDE features for V programming languages in VS Code, Vim and other editors", + "requires": [ + "v" + ], + "root_uri_patterns": [ + "v.mod" + ] + }, { "command": "vlang-vls", "url": "https://github.com/vlang/vls", diff --git a/settings/deno.vim b/settings/deno.vim index d572faf1..8c7b669e 100644 --- a/settings/deno.vim +++ b/settings/deno.vim @@ -42,35 +42,38 @@ augroup vim_lsp_settings_deno \ }, \ }, \ }, - \ "inlayHints": { - \ "parameterNames": { - \ "enabled": "all", - \ "suppressWhenArgumentMatchesName": v:true, - \ }, - \ "parameterTypes": { - \ "enabled": v:true, - \ }, - \ "variableTypes": { - \ "enabled": v:true, - \ "suppressWhenTypeMatchesName": v:true, - \ }, - \ "propertyDeclarationTypes": { - \ "enabled": v:true, - \ }, - \ "functionLikeReturnTypes": { - \ "enabled": v:true, - \ }, - \ "enumMemberValues": { - \ "enabled": v:true, - \ }, - \ }, \ 'config': empty(lsp#utils#find_nearest_parent_file(lsp#utils#get_buffer_path(), 'tsconfig.json')) ? v:null : lsp#utils#find_nearest_parent_file(lsp#utils#get_buffer_path(), 'tsconfig.json'), \ 'internalDebug': lsp_settings#get('deno', 'internalDebug', v:false), \ }), \ 'allowlist': lsp_settings#get('deno', 'allowlist', ['typescript', 'javascript', 'typescriptreact', 'javascriptreact']), \ 'blocklist': lsp_settings#get('deno', 'blocklist', Vim_lsp_settings_deno_get_blocklist()), \ 'config': lsp_settings#get('deno', 'config', lsp_settings#server_config('deno')), - \ 'workspace_config': lsp_settings#get('deno', 'workspace_config', {}), + \ 'workspace_config': lsp_settings#get('deno', 'workspace_config', { + \ 'typescript': { + \ 'inlayHints': { + \ 'parameterNames': { + \ 'enabled': 'all', + \ 'suppressWhenArgumentMatchesName': v:true, + \ }, + \ 'parameterTypes': { + \ 'enabled': v:true, + \ }, + \ 'variableTypes': { + \ 'enabled': v:true, + \ 'suppressWhenTypeMatchesName': v:true, + \ }, + \ 'propertyDeclarationTypes': { + \ 'enabled': v:true, + \ }, + \ 'functionLikeReturnTypes': { + \ 'enabled': v:true, + \ }, + \ 'enumMemberValues': { + \ 'enabled': v:true, + \ }, + \ }, + \ }, + \ }), \ 'semantic_highlight': lsp_settings#get('deno', 'semantic_highlight', {}), \ } augroup END diff --git a/settings/godot.vim b/settings/godot.vim index 91601a32..f3579992 100644 --- a/settings/godot.vim +++ b/settings/godot.vim @@ -2,7 +2,7 @@ augroup vim_lsp_settings_godot au! LspRegisterServer { \ 'name': 'godot', - \ 'tcp': {server_info->lsp_settings#get('godot', 'tcp', '127.0.0.1:6008')}, + \ 'tcp': {server_info->lsp_settings#get('godot', 'tcp', '127.0.0.1:6005')}, \ 'root_uri':{server_info->lsp_settings#get('godot', 'root_uri', lsp_settings#root_uri('godot'))}, \ 'initialization_options': lsp_settings#get('godot', 'initialization_options', v:null), \ 'allowlist': lsp_settings#get('godot', 'allowlist', ['gdscript3', 'gdscript']), diff --git a/settings/gopls.vim b/settings/gopls.vim index b8a89534..baa43f4e 100644 --- a/settings/gopls.vim +++ b/settings/gopls.vim @@ -22,6 +22,13 @@ augroup vim_lsp_settings_gopls \ 'run_vulncheck_exp': v:true, \ }, \ }), + \ 'capabilities': lsp_settings#get('gopls', 'capabilities', { + \ 'textDocument': { + \ 'documentSymbol': { + \ 'hierarchicalDocumentSymbolSupport': v:true, + \ }, + \ }, + \ }), \ 'allowlist': lsp_settings#get('gopls', 'allowlist', ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl']), \ 'blocklist': lsp_settings#get('gopls', 'blocklist', []), \ 'config': lsp_settings#get('gopls', 'config', lsp_settings#server_config('gopls')), diff --git a/settings/jsonnet-language-server.vim b/settings/jsonnet-language-server.vim new file mode 100644 index 00000000..06f41deb --- /dev/null +++ b/settings/jsonnet-language-server.vim @@ -0,0 +1,16 @@ +augroup vim_lsp_settings_jsonnet_language_server + au! + LspRegisterServer { + \ 'name': 'jsonnet-language-server', + \ 'cmd': {server_info->lsp_settings#get('jsonnet-language-server', 'cmd', [lsp_settings#exec_path('jsonnet-language-server')]+lsp_settings#get('jsonnet-language-server', 'args', ['-t']))}, + \ 'root_uri':{server_info->lsp_settings#get('jsonnet-language-server', 'root_uri', lsp_settings#root_uri('jsonnet-language-server'))}, + \ 'initialization_options': lsp_settings#get('jsonnet-language-server', 'initialization_options', v:null), + \ 'allowlist': lsp_settings#get('jsonnet-language-server', 'allowlist', ['jsonnet']), + \ 'blocklist': lsp_settings#get('jsonnet-language-server', 'blocklist', []), + \ 'config': lsp_settings#get('jsonnet-language-server', 'config', lsp_settings#server_config('jsonnet-language-server')), + \ 'workspace_config': lsp_settings#get('jsonnet-language-server', 'workspace_config', { + \ 'jsonnet': {'lint': {'validProperties': []}}, + \ }), + \ 'semantic_highlight': lsp_settings#get('jsonnet-language-server', 'semantic_highlight', {}), + \ } +augroup END diff --git a/settings/nixd.vim b/settings/nixd.vim new file mode 100644 index 00000000..ea84b1cb --- /dev/null +++ b/settings/nixd.vim @@ -0,0 +1,14 @@ +augroup vim_lsp_settings_nixd + au! + LspRegisterServer { + \ 'name': 'nixd', + \ 'cmd': {server_info->lsp_settings#get('nixd', 'cmd', lsp_settings#exec_path('nixd'))}, + \ 'root_uri':{server_info->lsp_settings#get('nid', 'root_uri', lsp_settings#root_uri('nixd'))}, + \ 'initialization_options': lsp_settings#get('nixd', 'initialization_options', {}), + \ 'allowlist': lsp_settings#get('nixd', 'allowlist', ['nix']), + \ 'blocklist': lsp_settings#get('nixd', 'blocklist', []), + \ 'config': lsp_settings#get('nixd', 'config', lsp_settings#server_config('nixd')), + \ 'workspace_config': lsp_settings#get('nixd', 'workspace_config', {}), + \ 'semantic_highlight': lsp_settings#get('nixd', 'semantic_highlight', {}), + \ } +augroup END diff --git a/settings/rubocop-lsp-mode.vim b/settings/rubocop-lsp-mode.vim new file mode 100644 index 00000000..7c423905 --- /dev/null +++ b/settings/rubocop-lsp-mode.vim @@ -0,0 +1,14 @@ +augroup vim_lsp_settings_rubocop_vim_ls + au! + LspRegisterServer { + \ 'name': 'rubocop-lsp-mode', + \ 'cmd': {server_info->lsp_settings#get('rubocop-lsp-mode', 'cmd', [lsp_settings#exec_path('rubocop-lsp-mode'), lsp#utils#uri_to_path(lsp_settings#root_uri('rubocop-lsp-mode')), '--lsp'])+lsp_settings#get('rubocop-lsp-mode', 'args', [])}, + \ 'root_uri':{server_info->lsp_settings#get('rubocop-lsp-mode', 'root_uri', lsp_settings#root_uri('rubocop-lsp-mode'))}, + \ 'initialization_options': lsp_settings#get('rubocop-lsp-mode', 'initialization_options', v:null), + \ 'allowlist': lsp_settings#get('rubocop-lsp-mode', 'allowlist', ['ruby']), + \ 'blocklist': lsp_settings#get('rubocop-lsp-mode', 'blocklist', []), + \ 'config': lsp_settings#get('rubocop-lsp-mode', 'config', lsp_settings#server_config('rubocop-lsp-mode')), + \ 'workspace_config': lsp_settings#get('rubocop-lsp-mode', 'workspace_config', {}), + \ 'semantic_highlight': lsp_settings#get('rubocop-lsp-mode', 'semantic_highlight', {}), + \ } +augroup END diff --git a/settings/ruff-lsp.vim b/settings/ruff-lsp.vim new file mode 100644 index 00000000..a0f0f370 --- /dev/null +++ b/settings/ruff-lsp.vim @@ -0,0 +1,14 @@ +augroup vim_lsp_settings_ruff_lsp + au! + LspRegisterServer { + \ 'name': 'ruff-lsp', + \ 'cmd': {server_info->lsp_settings#get('ruff-lsp', 'cmd', [lsp_settings#exec_path('ruff-lsp')]+lsp_settings#get('ruff-lsp', 'args', []))}, + \ 'root_uri':{server_info->lsp_settings#get('ruff-lsp', 'root_uri', lsp_settings#root_uri('ruff-lsp'))}, + \ 'initialization_options': lsp_settings#get('ruff-lsp', 'initialization_options', v:null), + \ 'allowlist': lsp_settings#get('ruff-lsp', 'allowlist', ['python']), + \ 'blocklist': lsp_settings#get('ruff-lsp', 'blocklist', []), + \ 'config': lsp_settings#get('ruff-lsp', 'config', lsp_settings#server_config('ruff-lsp')), + \ 'workspace_config': lsp_settings#get('ruff-lsp', 'workspace_config', {}), + \ 'semantic_highlight': lsp_settings#get('ruff-lsp', 'semantic_highlight', {}), + \ } +augroup END diff --git a/settings/v-analyzer.vim b/settings/v-analyzer.vim new file mode 100644 index 00000000..30e0db43 --- /dev/null +++ b/settings/v-analyzer.vim @@ -0,0 +1,14 @@ +augroup vim_lsp_settings_vlang_vls + au! + LspRegisterServer { + \ 'name': 'v-analyzer', + \ 'cmd': {server_info->lsp_settings#get('v-analyzer', 'cmd', [lsp_settings#exec_path('v-analyzer')]+lsp_settings#get('v-analyzer', 'args', []))}, + \ 'root_uri':{server_info->lsp_settings#get('v-analyzer', 'root_uri', lsp_settings#root_uri('v-analyzer'))}, + \ 'initialization_options': lsp_settings#get('v-analyzer', 'initialization_options', v:null), + \ 'allowlist': lsp_settings#get('v-analyzer', 'allowlist', ['vlang']), + \ 'blocklist': lsp_settings#get('v-analyzer', 'blocklist', []), + \ 'config': lsp_settings#get('v-analyzer', 'config', lsp_settings#server_config('v-analyzer')), + \ 'workspace_config': lsp_settings#get('v-analyzer', 'workspace_config', {}), + \ 'semantic_highlight': lsp_settings#get('v-analyzer', 'semantic_highlight', {}), + \ } +augroup END diff --git a/settings/volar-server.vim b/settings/volar-server.vim index 2cfb4823..ad3f621a 100644 --- a/settings/volar-server.vim +++ b/settings/volar-server.vim @@ -34,7 +34,7 @@ augroup vim_lsp_settings_volar_server \ 'cmd': {server_info->lsp_settings#get('volar-server', 'cmd', [lsp_settings#exec_path('volar-server')]+lsp_settings#get('volar-server', 'args', ['--stdio']))}, \ 'root_uri':{server_info->lsp_settings#get('volar-server', 'root_uri', lsp_settings#root_uri('volar-server'))}, \ 'initialization_options': lsp_settings#get('volar-server', 'initialization_options', Vim_lsp_settings_volar_setup_ts_path(g:vim_lsp_settings_volar_options)), - \ 'allowlist': lsp_settings#get('volar-server', 'allowlist', ['vue']), + \ 'allowlist': lsp_settings#get('volar-server', 'allowlist', ['vue', 'typescript']), \ 'blocklist': lsp_settings#get('volar-server', 'blocklist', []), \ 'config': lsp_settings#get('volar-server', 'config', lsp_settings#server_config('volar-server')), \ }