Skip to content

Commit

Permalink
Merge branch 'mattn:master' into add-lang/hyuga
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuraiyuta authored Nov 29, 2023
2 parents 5026834 + 3d99f09 commit 6685b56
Show file tree
Hide file tree
Showing 33 changed files with 294 additions and 52 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion autoload/lsp_settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion installer/install-eclipse-jdt-ls.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^

Expand Down
9 changes: 5 additions & 4 deletions installer/install-elixir-ls.cmd
Original file line number Diff line number Diff line change
@@ -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 ^

Expand Down
11 changes: 6 additions & 5 deletions installer/install-elixir-ls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF >elixir-ls
#!/bin/sh
Expand Down
3 changes: 3 additions & 0 deletions installer/install-jsonnet-language-server.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

call "%~dp0\go_install.cmd" github.com/grafana/jsonnet-language-server@latest
5 changes: 5 additions & 0 deletions installer/install-jsonnet-language-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

"$(dirname "$0")/go_install.sh" github.com/grafana/jsonnet-language-server@latest
2 changes: 1 addition & 1 deletion installer/install-kotlin-language-server.cmd
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion installer/install-kotlin-language-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions installer/install-marksman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions installer/install-nixd-lsp.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

call nix-env -i -f "https://github.com/nix-community/nixd/archive/master.tar.gz"
5 changes: 5 additions & 0 deletions installer/install-nixd-lsp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

nix-env -i -f "https://github.com/nix-community/nixd/archive/master.tar.gz"
18 changes: 18 additions & 0 deletions installer/install-rubocop-lsp-mode.cmd
Original file line number Diff line number Diff line change
@@ -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.**
17 changes: 17 additions & 0 deletions installer/install-rubocop-lsp-mode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -e

cat <<EOF >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.**'
3 changes: 3 additions & 0 deletions installer/install-ruff-lsp.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

call "%~dp0\pip_install.cmd" ruff-lsp ruff-lsp
5 changes: 5 additions & 0 deletions installer/install-ruff-lsp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

"$(dirname "$0")/pip_install.sh" ruff-lsp ruff-lsp
4 changes: 2 additions & 2 deletions installer/install-tailwindcss-intellisense.cmd
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@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
rem del vscode-tailwindcss.vsix

echo @echo off ^

node %%~dp0\extension\dist\server\index.js %%* ^
node %%~dp0\extension\dist\tailwindServer.js %%* ^

> tailwindcss-intellisense.cmd
6 changes: 3 additions & 3 deletions installer/install-tailwindcss-intellisense.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

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"

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 <<EOF >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
12 changes: 10 additions & 2 deletions installer/install-taplo-lsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions installer/install-v-analyzer.cmd
Original file line number Diff line number Diff line change
@@ -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 .
7 changes: 7 additions & 0 deletions installer/install-v-analyzer.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions installer/install-volar-server.cmd
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions installer/install-volar-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 6685b56

Please sign in to comment.