unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mou Tong <mou.tong@outlook.com>
Cc: 65359@debbugs.gnu.org
Subject: bug#65359: [PATCH] eglot: add "lexical" LSP server
Date: Fri, 18 Aug 2023 09:00:02 +0300	[thread overview]
Message-ID: <83pm3k51r1.fsf@gnu.org> (raw)
In-Reply-To: <B6094057-7BFE-406A-9D8C-9A9931C288E2@outlook.com> (message from Mou Tong on Fri, 18 Aug 2023 01:38:39 +0000)

> From: Mou Tong <mou.tong@outlook.com>
> Date: Fri, 18 Aug 2023 01:38:39 +0000
> 
> There is a new LSP server for elixir: [lexical].
> 
> Although it said there had problems to use it with eglot, but I didn't
> meet the [problem] it said in the instruction.
> 
> And I had used it for serveral projects and it worked fine, I put this
> in my config and I don't know if there is a better way:
> 
> ```emacs-lisp
> (with-eval-after-load 'eglot
>  (setf (alist-get '(elixir-mode elixir-ts-mode heex-ts-mode)
>                   eglot-server-programs
>                   nil nil #'equal)
>        (eglot-alternatives
>         `(("start_lexical.sh")
>           ,(if (and (fboundp 'w32-shell-dos-semantics)
>                     (w32-shell-dos-semantics))
>                '("language_server.bat")
>              '("language_server.sh"))))))
> ```
> 
> So I send a patch like this. 
> 
> [lexical]: https://github.com/lexical-lsp/lexical
> 
> [problem]:
> https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md#vanilla-emacs-with-eglot
> 
> 
> From f4789e6215291ca2be95f443e0d2a1b122a44b0d Mon Sep 17 00:00:00 2001
> From: dalu <mou.tong@outlook.com>
> Date: Thu, 17 Aug 2023 18:34:42 +0800
> Subject: [PATCH] Add "lexical" LSP server to Eglot
> 
> ---
>  lisp/progmodes/eglot.el | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index 113ff08e94e..be7ed54c71d 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -219,10 +219,12 @@ eglot-server-programs
>                                   . ("dart" "language-server"
>                                      "--client-id" "emacs.eglot-dart"))
>                                  ((elixir-mode elixir-ts-mode heex-ts-mode)
> -                                 . ,(if (and (fboundp 'w32-shell-dos-semantics)
> -                                             (w32-shell-dos-semantics))
> -                                        '("language_server.bat")
> -                                      '("language_server.sh")))
> +                                 . ,(eglot-alternatives
> +                                     `(("start_lexical.sh")
> +                                       ,(if (and (fboundp 'w32-shell-dos-semantics)
> +                                                 (w32-shell-dos-semantics))
> +                                            '("language_server.bat")
> +                                          '("language_server.sh")))))
>                                  (ada-mode . ("ada_language_server"))
>                                  (scala-mode . ,(eglot-alternatives
>                                                  '("metals" "metals-emacs")))

Thanks, but the fact the command is a shell script again needs the
w32-shell-dos-semantics dance, like language_server.sh did.





  reply	other threads:[~2023-08-18  6:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  1:38 bug#65359: [PATCH] eglot: add "lexical" LSP server Mou Tong
2023-08-18  6:00 ` Eli Zaretskii [this message]
2023-08-18  6:19   ` Mou Tong
2023-08-18  6:39     ` Eli Zaretskii
2023-08-18  7:08       ` Mou Tong
2023-08-19  8:38         ` Eli Zaretskii
2023-08-19 10:51           ` João Távora
2023-08-19 14:11             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pm3k51r1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65359@debbugs.gnu.org \
    --cc=mou.tong@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).