aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-10-17 17:26:51 +0200
committerGitHub <noreply@github.com>2021-10-17 08:26:51 -0700
commita96ab275dbe2827eec9467a86940c1bc48589c82 (patch)
treed90db0bafed24c6cb789313058526950f295b3a2 /lua
parentdocs: update CONFIG.md (diff)
downloadnvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar.gz
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar.bz2
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar.lz
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar.xz
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.tar.zst
nvim-lspconfig-a96ab275dbe2827eec9467a86940c1bc48589c82.zip
fix(eslint): return {} in custom handlers (#1320)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/eslint.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/lua/lspconfig/eslint.lua b/lua/lspconfig/eslint.lua
index 87db3765..5bf253cd 100644
--- a/lua/lspconfig/eslint.lua
+++ b/lua/lspconfig/eslint.lua
@@ -78,9 +78,8 @@ configs.eslint = {
onIgnoredFiles = 'off',
rulesCustomizations = {},
run = 'onType',
- -- If nodePath is a non-null/undefined value the eslint LSP runs into runtime exceptions.
- --
- -- It's recommended not to change this.
+ -- nodePath configures the directory in which the eslint server should start its node_modules resolution.
+ -- This path is relative to the workspace folder (root dir) of the server instance.
nodePath = '',
-- Automatically determine working directory by locating .eslintrc config files.
--
@@ -116,6 +115,7 @@ configs.eslint = {
else
os.execute(string.format('open %q', result.url))
end
+ return {}
end,
['eslint/confirmESLintExecution'] = function(_, result)
if not result then
@@ -125,9 +125,11 @@ configs.eslint = {
end,
['eslint/probeFailed'] = function()
vim.notify('ESLint probe failed.', vim.log.levels.WARN)
+ return {}
end,
['eslint/noLibrary'] = function()
vim.notify('Unable to find ESLint library.', vim.log.levels.WARN)
+ return {}
end,
},
},