all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting up language servers for Eglot
@ 2020-08-07 14:27 Paul Michael Reilly
  2020-08-07 14:32 ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Michael Reilly @ 2020-08-07 14:27 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

What is your thinking about how Users should set up language servers that
you do not automagically set up as part of Eglot?

For Kollin, it is not a simple matter, as far as I can see right now, of
just adding an executable to a directory on the executable search path.
Perhaps I should see how Eglot deals with Java, if at all.

-pmr

[-- Attachment #2: Type: text/html, Size: 517 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Setting up language servers for Eglot
  2020-08-07 14:27 Setting up language servers for Eglot Paul Michael Reilly
@ 2020-08-07 14:32 ` João Távora
  2020-08-07 15:05   ` Paul Michael Reilly
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2020-08-07 14:32 UTC (permalink / raw)
  To: Paul Michael Reilly; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi Paul,

As I told you offline I am quite busy at the moment to help you with this
directly.

But if you look at Eglot's homepage you'll see that you need an entry in
`eglot-server-programs` variable.
That entry should associate a major mode with a program (the executable).
So you need a `kotlin-mode`
major mode.  Emacs doesn't come with one but you can probably get one
somewhere.  Also, earlier I
linked to an issue describing how someone got Eglot working with Kotlin
using this simple technique.
Maybe searching Eglot's bug tracker for "Kotlin" will bring you to that
issue.

Hope this helps
João

On Fri, Aug 7, 2020 at 3:28 PM Paul Michael Reilly <pmr@pajato.com> wrote:

> What is your thinking about how Users should set up language servers that
> you do not automagically set up as part of Eglot?
>
> For Kollin, it is not a simple matter, as far as I can see right now, of
> just adding an executable to a directory on the executable search path.
> Perhaps I should see how Eglot deals with Java, if at all.
>
> -pmr
>


-- 
João Távora

[-- Attachment #2: Type: text/html, Size: 1694 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Setting up language servers for Eglot
  2020-08-07 14:32 ` João Távora
@ 2020-08-07 15:05   ` Paul Michael Reilly
  2020-08-07 15:58     ` Yuan Fu
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Michael Reilly @ 2020-08-07 15:05 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

>
> As I told you offline I am quite busy at the moment to help you with this
> directly.
>

No problem, I posted to emacs-devel so someone who might not be as busy
might comment. Chilling out doesn't work so well for me. :-)

But if you look at Eglot's homepage you'll see that you need an entry in
> `eglot-server-programs` variable.
> That entry should associate a major mode with a program (the executable).
> So you need a `kotlin-mode`
> major mode.  Emacs doesn't come with one but you can probably get one
> somewhere.  Also, earlier I
> linked to an issue describing how someone got Eglot working with Kotlin
> using this simple technique.
> Maybe searching Eglot's bug tracker for "Kotlin" will bring you to that
> issue.
>

I do use a Kotlin mode from ELPA/MELPA so Eglot did try to execute the
Kotlin language server. Of course it did not find it because I had not
installed it. I now understand an issue to be a documentation issue in that
Eglot needs text via the README.md file to  address missing modes and
server setup.  I'll check the Eglot bug tracker and then post an
appropriate PR incorporating any feedback I see in this thread.

fwiw, once installed, the server dies after being started by Eglot. I'll
flail at this problem and gladly accept suggestions to expedite a solution.

-pmr

[-- Attachment #2: Type: text/html, Size: 2048 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Setting up language servers for Eglot
  2020-08-07 15:05   ` Paul Michael Reilly
@ 2020-08-07 15:58     ` Yuan Fu
  2020-08-07 15:59       ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Yuan Fu @ 2020-08-07 15:58 UTC (permalink / raw)
  To: Paul Michael Reilly; +Cc: João Távora, emacs-devel

> fwiw, once installed, the server dies after being started by Eglot. I'll flail at this problem and gladly accept suggestions to expedite a solution.

Maybe you didn’t pass the correct flags to the language server. Try running the server in CLI and see what happens.

Yuan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Setting up language servers for Eglot
  2020-08-07 15:58     ` Yuan Fu
@ 2020-08-07 15:59       ` João Távora
  2020-08-08  5:59         ` Paul Michael Reilly
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2020-08-07 15:59 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Paul Michael Reilly, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

Also, try switching to the *EGLOT events for ... * buffer.  That usually
holds
useful information about what went on when trying to start or communicate
with the server.

HTH,
João

On Fri, Aug 7, 2020 at 4:58 PM Yuan Fu <casouri@gmail.com> wrote:

> > fwiw, once installed, the server dies after being started by Eglot. I'll
> flail at this problem and gladly accept suggestions to expedite a solution.
>
> Maybe you didn’t pass the correct flags to the language server. Try
> running the server in CLI and see what happens.
>
> Yuan
>
>

-- 
João Távora

[-- Attachment #2: Type: text/html, Size: 1006 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Setting up language servers for Eglot
  2020-08-07 15:59       ` João Távora
@ 2020-08-08  5:59         ` Paul Michael Reilly
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Michael Reilly @ 2020-08-08  5:59 UTC (permalink / raw)
  To: João Távora; +Cc: Yuan Fu, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

>
> Also, try switching to the *EGLOT events for ... * buffer.  That usually
> holds
> useful information about what went on when trying to start or communicate
> with the server.
>

This did not help clean up my issue with understanding how Eglot should
deal with an "unregistered" language server/language mode combination but
boyo is it incredibly useful and helpful to know about once I did get the
Kotlin language server working correctly (which was stupidity on my part
and easily fixed).

So my question for anyone building and/or supporting Emacs
libraries/packages that require a language server is: how would/should a
User deal with an advertised as supported language that is not in fact
supported? Seems to me this is a clear bug and the User should file a bug
report on the library/package.  In the case of Eglot, it's a bit sticky
because, apparently, there is no default Kotlin mode available as part of
Emacs but one can use an ELPA/MELPA provided mode. So this case seems
detectable to me: if there is no kotlin mode that can be associated with a
language server, then Eglot errors out in the case it thinks it is dealing
with Kotlin. If there is a kotlin mode and an associated language server
exists, then Eglot should continue and just work. But this scenario implies
that Eglot should set up all supported language servers ahead of time. Is
that realistic? Can someone point me at an Eglot example I might base a
Kotlin support fix on?

[-- Attachment #2: Type: text/html, Size: 1911 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-08  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-07 14:27 Setting up language servers for Eglot Paul Michael Reilly
2020-08-07 14:32 ` João Távora
2020-08-07 15:05   ` Paul Michael Reilly
2020-08-07 15:58     ` Yuan Fu
2020-08-07 15:59       ` João Távora
2020-08-08  5:59         ` Paul Michael Reilly

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.