GNU bug report logs -
#73736
31.0.50; project and therefore eglot don't work without git
Previous Next
Full log
Message #14 received at 73736 <at> debbugs.gnu.org (full text, mbox):
On 10/10/2024 21:52, Jim Porter wrote:
> On 10/10/2024 11:42 AM, Dmitry Gutov wrote:
>> This isn't very plug-and-play, but you can customize project-vc-extra-
>> root-markers to include any other files that distinguish the root of a
>> project. For example, Cargo.toml.
>
> I wonder, could major modes provide project.el with some default values
> for that option? Then rust-mode could add Cargo.toml, python-mode could
> add pyproject.toml, and so on.
That's a natural question, but it would result in different results for
"current project" for files in the same directory (which often enough
use different major modes).
What we could have, it a variable which is added to globally in package
autoloads - so if e.g. rust-mode is installed it could add Cargo to root
markers. For rust-ts-mode we'd need to do that in the core, but then
we'd also need a way to override I guess, because in some projects that
still wouldn't be "root"...
Speaking of JetBrains and VS Code's "Open project" method, we could have
such as well - it would be a separate command or two ("open" and
"close", maybe).
If it's just for Eglot, though, maybe ideally it would have a separate
detector for directories in which to run the language server in - it
doesn't have to correspond to what the user considers to be the entire
project's root (they might prefer it to be a parent directory). Not sure
how automatic it can be in the general case, though, and it'd require
Eglot to know about root markers for all supported languages.
This bug report was last modified 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.