From 8475898082ebe4ce40594a0b572be86bcc11ac45 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 2 Jun 2025 12:05:29 +0200 Subject: ci: allows "workspace/executeCommand" in eslint config Problem: client:exec_cmd() does not support synchronous invocation. https://github.com/neovim/nvim-lspconfig/pull/3876 Solution: Special-case eslint in the linter. --- .github/ci/lint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/ci/lint.sh b/.github/ci/lint.sh index 0433f4cf..d5a0eb2e 100644 --- a/.github/ci/lint.sh +++ b/.github/ci/lint.sh @@ -45,7 +45,8 @@ _check_lsp_cmd_prefix() { # Enforce client:exec_cmd(). _check_exec_cmd() { - if git grep -P 'workspace.executeCommand' -- 'lsp/*.lua' ; then + local exclude='eslint' + if git grep -P 'workspace.executeCommand' -- 'lsp/*.lua' | grep -v "$exclude" ; then _fail 'Use client:exec_cmd() instead of calling request("workspace/executeCommand") directly. Example: lsp/pyright.lua' fi } -- cgit v1.2.3-70-g09d2