From: "Acid Bong" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 74334@debbugs.gnu.org
Cc: joaotavora@gmail.com
Subject: bug#74334: 29.4; Eglot ignores locally set configuration
Date: Wed, 13 Nov 2024 08:03:42 +0000 [thread overview]
Message-ID: <f14ee5a89ca67d4c5c77cd3ab2caaadc0f9acc76@tilde.club> (raw)
In-Reply-To: <507CD52F-4D8E-4A62-81D6-B32723762507@tilde.club>
Ight, Joao, you accidentally created a new report, but i'll answer your questions under the original one.
> What is the '...'preceding your excerpt of a structure?
This is short for "other files that don't matter". Here's my repo
(https://codeberg.org/acidbong/nixos/src/commit/2d0eec312d83db0c685aa6de184d0477b0bf2041),
where I pushed my current state. The Cargo project is under /pkgs/rsblocks,
including .dir-locals.el.
> Where are you executing C-h v? What file are you M-x eglot'int in?
> Where are you running M-x eglot-show-worspace-configuration?
I'll describe all my actions:
1. open Emacs, it's in *scratch* and in ~:
- `eglot-workspace-configuration` is empty
2. `C-x p f ~/.config/nixos/pkgs/rsblocks/src/main.rs`:
- `e-w-c` (i'm abbreviating now, if you don't mind) now follows the content
in .dir-locals.el
3. `M-x eglot` in that exact main.rs:
- rust-analyzer complains that it can't find the workspace:
```
[eglot] Server reports (type=1): Failed to discover workspace.
Consider adding the `Cargo.toml` of the workspace to the [`linkedProjects`](https://rust-analyzer.github.io/manual.html#rust-analyzer.linkedProjects) setting.
Failed to load workspaces.
```
- `eglot-show-w-c` shows "null"
4. Go back to the *scratch*, type in (setq-default eglot-workspace-configuration '(that value))
and evaluate it with `C-x C-e`. Now the config is set globally.
5. Back to main.rs and `M-x eglot` once more:
- it launches and loads successfully
- `eglot-show-w-c` shows the config in JSON, and the config looks correct:
```
{
"rust-analyzer": {
"linkedProjects": [
"pkgs/rsblocks/Cargo.toml"
]
}
}
```
> What does M-: (project-current) RET show?
(vc Git "~/.config/nixos") ;; this is where I store my NixOS config
> All these commands are highly dependent on context, so I think it's best if you
> show a full recipe from Emacs -Q to clear these doubts.
I could replicate it with `emacs -Q`.
Speaking of `project-current`: I tried to follow the advices from
https://github.com/joaotavora/eglot/discussions/687 and add "Cargo.toml"
and "Cargo.lock" to `project-vc-extra-root-markers`, but `M-: (project-current)`
still shows "~/.config/nixos". Looks like project.el can't recognize nested
projects (both 0.9.8 and 0.11.0), but that's a whole different issue I don't care about.
next prev parent reply other threads:[~2024-11-13 8:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 20:49 bug#74334: 29.4; Eglot ignores locally set configuration Acid Bong via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-12 21:34 ` bug#74330: " João Távora
2024-11-13 8:03 ` Acid Bong via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-11-13 8:39 ` bug#74334: " João Távora
2024-11-13 9:45 ` Acid Bong via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 10:10 ` João Távora
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f14ee5a89ca67d4c5c77cd3ab2caaadc0f9acc76@tilde.club \
--to=bug-gnu-emacs@gnu.org \
--cc=74334@debbugs.gnu.org \
--cc=acidbong@tilde.club \
--cc=joaotavora@gmail.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 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.