aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsuyoshi CHO <Tsuyoshi.CHO@Gmail.com>2019-12-29 11:00:54 +0900
committerTsuyoshi CHO <Tsuyoshi.CHO@Gmail.com>2019-12-29 11:00:54 +0900
commita0865ce2089cfb3248d850e0d24a26855f03da6b (patch)
treed6d8885bca8f1dc2a3d9628cddd385b461f3ea05
parent45a0aa937fda907dcf2ce52362b8a69ea3a2fa62 (diff)
parent38c4e67140ee3e37c8c06765e111d00e2d1211dd (diff)
downloadvim-lsp-settings-a0865ce2089cfb3248d850e0d24a26855f03da6b.tar.gz
vim-lsp-settings-a0865ce2089cfb3248d850e0d24a26855f03da6b.tar.bz2
vim-lsp-settings-a0865ce2089cfb3248d850e0d24a26855f03da6b.zip
Merge branch 'master' into fix/windows-native-py3
-rw-r--r--README.md61
-rwxr-xr-xinstaller/install-bash-language-server.sh3
-rwxr-xr-xinstaller/install-css-languageserver.sh3
-rw-r--r--installer/install-dls.cmd15
-rwxr-xr-xinstaller/install-dls.sh27
-rwxr-xr-xinstaller/install-docker-langserver.sh3
-rw-r--r--installer/install-elixir-ls.cmd22
-rwxr-xr-xinstaller/install-elixir-ls.sh24
-rwxr-xr-xinstaller/install-elm-language-server.sh3
-rwxr-xr-xinstaller/install-fortls.sh3
-rwxr-xr-xinstaller/install-html-languageserver.sh3
-rwxr-xr-xinstaller/install-intelephense.sh3
-rw-r--r--installer/install-javascript-typescript-langserver.cmd5
-rwxr-xr-xinstaller/install-javascript-typescript-langserver.sh8
-rw-r--r--installer/install-javascript-typescript-stdio.cmd5
-rwxr-xr-xinstaller/install-javascript-typescript-stdio.sh7
-rwxr-xr-xinstaller/install-json-languageserver.sh3
-rwxr-xr-xinstaller/install-omnisharp-lsp.sh29
-rwxr-xr-xinstaller/install-pyls.sh3
-rw-r--r--installer/install-texlab.cmd15
-rwxr-xr-xinstaller/install-texlab.sh26
-rwxr-xr-xinstaller/install-typescript-language-server.sh5
-rwxr-xr-xinstaller/install-vim-language-server.sh3
-rwxr-xr-xinstaller/install-yaml-language-server.sh3
-rw-r--r--installer/npm.sh25
-rwxr-xr-xinstaller/npm_install.sh22
-rw-r--r--installer/pip3.sh16
-rwxr-xr-xinstaller/pip_install.sh14
-rw-r--r--installer/run_unzip.cmd6
-rw-r--r--plugin/lsp_settings.vim12
-rw-r--r--settings.json66
-rw-r--r--settings/dls.vim13
-rw-r--r--settings/elixir-ls.vim14
-rw-r--r--settings/javascript-typescript-langserver.vim13
-rw-r--r--settings/javascript-typescript-stdio.vim13
-rw-r--r--settings/nimlsp.vim13
-rw-r--r--settings/texlab.vim13
-rw-r--r--settings/typescript-language-server.vim2
38 files changed, 374 insertions, 150 deletions
diff --git a/README.md b/README.md
index 9126db5..c4a07d9 100644
--- a/README.md
+++ b/README.md
@@ -60,34 +60,39 @@ Currently, no way to uninstall/update server. Run this command again, newer vers
## Supported Languages
-| Language | Language Server | Local Install |
-|------------|-------------------------------------------------------------|:-------------:|
-| C/C++ | clangd | No |
-| C# | omnisharp | Yes |
-| Clojure | clojure-lsp | Yes |
-| TypeScript | typescript-language-server | Yes |
-| JavaScript | javascript-typescript-langserver/typescript-language-server | Yes |
-| Python | pyls | Yes |
-| Rust | rls | No |
-| Go | gopls | Yes |
-| Ruby | solargraph | Yes |
-| PHP | intelephense | Yes |
-| Java | eclipse-jdt-ls | Yes |
-| Lua | emmylua-ls | Yes |
-| Vim | vim-language-server | Yes |
-| Bash | bash-language-server | Yes |
-| Terraform | terraform-lsp | Yes |
-| Dockerfile | dockerfile-language-server-nodejs | Yes |
-| YAML | yaml-language-server | Yes |
-| XML | lsp4xml | Yes |
-| Fortran | fortls | Yes |
-| Scala | Metals | Yes |
-| Elm | elm-language-server | Yes |
-| JSON | json-languageserver | Yes |
-| Swift | sourcekit-lsp | No |
-| COBOL | cobol-language-support | Yes |
-| Reason | reason-language-server | Yes |
-| TeX | digestif | No |
+| Language | Language Server | Local Install |
+|------------|--------------------------------------------------------|:-------------:|
+| C/C++ | clangd | No |
+| C# | omnisharp | Yes |
+| Clojure | clojure-lsp | Yes |
+| TypeScript | typescript-language-server | Yes |
+| JavaScript | typescript-language-server | Yes |
+| JavaScript | javascript-typescript-stdio | Yes |
+| Python | pyls | Yes |
+| Rust | rls | No |
+| Go | gopls | Yes |
+| Ruby | solargraph | Yes |
+| PHP | intelephense | Yes |
+| Java | eclipse-jdt-ls | Yes |
+| Lua | emmylua-ls | Yes |
+| Vim | vim-language-server | Yes |
+| Bash | bash-language-server | Yes |
+| Terraform | terraform-lsp | Yes |
+| Dockerfile | dockerfile-language-server-nodejs | Yes |
+| YAML | yaml-language-server | Yes |
+| XML | lsp4xml | Yes |
+| Fortran | fortls | Yes |
+| Scala | Metals | Yes |
+| Elm | elm-language-server | Yes |
+| JSON | json-languageserver | Yes |
+| Swift | sourcekit-lsp | No |
+| COBOL | cobol-language-support | Yes |
+| Reason | reason-language-server | Yes |
+| TeX | texlab | Yes |
+| TeX | digestif | No |
+| Nim | nimls | No |
+| D | dls | No |
+| Elixir | elixir-ls | Yes |
## License
diff --git a/installer/install-bash-language-server.sh b/installer/install-bash-language-server.sh
index c27d0d8..2cffd6a 100755
--- a/installer/install-bash-language-server.sh
+++ b/installer/install-bash-language-server.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install bash-language-server bash-language-server
+./npm_install.sh bash-language-server bash-language-server
diff --git a/installer/install-css-languageserver.sh b/installer/install-css-languageserver.sh
index ae7c8a6..93b29c3 100755
--- a/installer/install-css-languageserver.sh
+++ b/installer/install-css-languageserver.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install css-languageserver vscode-css-languageserver-bin
+./npm_install.sh css-languageserver vscode-css-languageserver-bin
diff --git a/installer/install-dls.cmd b/installer/install-dls.cmd
new file mode 100644
index 0000000..1a78b25
--- /dev/null
+++ b/installer/install-dls.cmd
@@ -0,0 +1,15 @@
+@echo off
+
+setlocal
+
+cd /d %~dp0
+
+set installer_dir=%cd%
+set server_dir=..\servers\dls
+if exist %server_dir% rd /Q /S "%server_dir%"
+md "%server_dir%"
+cd /d "%server_dir%"
+
+curl -L -o dls-v0.26.0.windows.x86_64.zip https://github.com/d-language-server/dls/releases/download/v0.26.0/dls-v0.26.0.windows.x86_64.zip"
+call %installer_dir%\run_unzip dls-v0.26.0.windows.x86_64.zip
+del dls-v0.26.0.windows.x86_64.zip
diff --git a/installer/install-dls.sh b/installer/install-dls.sh
new file mode 100755
index 0000000..478329f
--- /dev/null
+++ b/installer/install-dls.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+server_dir="../servers/dls"
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+linux) ;;
+darwin)
+ os="osx"
+ ;;
+*)
+ printf "%s doesn't supported by bash installer" "$os"
+ exit 1
+ ;;
+esac
+
+version="v0.26.0"
+url="https://github.com/d-language-server/dls/releases/download/$version/dls-$version.$os.x86_64.zip"
+curl -LO "$url"
+unzip "dls-$version.$os.x86_64.zip"
diff --git a/installer/install-docker-langserver.sh b/installer/install-docker-langserver.sh
index 28b433f..4bfe96e 100755
--- a/installer/install-docker-langserver.sh
+++ b/installer/install-docker-langserver.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install docker-langserver dockerfile-language-server-nodejs
+./npm_install.sh docker-langserver dockerfile-language-server-nodejs
diff --git a/installer/install-elixir-ls.cmd b/installer/install-elixir-ls.cmd
new file mode 100644
index 0000000..a92a9cf
--- /dev/null
+++ b/installer/install-elixir-ls.cmd
@@ -0,0 +1,22 @@
+@echo off
+
+setlocal
+
+cd /d %~dp0
+
+set installer_dir=%cd%
+set server_dir=..\servers\elixir-ls
+if exist %server_dir% rd /Q /S "%server_dir%"
+md "%server_dir%"
+cd /d "%server_dir%"
+
+curl -L -o elixir-ls.zip "https://github.com/JakeBecker/elixir-ls/releases/download/v0.2.25/elixir-ls.zip"
+call %installer_dir%\run_unzip elixir-ls.zip
+del elixir-ls.zip
+
+echo @echo off ^
+
+call language_server.bat ^
+
+> elixir-ls.cmd
+
diff --git a/installer/install-elixir-ls.sh b/installer/install-elixir-ls.sh
new file mode 100755
index 0000000..b1497b6
--- /dev/null
+++ b/installer/install-elixir-ls.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+server_dir="../servers/elixir-ls"
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+version="v0.2.25"
+url="https://github.com/JakeBecker/elixir-ls/releases/download/$version/elixir-ls.zip"
+curl -LO "$url"
+unzip elixir-ls.zip
+rm elixir-ls.zip
+
+cat <<EOF > elixir-ls
+#!/bin/sh
+
+DIR=\$(cd \$(dirname \$0); pwd)
+\$DIR/language_server.sh \$*
+EOF
+
+chmod +x elixir-ls
diff --git a/installer/install-elm-language-server.sh b/installer/install-elm-language-server.sh
index e0a1b27..516426b 100755
--- a/installer/install-elm-language-server.sh
+++ b/installer/install-elm-language-server.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install elm-languageserver "@elm-tooling/elm-language-server"
+./npm_install.sh elm-languageserver "@elm-tooling/elm-language-server"
diff --git a/installer/install-fortls.sh b/installer/install-fortls.sh
index 9685151..b337f68 100755
--- a/installer/install-fortls.sh
+++ b/installer/install-fortls.sh
@@ -2,5 +2,4 @@
cd $(dirname $0)
-. ./pip3.sh
-pip_install fortls fortran-language-server
+./pip_install.sh fortls fortran-language-server
diff --git a/installer/install-html-languageserver.sh b/installer/install-html-languageserver.sh
index 6838379..386fcb6 100755
--- a/installer/install-html-languageserver.sh
+++ b/installer/install-html-languageserver.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install html-languageserver vscode-html-languageserver-bin
+./npm_install.sh html-languageserver vscode-html-languageserver-bin
diff --git a/installer/install-intelephense.sh b/installer/install-intelephense.sh
index 4b24254..d26f7d5 100755
--- a/installer/install-intelephense.sh
+++ b/installer/install-intelephense.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install intelephense intelephense
+./npm_install.sh intelephense intelephense
diff --git a/installer/install-javascript-typescript-langserver.cmd b/installer/install-javascript-typescript-langserver.cmd
deleted file mode 100644
index a653ada..0000000
--- a/installer/install-javascript-typescript-langserver.cmd
+++ /dev/null
@@ -1,5 +0,0 @@
-@echo off
-
-cd /d %~dp0
-
-call npm_install javascript-typescript-langserver javascript-typescript-langserver
diff --git a/installer/install-javascript-typescript-langserver.sh b/installer/install-javascript-typescript-langserver.sh
deleted file mode 100755
index de35663..0000000
--- a/installer/install-javascript-typescript-langserver.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-set -e
-
-cd $(dirname $0)
-
-. ./npm.sh
-npm_install javascript-typescript-langserver javascript-typescript-langserver
diff --git a/installer/install-javascript-typescript-stdio.cmd b/installer/install-javascript-typescript-stdio.cmd
new file mode 100644
index 0000000..ce74e11
--- /dev/null
+++ b/installer/install-javascript-typescript-stdio.cmd
@@ -0,0 +1,5 @@
+@echo off
+
+cd /d %~dp0
+
+call npm_install javascript-typescript-stdio javascript-typescript-langserver
diff --git a/installer/install-javascript-typescript-stdio.sh b/installer/install-javascript-typescript-stdio.sh
new file mode 100755
index 0000000..cbbf068
--- /dev/null
+++ b/installer/install-javascript-typescript-stdio.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+./npm_install.sh javascript-typescript-stdio javascript-typescript-langserver
diff --git a/installer/install-json-languageserver.sh b/installer/install-json-languageserver.sh
index 8e5c2f2..600c3e2 100755
--- a/installer/install-json-languageserver.sh
+++ b/installer/install-json-languageserver.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install json-languageserver vscode-json-languageserver-bin
+./npm_install.sh json-languageserver vscode-json-languageserver-bin
diff --git a/installer/install-omnisharp-lsp.sh b/installer/install-omnisharp-lsp.sh
index f98f311..a30add3 100755
--- a/installer/install-omnisharp-lsp.sh
+++ b/installer/install-omnisharp-lsp.sh
@@ -3,12 +3,29 @@
set -e
cd $(dirname $0)
-[ -d ../servers/omnisharp-lsp ] && rm -rf ../servers/omnisharp-lsp
-mkdir ../servers/omnisharp-lsp
-cd ../servers/omnisharp-lsp
-curl -L -o omnisharp-linux-x64.zip https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v1.34.9/omnisharp-linux-x64.zip
-unzip omnisharp-linux-x64.zip
-rm omnisharp-linux-x64.zip
+
+server_dir="../servers/omnisharp-lsp"
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+linux) ;;
+darwin)
+ os="osx"
+ ;;
+*)
+ printf "%s doesn't supported by bash installer" "$os"
+ exit 1
+ ;;
+esac
+
+version="v1.34.9"
+url="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$os-x64.tar.gz"
+curl -LO "$url"
+tar xzvf omnisharp-$os-x64.tar.gz
+rm omnisharp-$os-x64.tar.gz
chmod +x run
diff --git a/installer/install-pyls.sh b/installer/install-pyls.sh
index fa61803..0c45c37 100755
--- a/installer/install-pyls.sh
+++ b/installer/install-pyls.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./pip3.sh
-pip_install pyls python-language-server
+./pip_install.sh pyls python-language-server
diff --git a/installer/install-texlab.cmd b/installer/install-texlab.cmd
new file mode 100644
index 0000000..5d7cece
--- /dev/null
+++ b/installer/install-texlab.cmd
@@ -0,0 +1,15 @@
+@echo off
+
+setlocal
+
+cd /d %~dp0
+
+set installer_dir=%cd%
+set server_dir=..\servers\texlab
+if exist %server_dir% rd /Q /S "%server_dir%"
+md "%server_dir%"
+cd /d "%server_dir%"
+
+curl -L -o texlab-x86_64-windows.zip "https://github.com/latex-lsp/texlab/releases/download/v1.8.0/texlab-x86_64-windows.zip"
+call %installer_dir%\run_unzip texlab-x86_64-windows.zip
+del texlab-x86_64-windows.zip
diff --git a/installer/install-texlab.sh b/installer/install-texlab.sh
new file mode 100755
index 0000000..a619ea4
--- /dev/null
+++ b/installer/install-texlab.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+server_dir="../servers/texlab"
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+linux) ;;
+darwin)
+ os="macos"
+ ;;
+*)
+ printf "%s doesn't supported by bash installer" "$os"
+ exit 1
+ ;;
+esac
+
+url="https://github.com/latex-lsp/texlab/releases/download/v1.8.0/texlab-x86_64-$os.tar.gz"
+curl -LO "$url"
+tar xzvf texlab-x86_64-$os.tar.gz
diff --git a/installer/install-typescript-language-server.sh b/installer/install-typescript-language-server.sh
index a34ea58..fbf7f59 100755
--- a/installer/install-typescript-language-server.sh
+++ b/installer/install-typescript-language-server.sh
@@ -4,6 +4,5 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install tsserver typescript
-npm_install typescript-language-server typescript-language-server
+./npm_install.sh tsserver typescript
+./npm_install.sh typescript-language-server typescript-language-server
diff --git a/installer/install-vim-language-server.sh b/installer/install-vim-language-server.sh
index 17b87df..7f44c8d 100755
--- a/installer/install-vim-language-server.sh
+++ b/installer/install-vim-language-server.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install vim-language-server vim-language-server
+./npm_install.sh vim-language-server vim-language-server
diff --git a/installer/install-yaml-language-server.sh b/installer/install-yaml-language-server.sh
index d3f0e47..d62959f 100755
--- a/installer/install-yaml-language-server.sh
+++ b/installer/install-yaml-language-server.sh
@@ -4,5 +4,4 @@ set -e
cd $(dirname $0)
-. ./npm.sh
-npm_install yaml-language-server yaml-language-server
+./npm_install.sh yaml-language-server yaml-language-server
diff --git a/installer/npm.sh b/installer/npm.sh
deleted file mode 100644
index 19e4e11..0000000
--- a/installer/npm.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Usage
-# $ . npm.sh
-# $ npm_install [EXECUTABLE_NAME] [NPM_NAME]
-npm_install() {
- server_dir="../servers/$1"
- [ -d "$server_dir" ] && rm -rf "$server_dir"
- mkdir "$server_dir" && pushd . > /dev/null && cd "$server_dir"
-
- npm init -y
-
- # Avoid the problem of not being able to install the same package as name in package.json.
- # Create an empty package.json.
- cat <<EOF >package.json
- {"name": ""}
-EOF
-
- npm install "$2"
- ln -s "./node_modules/.bin/$1" .
-
- popd > /dev/null
-}
diff --git a/installer/npm_install.sh b/installer/npm_install.sh
new file mode 100755
index 0000000..3c41838
--- /dev/null
+++ b/installer/npm_install.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Usage
+# $ npm_install [EXECUTABLE_NAME] [NPM_NAME]
+
+set -e
+
+server_dir="../servers/$1"
+[ -d "$server_dir" ] && rm -rf "$server_dir"
+mkdir "$server_dir"
+cd "$server_dir"
+
+npm init -y
+
+# Avoid the problem of not being able to install the same package as name in package.json.
+# Create an empty package.json.
+cat <<EOF >package.json
+{"name": ""}
+EOF
+
+npm install "$2"
+ln -s "./node_modules/.bin/$1" .
diff --git a/installer/pip3.sh b/installer/pip3.sh
deleted file mode 100644
index b309e88..0000000
--- a/installer/pip3.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Usage
-# $ . pip3.sh
-# $ pip_install [EXECUTABLE_NAME] [PYPI_NAME]
-pip_install() {
- server_dir="../servers/$1"
- [ -d "$server_dir" ] && rm -rf "$server_dir"
- mkdir "$server_dir" && cd "$server_dir"
-
- python3 -m venv ./venv
- ./venv/bin/pip3 install "$2"
- ln -s "./venv/bin/$1" .
-}
diff --git a/installer/pip_install.sh b/installer/pip_install.sh
new file mode 100755
index 0000000..4ceecbe
--- /dev/null
+++ b/installer/pip_install.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Usage
+# $ pip_install [EXECUTABLE_NAME] [PYPI_NAME]
+
+set -e
+
+server_dir="../servers/$1"
+[ -d "$server_dir" ] && rm -rf "$server_dir"
+mkdir "$server_dir" && cd "$server_dir"
+
+python3 -m venv ./venv
+./venv/bin/pip3 install "$2"
+ln -s "./venv/bin/$1" .
diff --git a/installer/run_unzip.cmd b/installer/run_unzip.cmd
index 1815a90..b3175d7 100644
--- a/installer/run_unzip.cmd
+++ b/installer/run_unzip.cmd
@@ -3,7 +3,9 @@
if "x%1" equ "x" goto :EOF
where unzip 2>NUL
-if %ERRORLEVEL% neq 0 (
+if %ERRORLEVEL% equ 0 (
+ unzip "%1"
+) else (
curl -L -o %~dp0\unzip.exe https://github.com/mattn/vim-lsp-settings/releases/download/v0.0.1/unzip.exe
+ %~dp0\unzip "%1"
)
-%~dp0\unzip "%1"
diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim
index 412b6f3..51aae02 100644
--- a/plugin/lsp_settings.vim
+++ b/plugin/lsp_settings.vim
@@ -33,10 +33,11 @@ function! s:executable(cmd) abort
endfunction
function! s:vimlsp_installer() abort
- if !has_key(s:settings, &filetype)
+ let l:ft = split(&filetype, '\.')[0]
+ if !has_key(s:settings, l:ft)
return []
endif
- let l:server = s:settings[&filetype]
+ let l:server = s:settings[l:ft]
if empty(l:server)
return []
endif
@@ -108,7 +109,10 @@ function! s:vimlsp_settings_suggest() abort
return
endif
if !exists(':LspInstallServer')
+ redraw
+ echohl Directory
echomsg 'If you want to enable Language Server, please do :LspInstallServer'
+ echohl None
command! -buffer LspInstallServer call s:vimlsp_install_server()
endif
endfunction
@@ -180,7 +184,9 @@ function! s:vimlsp_load_or_suggest(ft) abort
endif
endif
- delcommand LspRegisterServer
+ if !exists(':LspRegisterServer')
+ delcommand LspRegisterServer
+ endif
endfunction
function! s:load_or_suggest_group_name(ft) abort
diff --git a/settings.json b/settings.json
index c40e249..1e4b8a6 100644
--- a/settings.json
+++ b/settings.json
@@ -41,6 +41,14 @@
]
}
],
+ "d": [
+ {
+ "command": "dls",
+ "requires": [
+ "npm"
+ ]
+ }
+ ],
"dockerfile": [
{
"command": "docker-langserver",
@@ -49,6 +57,14 @@
]
}
],
+ "elixir": [
+ {
+ "command": "elixir-ls",
+ "requires": [
+ "elixir"
+ ]
+ }
+ ],
"elm": [
{
"command": "elm-language-server",
@@ -91,13 +107,13 @@
],
"javascript": [
{
- "command": "javascript-typescript-langserver",
+ "command": "typescript-language-server",
"requires": [
"npm"
]
},
{
- "command": "typescript-language-server",
+ "command": "javascript-typescript-stdio",
"requires": [
"npm"
]
@@ -135,6 +151,12 @@
]
}
],
+ "nim": [
+ {
+ "command": "nimlsp",
+ "requires": []
+ }
+ ],
"php": [
{
"command": "intelephense",
@@ -143,6 +165,18 @@
]
}
],
+ "plaintex": [
+ {
+ "command": "texlab",
+ "requires": []
+ },
+ {
+ "command": "digestif",
+ "requires": [
+ "luarocks"
+ ]
+ }
+ ],
"python": [
{
"command": "pyls",
@@ -215,6 +249,18 @@
"requires": []
}
],
+ "tex": [
+ {
+ "command": "texlab",
+ "requires": []
+ },
+ {
+ "command": "digestif",
+ "requires": [
+ "luarocks"
+ ]
+ }
+ ],
"typescript": [
{
"command": "typescript-language-server",
@@ -246,21 +292,5 @@
"npm"
]
}
- ],
- "plaintex": [
- {
- "command": "digestif",
- "requires": [
- "luarocks"
- ]
- }
- ],
- "tex": [
- {
- "command": "digestif",
- "requires": [
- "luarocks"
- ]
- }
]
}
diff --git a/settings/dls.vim b/settings/dls.vim
new file mode 100644
index 0000000..fc7a9dd
--- /dev/null
+++ b/settings/dls.vim
@@ -0,0 +1,13 @@
+augroup vimlsp_settings_dls
+ au!
+ LspRegisterServer {
+ \ 'name': 'dls',
+ \ 'cmd': {server_info->lsp_settings#get('dls', 'cmd', [lsp_settings#exec_path('dls')])},
+ \ 'root_uri':{server_info->lsp_settings#get('dls', 'root_uri', lsp_settings#root_uri(['.git/']))},
+ \ 'initialization_options': lsp_settings#get('dls', 'initialization_options', {"diagnostics": "true"}),
+ \ 'whitelist': lsp_settings#get('dls', 'whitelist', ['d']),
+ \ 'blacklist': lsp_settings#get('dls', 'blacklist', []),
+ \ 'config': lsp_settings#get('dls', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('dls', 'workspace_config', {}),
+ \ }
+augroup END
diff --git a/settings/elixir-ls.vim b/settings/elixir-ls.vim
new file mode 100644
index 0000000..6695e0c
--- /dev/null
+++ b/settings/elixir-ls.vim
@@ -0,0 +1,14 @@
+augroup vimlsp_settings_elixir_ls
+ au!
+ LspRegisterServer {
+ \ 'name': 'elixir-ls',
+ \ 'cmd': {server_info->lsp_settings#get('elixir-ls', 'cmd', [lsp_settings#exec_path('elixir-ls')])},
+ \ 'root_uri':{server_info->lsp_settings#get('elixir-ls', 'root_uri', lsp_settings#root_uri(['.git/']))},
+ \ 'initialization_options': lsp_settings#get('elixir-ls', 'initialization_options', v:null),
+ \ 'whitelist': lsp_settings#get('elixir-ls', 'whitelist', ['elixir']),
+ \ 'blacklist': lsp_settings#get('elixir-ls', 'blacklist', []),
+ \ 'config': lsp_settings#get('elixir-ls', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('elixir-ls', 'workspace_config', {}),
+ \ }
+augroup END
+
diff --git a/settings/javascript-typescript-langserver.vim b/settings/javascript-typescript-langserver.vim
deleted file mode 100644
index 72afeb0..0000000
--- a/settings/javascript-typescript-langserver.vim
+++ /dev/null
@@ -1,13 +0,0 @@
-augroup vimlsp_settings_javascript_typescript_langserver
- au!
- LspRegisterServer {
- \ 'name': 'javascript-typescript-langserver',
- \ 'cmd': {server_info->lsp_settings#get('javascript-typescript-langserver', 'cmd', [lsp_settings#exec_path('javascript-typescript-langserver')])},
- \ 'root_uri':{server_info->lsp_settings#get('javascript-typescript-langserver', 'root_uri', lsp_settings#root_uri(['.git/']))},
- \ 'initialization_options': lsp_settings#get('javascript-typescript-langserver', 'initialization_options', {"diagnostics": "true"}),
- \ 'whitelist': lsp_settings#get('javascript-typescript-langserver', 'whitelist', ['javascript', 'javascriptreact']),
- \ 'blacklist': lsp_settings#get('javascript-typescript-langserver', 'blacklist', []),
- \ 'config': lsp_settings#get('javascript-typescript-langserver', 'config', {}),
- \ 'workspace_config': lsp_settings#get('javascript-typescript-langserver', 'workspace_config', {}),
- \ }
-augroup END
diff --git a/settings/javascript-typescript-stdio.vim b/settings/javascript-typescript-stdio.vim
new file mode 100644
index 0000000..eb370d5
--- /dev/null
+++ b/settings/javascript-typescript-stdio.vim
@@ -0,0 +1,13 @@
+augroup vimlsp_settings_javascript_typescript_stdio
+ au!
+ LspRegisterServer {
+ \ 'name': 'javascript-typescript-stdio',
+ \ 'cmd': {server_info->lsp_settings#get('javascript-typescript-stdio', 'cmd', [lsp_settings#exec_path('javascript-typescript-stdio')])},
+ \ 'root_uri':{server_info->lsp_settings#get('javascript-typescript-stdio', 'root_uri', lsp_settings#root_uri(['.git/']))},
+ \ 'initialization_options': lsp_settings#get('javascript-typescript-stdio', 'initialization_options', {"diagnostics": "true"}),
+ \ 'whitelist': lsp_settings#get('javascript-typescript-stdio', 'whitelist', ['javascript', 'javascriptreact']),
+ \ 'blacklist': lsp_settings#get('javascript-typescript-stdio', 'blacklist', []),
+ \ 'config': lsp_settings#get('javascript-typescript-stdio', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('javascript-typescript-stdio', 'workspace_config', {}),
+ \ }
+augroup END
diff --git a/settings/nimlsp.vim b/settings/nimlsp.vim
new file mode 100644
index 0000000..95c71e1
--- /dev/null
+++ b/settings/nimlsp.vim
@@ -0,0 +1,13 @@
+augroup vimlsp_settings_nimlsp
+ au!
+ LspRegisterServer {
+ \ 'name': 'nimlsp',
+ \ 'cmd': {server_info->lsp_settings#get('nimlsp', 'cmd', [lsp_settings#exec_path('nimlsp')])},
+ \ 'root_uri':{server_info->lsp_settings#get('nimlsp', 'root_uri', lsp_settings#root_uri(['.git/']))},
+ \ 'initialization_options': lsp_settings#get('nimlsp', 'initialization_options', {"diagnostics": "true"}),
+ \ 'whitelist': lsp_settings#get('nimlsp', 'whitelist', ['nim']),
+ \ 'blacklist': lsp_settings#get('nimlsp', 'blacklist', []),
+ \ 'config': lsp_settings#get('nimlsp', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('nimlsp', 'workspace_config', {}),
+ \ }
+augroup END
diff --git a/settings/texlab.vim b/settings/texlab.vim
new file mode 100644
index 0000000..3cdee7d
--- /dev/null
+++ b/settings/texlab.vim
@@ -0,0 +1,13 @@
+augroup vimlsp_settings_texlab
+ au!
+ LspRegisterServer {
+ \ 'name': 'texlab',
+ \ 'cmd': {server_info->lsp_settings#get('texlab', 'cmd', [lsp_settings#exec_path('texlab')])},
+ \ 'root_uri':{server_info->lsp_settings#get('texlab', 'root_uri', lsp_settings#root_uri(['.git/']))},
+ \ 'initialization_options': lsp_settings#get('texlab', 'initialization_options', {"diagnostics": "true"}),
+ \ 'whitelist': lsp_settings#get('texlab', 'whitelist', ['plaintex', 'tex']),
+ \ 'blacklist': lsp_settings#get('texlab', 'blacklist', []),
+ \ 'config': lsp_settings#get('texlab', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('texlab', 'workspace_config', {}),
+ \ }
+augroup END
diff --git a/settings/typescript-language-server.vim b/settings/typescript-language-server.vim
index 8b62b67..438696c 100644
--- a/settings/typescript-language-server.vim
+++ b/settings/typescript-language-server.vim
@@ -5,7 +5,7 @@ augroup vimlsp_settings_typescript_language_server
\ 'cmd': {server_info->lsp_settings#get('typescript-language-server', 'cmd', [lsp_settings#exec_path('typescript-language-server'), '--stdio', '--tsserver-path', lsp_settings#exec_path('tsserver')])},
\ 'root_uri':{server_info->lsp_settings#get('typescript-language-server', 'root_uri', lsp_settings#root_uri(['.git/', 'package.json']))},
\ 'initialization_options': lsp_settings#get('typescript-language-server', 'initialization_options', {"diagnostics": "true"}),
- \ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['typescript', 'typescriptreact']),
+ \ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['javascript', 'typescript', 'typescriptreact']),
\ 'blacklist': lsp_settings#get('typescript-language-server', 'blacklist', []),
\ 'config': lsp_settings#get('typescript-language-server', 'config', {}),
\ 'workspace_config': lsp_settings#get('typescript-language-server', 'workspace_config', {}),