aboutsummaryrefslogtreecommitdiff
path: root/settings/eslint-language-server.vim
diff options
context:
space:
mode:
Diffstat (limited to 'settings/eslint-language-server.vim')
-rw-r--r--settings/eslint-language-server.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim
new file mode 100644
index 0000000..eed9082
--- /dev/null
+++ b/settings/eslint-language-server.vim
@@ -0,0 +1,32 @@
+augroup vimlsp_settings_eslint_language_server
+ au!
+ LspRegisterServer {
+ \ 'name': 'eslint-language-server',
+ \ 'cmd': {server_info->lsp_settings#get('eslint-language-server', 'cmd', [lsp_settings#exec_path('eslint-language-server'), '--stdio'])},
+ \ 'root_uri':{server_info->lsp_settings#get('eslint-language-server', 'root_uri', lsp_settings#root_uri(['package.json', 'tsconfig.json']))},
+ \ 'initialization_options': lsp_settings#get('eslint-language-server', 'initialization_options', {'diagnostics': 'true'}),
+ \ 'whitelist': lsp_settings#get('eslint-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'typescript.tsx']),
+ \ 'blacklist': lsp_settings#get('eslint-language-server', 'blacklist', []),
+ \ 'config': lsp_settings#get('eslint-language-server', 'config', lsp_settings#server_config('eslint-language-server')),
+ \ 'workspace_config': {
+ \ 'validate': v:true,
+ \ 'packageManager': 'npm',
+ \ 'autoFix': v:true,
+ \ 'autoFixOnSave': v:true,
+ \ 'options': {},
+ \ 'run': 'onType',
+ \ 'nodePath': v:null,
+ \ 'quiet': v:false,
+ \ 'workspaceFolder': v:null,
+ \ 'codeAction': {
+ \ 'disableRuleComment': {
+ \ 'enable': v:true,
+ \ 'location': 'separateLine'
+ \ },
+ \ 'showDocumentation': {
+ \ 'enable': v:true
+ \ }
+ \ }
+ \ },
+ \ }
+augroup END