From 065558f9898fe96d2cd6afbdba96bb24fe22b6d3 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 18 Feb 2020 22:09:36 +0900 Subject: Add sqls --- installer/install-sqls.cmd | 3 +++ installer/install-sqls.sh | 5 +++++ settings.json | 3 +++ settings/sqls.vim | 13 +++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 installer/install-sqls.cmd create mode 100755 installer/install-sqls.sh create mode 100644 settings/sqls.vim diff --git a/installer/install-sqls.cmd b/installer/install-sqls.cmd new file mode 100644 index 0000000..f649037 --- /dev/null +++ b/installer/install-sqls.cmd @@ -0,0 +1,3 @@ +@echo off + +call "%~dp0\go_install.cmd" github.com/lighttiger2505/sqls diff --git a/installer/install-sqls.sh b/installer/install-sqls.sh new file mode 100755 index 0000000..03f4628 --- /dev/null +++ b/installer/install-sqls.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +"$(dirname "$0")/go_install.sh" github.com/lighttiger2505/sqls diff --git a/settings.json b/settings.json index 046f307..b132865 100644 --- a/settings.json +++ b/settings.json @@ -497,6 +497,9 @@ ] }, { + "config": { + "refresh_pattern": "\\( \\zs\\k*\\|[a-zA-Z0-9_-]\\+\\)$" + }, "command": "sqls", "requires": [ "go" diff --git a/settings/sqls.vim b/settings/sqls.vim new file mode 100644 index 0000000..a80e6ab --- /dev/null +++ b/settings/sqls.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_sqls + au! + LspRegisterServer { + \ 'name': 'sqls', + \ 'cmd': {server_info->lsp_settings#get('sqls', 'cmd', [lsp_settings#exec_path('sqls')])}, + \ 'root_uri':{server_info->lsp_settings#get('sqls', 'root_uri', lsp_settings#root_uri())}, + \ 'initialization_options': lsp_settings#get('sqls', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('sqls', 'whitelist', ['sql']), + \ 'blacklist': lsp_settings#get('sqls', 'blacklist', []), + \ 'config': lsp_settings#get('sqls', 'config', lsp_settings#server_config('sqls')), + \ 'workspace_config': lsp_settings#get('sqls', 'workspace_config', {}), + \ } +augroup END -- cgit v1.2.3-54-g00ecf