[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]]

From: Felician Nemeth
Subject: Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]]
Date: Tue, 26 Jul 2022 10:55:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

>> > Yes, I think this is a great idea to allow the user to configure
>> > server-specific things easily and automatically save it
>> > .dir-locals.el.
>> >
>> > The question is how.  Not sure if variables is the way to go.
>> Rust-analyzer can emit the definition of its configuration variables as
>> a JSON schema.  There are toml and yaml servers that hopefully
>> understand this schema description.
>> So one possibility for Eglot is to help the user to edit a
>> project/rust.toml or a global ~/.emacs.d/eglot/rust.toml file and
>> arrange to call eglot-signal-didChangeConfiguration when the user saves
>> the file.
> I don't disagree with this, though it seems different from your first idea.
> When is the .dir-locals.el written in your example, or were you imagining
> a use with `dir-locals-set-class`?

My first idea was to use `customize` to set project-specific
configuration variables.  This doesn't seem possible or easy.

> Regardless,  if this works, why shouldn't it be rust-mode.el's job to do
> exactly
> this?  Editing "toml" files is outside the scope of LSP.

Yes, but if there was an LSP request that returned the server's
configuration schema, then Eglot could take care it independently of the
major-mode.  Unfortunately, no such LSP request has been proposed at the
moment.  But there was an attempt:

As you said, standardization is hard.  So this approach quite

reply via email to

[Prev in Thread] Current Thread [Next in Thread]