* Add deno

* Fix wrong url

* Fix shellcheck error
This commit is contained in:
Shinya Ohyanagi
2021-02-14 22:28:31 +09:00
committed by GitHub
parent 101d485464
commit a256822098
5 changed files with 71 additions and 0 deletions

View File

@@ -146,6 +146,7 @@ Because there is no way to update a server, please run `:LspInstallServer` again
| Terraform | terraform-ls | Yes | Yes |
| TTCN-3 | ntt | Yes | Yes |
| TypeScript | typescript-language-server | Yes | Yes |
| TypeScript | deno | Yes | Yes |
| TypeScript | rome | Yes | Yes |
| TypeScript | eslint-language-server | Yes | Yes |
| Vim | vim-language-server | Yes | Yes |
@@ -167,6 +168,10 @@ There is a Linux OS/version that does not run the locally installed clangd due t
If you installed rls already, you can use rls without configurations. But if you have not installed rls yet, you can install it by following [these instructions](https://github.com/rust-lang/rls#setup).
### deno (TypeScript)
To use deno, `node_modules` should **not** located on the project directory.
### graphql-language-service-cli(GraphQL)
To use graphql-language-service-cli, the [GraphQL Config](https://graphql-config.com/introduction#examples) has to be located on the top of project directory. The schema must be pointed to the schema file correctly.

View File

@@ -0,0 +1,6 @@
@echo off
setlocal
curl -L -o deno-x86_64-pc-windows-msvc.zip "https://github.com/denoland/deno/releases/latest/download/deno-x86_64-pc-windows-msvc.zip"
call "%~dp0\run_unzip.cmd" deno-x86_64-pc-windows-msvc.zip
del deno-x86_64-pc-windows-msvc.zip

21
installer/install-deno.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
os=$(uname -s | tr "[:upper:]" "[:lower:]")
case $os in
linux)
filename="deno-x86_64-unknown-linux-gnu.zip"
;;
darwin)
if [ $(uname -m) == "x86_64" ]; then
filename="deno-x86_64-apple-darwin.zip"
else
filename="deno-aarch64-apple-darwin.zip"
fi
;;
esac
curl -L -o "deno-$os.zip" "https://github.com/denoland/deno/releases/latest/download/$filename"
unzip "deno-$os.zip"

View File

@@ -451,6 +451,10 @@
"npm"
]
},
{
"command": "deno",
"requires": []
},
{
"command": "rslint-lsp",
"requires": [
@@ -488,6 +492,10 @@
"requires": [
"npm"
]
},
{
"command": "deno",
"requires": []
}
],
"json": [
@@ -987,6 +995,10 @@
"requires": [
"npm"
]
},
{
"command": "deno",
"requires": []
}
],
"typescriptreact": [
@@ -1015,6 +1027,10 @@
"requires": [
"npm"
]
},
{
"command": "deno",
"requires": []
}
],
"vala": [

23
settings/deno.vim Normal file
View File

@@ -0,0 +1,23 @@
augroup vim_lsp_settings_deno
au!
LspRegisterServer {
\ 'name': 'deno',
\ 'cmd': {server_info->lsp_settings#get('deno', 'cmd', [lsp_settings#exec_path('deno'), 'lsp'])},
\ 'root_uri':{server_info->lsp_settings#get('deno', 'root_uri', '')},
\ 'initialization_options': lsp_settings#get('deno', 'initialization_options', {
\ 'enable': v:true,
\ 'lint': v:true,
\ 'unstable': v:true,
\ 'codeLens': {
\ 'references': v:true,
\ 'referencesAllFunctions': v:true,
\ },
\ }),
\ 'allowlist': lsp_settings#get('deno', 'allowlist', ['typescript', 'javascript', 'typescriptreact', 'javascriptreact']),
\ 'blocklist': lsp_settings#get('deno', 'blocklist', {c->empty(lsp_settings#root_path(['node_modules'])) ? [] : ['typescript', 'javascript', 'typescriptreact', 'javascriptreact']}),
\ 'config': lsp_settings#get('deno', 'config', lsp_settings#server_config('deno')),
\ 'workspace_config': lsp_settings#get('deno', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('deno', 'semantic_highlight', {}),
\ }
augroup END