diff options
-rw-r--r-- | installer/install-omnisharp-node-client.cmd | 16 | ||||
-rw-r--r-- | settings.json | 8 | ||||
-rw-r--r-- | settings/omnisharp-node-client.vim | 12 |
3 files changed, 36 insertions, 0 deletions
diff --git a/installer/install-omnisharp-node-client.cmd b/installer/install-omnisharp-node-client.cmd new file mode 100644 index 0000000..bff2a2b --- /dev/null +++ b/installer/install-omnisharp-node-client.cmd @@ -0,0 +1,16 @@ +@echo off + +cd %~dp0 +if exist "..\servers\omnisharp-node-client" rd /S /Q "..\servers\omnisharp-node-client" +md "..\servers\omnisharp-node-client" +cd "..\servers\omnisharp-node-client" +git clone https://github.com/OmniSharp/omnisharp-node-client . +call npm install +call npm build + +echo @echo off ^ + +node %%~dp0\languageserver\server.js ^ + +> omnisharp-node-client.cmd + diff --git a/settings.json b/settings.json index d6447a2..2083172 100644 --- a/settings.json +++ b/settings.json @@ -126,5 +126,13 @@ "npm" ] } + ], + "cs": [ + { + "command": "omnisharp-node-client", + "requires": [ + "npm" + ] + } ] } diff --git a/settings/omnisharp-node-client.vim b/settings/omnisharp-node-client.vim new file mode 100644 index 0000000..4f99d71 --- /dev/null +++ b/settings/omnisharp-node-client.vim @@ -0,0 +1,12 @@ +augroup vimlsp_settings_omnisharp-node-client + au! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'omnisharp-node-client', + \ 'cmd': lsp_settings#get('omnisharp-node-client', 'cmd', {server_info->[lsp_settings#exec_path('omnisharp-node-client')]}), + \ 'initialization_options': lsp_settings#get('omnisharp-node-client', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('omnisharp-node-client', 'whitelist', ['cs']), + \ 'blacklist': lsp_settings#get('omnisharp-node-client', 'blacklist', []), + \ 'config': lsp_settings#get('omnisharp-node-client', 'config', {}), + \ 'workspace_config': lsp_settings#get('omnisharp-node-client', 'workspace_config', {}), + \ }) +augroup END |