diff options
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | installer/install-cobol-language-support.sh | 22 | ||||
-rw-r--r-- | settings.json | 16 | ||||
-rw-r--r-- | settings/cobol-language-support.vim | 13 | ||||
-rw-r--r-- | settings/sourcekit-lsp.vim | 13 |
5 files changed, 66 insertions, 0 deletions
@@ -67,6 +67,8 @@ Currently, no way to uninstall/update server. Run this command again, newer vers | Scala | Metals | Yes | | Elm | elm-language-server | Yes | | JSON | json-languageserver | Yes | +| Swift | sourcekit-lsp | No | +| COBOL | cobol-language-support | Yes | ## License diff --git a/installer/install-cobol-language-support.sh b/installer/install-cobol-language-support.sh new file mode 100755 index 0000000..f87e1c3 --- /dev/null +++ b/installer/install-cobol-language-support.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) + +server_dir="../servers/cobol-language-support" +[ -d "$server_dir" ] && rm -rf "$server_dir" +mkdir "$server_dir" && cd "$server_dir" + +version="0.9.1" +url="https://github.com/eclipse/che-che4z-lsp-for-cobol/releases/download/$version/cobol-language-support-$version.vsix" +curl -LO "$url" +unzip "cobol-language-support-$version.vsix" + +cat <<EOF >./cobol-language-support +#!/bin/sh +DIR=\$(cd \$(dirname \$0); pwd) +java "-Dline.speparator=\r\n" -jar "\$DIR/extension/server/lsp-service-cobol-$version.jar" pipeEnabled +EOF + +chmod +x ./cobol-language-support diff --git a/settings.json b/settings.json index 992d02d..c7f0432 100644 --- a/settings.json +++ b/settings.json @@ -204,5 +204,21 @@ "npm" ] } + ], + "swift": [ + { + "command": "sourcekit-lsp", + "requires": [ + "sourcekit-lsp" + ] + } + ], + "cobol": [ + { + "command": "cobol-language-support", + "requires": [ + "java" + ] + } ] } diff --git a/settings/cobol-language-support.vim b/settings/cobol-language-support.vim new file mode 100644 index 0000000..b0f5dc9 --- /dev/null +++ b/settings/cobol-language-support.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_cobol_language_support + au! + LspRegisterServer { + \ 'name': 'cobol-language-support', + \ 'cmd': {server_info->lsp_settings#get('cobol-language-support', 'cmd', [lsp_settings#exec_path('cobol-language-support')])}, + \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), ['.git/']))}, + \ 'initialization_options': lsp_settings#get('cobol-language-support', 'initialization_options', {}), + \ 'whitelist': lsp_settings#get('cobol-language-support', 'whitelist', ['cobol']), + \ 'blacklist': lsp_settings#get('cobol-language-support', 'blacklist', []), + \ 'config': lsp_settings#get('cobol-language-support', 'config', {}), + \ 'workspace_config': lsp_settings#get('cobol-language-support', 'workspace_config', {}), + \ } +augroup END diff --git a/settings/sourcekit-lsp.vim b/settings/sourcekit-lsp.vim new file mode 100644 index 0000000..0d0c155 --- /dev/null +++ b/settings/sourcekit-lsp.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_sourcekit_lsp + au! + LspRegisterServer { + \ 'name': 'sourcekit-lsp', + \ 'cmd': {server_info->lsp_settings#get('sourcekit-lsp', 'cmd', [lsp_settings#exec_path('sourcekit-lsp')])}, + \ 'initialization_options': lsp_settings#get('sourcekit-lsp', 'initialization_options', {}), + \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), ['.git/', 'Package.swift', '.xcodeproj', '.xcworkspace', 'Cartfile', 'Podfile']))}, + \ 'whitelist': lsp_settings#get('sourcekit-lsp', 'whitelist', ['swift']), + \ 'blacklist': lsp_settings#get('sourcekit-lsp', 'blacklist', []), + \ 'config': lsp_settings#get('sourcekit-lsp', 'config', {}), + \ 'workspace_config': lsp_settings#get('sourcekit-lsp', 'workspace_config', {}), + \ } +augroup END |