Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add credo-language-server support #4068

Merged
merged 6 commits into from
Jun 24, 2023
Merged

Conversation

wkirschbaum
Copy link
Contributor

This is a linting server for the Elixir programming language.

  • clients/lsp-credo.el: New file.
  • docs/lsp-clients.json: Add credo-ls entry.
  • lsp-mode.el: Add directory for server cache.
  • CHANGELOG.org: Add entry.

@github-actions github-actions bot added client One or more of lsp-mode language clients documentation labels Jun 11, 2023
@wkirschbaum wkirschbaum force-pushed the add-credo-ls branch 2 times, most recently from a11e695 to 0356943 Compare June 11, 2023 15:20
This is a linting server for the Elixir programming language.

* clients/lsp-credo.el: New file.
* docs/lsp-clients.json: Add credo-ls entry.
* lsp-mode.el: Add directory for server cache.
* CHANGELOG.org: Add entry.
@wkirschbaum
Copy link
Contributor Author

This is exclusively for elixir-mode, elixir-ts-mode and heex-ts-mode ( The Elixir langauges ). Does it make sense as a separate file? Feels cleaner.

@@ -0,0 +1,61 @@
;;; lsp-credo.el --- lsp-mode Credo integration -*- lexical-binding: t; -*-

;; Copyright (C) 2022 emacs-lsp maintainers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2023, your name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Comment on lines 54 to 55
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure 'credo-ls callback error-callback))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see a setup for automatic installation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yyoncho i am a bit unsure on how this works. its a repo download and unzip... let me try to add it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yyoncho latest changes has the setup for automatic installation. Pretty neat feature :).

* clients/lsp-credo.el: Add automatic installation.
:package-version '(lsp-mode . "8.0.1"))

(defcustom lsp-credo-download-url
(format (concat "https://github.com/elixir-tools/credo-language-server"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be easier for you if i make sure the bin/credo-language-server script is always uploaded as an asset on the github release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, i updated the PR to use the new release file structure.

@jcs090218
Copy link
Member

You might want to add the new client to lsp-client-packages:

lsp-mode/lsp-mode.el

Lines 176 to 193 in 9e51079

(defcustom lsp-client-packages
'( ccls lsp-actionscript lsp-ada lsp-angular lsp-ansible lsp-astro lsp-bash
lsp-beancount lsp-clangd lsp-clojure lsp-cmake lsp-crystal lsp-csharp lsp-css
lsp-d lsp-dart lsp-dhall lsp-docker lsp-dockerfile lsp-elm lsp-elixir lsp-emmet
lsp-erlang lsp-eslint lsp-fortran lsp-fsharp lsp-gdscript lsp-go lsp-gleam
lsp-glsl lsp-graphql lsp-hack lsp-grammarly lsp-groovy lsp-haskell lsp-haxe
lsp-idris lsp-java lsp-javascript lsp-json lsp-kotlin lsp-latex lsp-ltex
lsp-lua lsp-markdown lsp-marksman lsp-mint lsp-nginx lsp-nim lsp-nix lsp-magik
lsp-metals lsp-mssql lsp-ocaml lsp-openscad lsp-pascal lsp-perl lsp-perlnavigator
lsp-pls lsp-php lsp-pwsh lsp-pyls lsp-pylsp lsp-pyright lsp-python-ms lsp-purescript
lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rust lsp-semgrep lsp-shader lsp-solargraph
lsp-sorbet lsp-sourcekit lsp-sonarlint lsp-tailwindcss lsp-tex lsp-terraform
lsp-toml lsp-ttcn3 lsp-typeprof lsp-v lsp-vala lsp-verilog lsp-vetur lsp-volar
lsp-vhdl lsp-vimscript lsp-xml lsp-yaml lsp-ruby-lsp lsp-ruby-syntax-tree
lsp-sqls lsp-svelte lsp-steep lsp-tilt lsp-zig)
"List of the clients to be automatically required."
:group 'lsp-mode
:type '(repeat symbol))

@wkirschbaum
Copy link
Contributor Author

@jcs090218 thanks, added.

lsp-mode.el Outdated Show resolved Hide resolved
* lsp-mode.el (lsp-client-packages): Add lsp-credo.
The client does not support multi root workspaces yet.
@yyoncho yyoncho merged commit 48eefee into emacs-lsp:master Jun 24, 2023
@yyoncho
Copy link
Member

yyoncho commented Jun 24, 2023

Thank you for contributing to lsp-mode!

@wkirschbaum wkirschbaum deleted the add-credo-ls branch June 24, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client One or more of lsp-mode language clients documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants