GNU bug report logs - #74334
29.4; Eglot ignores locally set configuration

Previous Next

Package: emacs;

Reported by: Acid Bong <acidbong <at> tilde.club>

Date: Wed, 13 Nov 2024 02:02:01 UTC

Severity: normal

Found in version 29.4

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Acid Bong <acidbong <at> tilde.club>
Subject: bug#74334: closed (Re: 29.4; Eglot ignores locally set configuration)
Date: Wed, 13 Nov 2024 10:12:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#74334: 29.4; Eglot ignores locally set configuration

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 74334 <at> debbugs.gnu.org.

-- 
74334: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74334
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: João Távora <joaotavora <at> gmail.com>
To: Acid Bong <acidbong <at> tilde.club>
Cc: 74334 <at> debbugs.gnu.org, 74334-done <at> debbugs.gnu.org
Subject: Re: 29.4; Eglot ignores locally set configuration
Date: Wed, 13 Nov 2024 10:10:02 +0000
On Wed, Nov 13, 2024 at 9:45 AM Acid Bong <acidbong <at> tilde.club> wrote:

> Woah, it actually works. Kinda weird that it requires .dir-locals.el to be in the
> Git root, not in the Cargo root.

It's weird, but only because having this particular project very deep inside
the only dir that Emacs knows how to automatically recognize as a
project is weird.  Look into teaching project.el about "Cargo.toml" files,
it shouldn't be very hard.

You may or may not need "nested" projects, that's an orthogonal
issue.  If you're sure you do need nested or complicated project
setups,  look at [1])

João

[1]: https://github.com/joaotavora/eglot/discussions/1337#discussioncomment-8853117

[Message part 3 (message/rfc822, inline)]
From: Acid Bong <acidbong <at> tilde.club>
To: bug-gnu-emacs <at> gnu.org
Cc: joaotavora <at> gmail.com
Subject: 29.4; Eglot ignores locally set configuration
Date: Tue, 12 Nov 2024 22:49:18 +0200
Can be observed on both builtin (1.12.29) and the newest Eglot (1.17). I'm starting Eglot manually, i have no hooks for Rust.

My repo structure:
/
...
|_pkgs/rsblocks/
  |_.dir-locals.el
  |_Cargo.toml
  ...

Since my Rust project isn't in the root of the repo, I need to specify its location for rust-analyzer. Using .dir-locals.el with this content:
```lisp
((nil
  . ((eglot-workspace-configuration
      . (:rust-analyzer (:linkedProjects ["pkgs/rsblocks/Cargo.toml"]))))))
;; thank god it supports relative paths
```
does nothing: I see the variable value is set properly with `C-h v`, but Eglot doesn't seem to recognize it (`eglot-show-workspace-configuration` shows "null").

However, only when I set it globally, Eglot can apply the config to the language server.

Expected behaviour: like described in the manual, Eglot should recognize local values. 

Possibly related report: https://github.com/joaotavora/eglot/issues/355 (unresolved)



This bug report was last modified 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.