From b25ee182623eb53ef43e692e2d6bbd72740796bb Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 18 Nov 2023 14:55:35 +0000 Subject: [PATCH] Fix golangci-lint client on Emacs 27 (#4240) * Add install command for golangci-lint-server to docs/lsp-clients.json * Fix golangci-lint client in Emacs 27.x by not using length> function --- clients/lsp-golangci-lint.el | 4 ++-- docs/lsp-clients.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/lsp-golangci-lint.el b/clients/lsp-golangci-lint.el index d769388ec29..b25b547ac84 100644 --- a/clients/lsp-golangci-lint.el +++ b/clients/lsp-golangci-lint.el @@ -112,7 +112,7 @@ "Return the command and args to start golangci-lint-langserver." (let ((args (list lsp-golangci-lint-server-path))) (when (and (listp lsp-golangci-lint-server-args) - (length> lsp-golangci-lint-server-args 0)) + (> (length lsp-golangci-lint-server-args) 0)) (setq args (append args lsp-golangci-lint-server-args))) (when lsp-golangci-lint-server-debug (setq args (append args '("-debug")))) @@ -138,7 +138,7 @@ when condition append (if value (list flag value) (list flag))))) (when (and (listp lsp-golangci-lint-run-args) - (length> lsp-golangci-lint-run-args 0)) + (> (length lsp-golangci-lint-run-args) 0)) (setq args (append args lsp-golangci-lint-run-args))) args)) diff --git a/docs/lsp-clients.json b/docs/lsp-clients.json index 2d0a284f2be..09e5eb295b1 100644 --- a/docs/lsp-clients.json +++ b/docs/lsp-clients.json @@ -315,6 +315,7 @@ "full-name": "golangci-lint", "server-name": "golangci-lint-server", "server-url": "https://github.com/nametake/golangci-lint-langserver", + "installation": "go install github.com/nametake/golangci-lint-langserver@latest", "installation-url": "https://github.com/nametake/golangci-lint-langserver#installation", "debugger": "Not available" },