diff options
| author | William Boman <william@redwill.se> | 2021-04-05 20:50:07 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-04-05 20:50:29 +0200 |
| commit | 474108e5b8f7a6b571cc8f80be6f223be2348507 (patch) | |
| tree | 4eeee214e12f5c5c7f9947ec4d77bdfc14f254b0 | |
| parent | rename Installer to Server for clarity (#3) (diff) | |
| download | mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar.gz mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar.bz2 mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar.lz mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar.xz mason-474108e5b8f7a6b571cc8f80be6f223be2348507.tar.zst mason-474108e5b8f7a6b571cc8f80be6f223be2348507.zip | |
eslintls: add some documentation
| -rw-r--r-- | lua/nvim-lsp-installer/servers/eslintls.lua | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/lua/nvim-lsp-installer/servers/eslintls.lua b/lua/nvim-lsp-installer/servers/eslintls.lua index b8f0f448..dc595d79 100644 --- a/lua/nvim-lsp-installer/servers/eslintls.lua +++ b/lua/nvim-lsp-installer/servers/eslintls.lua @@ -8,15 +8,12 @@ if not lspconfig.eslintls then default_config = { filetypes = {'javascript', 'javascriptreact', 'typescript', 'typescriptreact'}, root_dir = lspconfig.util.root_pattern(".eslintrc*", "package.json", ".git"), + + -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation. settings = { - nodePath = '', -- If this is a non-null/undefined value the eslint LSP runs into runtime exceptions. validate = 'on', run = 'onType', - workingDirectory = {mode = "auto"}, - workspaceFolder = { - uri = "/", - name = "root", - }, + codeAction = { disableRuleComment = { enable = true, @@ -26,6 +23,26 @@ if not lspconfig.eslintls then enable = true } }, + + -- Automatically determine working directory by locating .eslintrc config files. + -- + -- It's recommended not to change this. + workingDirectory = {mode = "auto"}, + + -- If nodePath is a non-null/undefined value the eslint LSP runs into runtime exceptions. + -- + -- It's recommended not to change this. + nodePath = '', + + -- The "workspaceFolder" is a VSCode concept. We set it to the root + -- directory to not restrict the LPS server when it traverses the + -- file tree when locating a .eslintrc config file. + -- + -- It's recommended not to change this. + workspaceFolder = { + uri = "/", + name = "root", + }, }, }, } |
