Skip to content

Commit

Permalink
Fix golangci-lint client on Emacs 27 (#4240)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jimeh authored Nov 18, 2023
1 parent 2d03152 commit b25ee18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/lsp-golangci-lint.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"))))
Expand All @@ -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))

Expand Down
1 change: 1 addition & 0 deletions docs/lsp-clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit b25ee18

Please sign in to comment.