From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Acid Bong" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74334: 29.4; Eglot ignores locally set configuration Date: Wed, 13 Nov 2024 08:03:42 +0000 Message-ID: References: <507CD52F-4D8E-4A62-81D6-B32723762507@tilde.club> Reply-To: "Acid Bong" Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21068"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com To: 74334@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 13 09:04:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tB8MP-0005Na-Ho for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Nov 2024 09:04:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tB8M9-0001KI-0C; Wed, 13 Nov 2024 03:04:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tB8M7-0001Jr-01 for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 03:04:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tB8M6-0002KR-NG for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 03:04:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:Date:MIME-Version:To:In-Reply-To:References:Subject; bh=UHzKjXmpJP9N55WXw4NB2We5NyK5nA234ay1fbIuJpA=; b=A0ypjtEROxGH1U2YAu6Miv4cO7GDSKcUqnBjE7Xe8NJiVzs1xt6o0muoR3Z9a0hImv9Av1SitHY64yyJqKO2+tD2qtIB69DHE0kz4ynbVhqTkNJCQPVKkbC0kN3tIBUUuoSbdPovIagd3sRNQorZEas13ignH+W/sbnlhiP6G63VaD9qc5nLl/u9riCiJ4Bw8CU7ME0PVdH5ZaUXDvEKKIeem3sH5Q9tVrjkZWYXFOK0qrmkarsJ9lG9pC7lhMDAgHTYOld9UqVxcNWVOrEu8kPHiCYg96FGoSfutFSiTWusl7SeRV8TwcRKJeJ7YfCWdFRX4Up4R8EyVKc1KCimNA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tB8M6-00010G-HM for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 03:04:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <507CD52F-4D8E-4A62-81D6-B32723762507@tilde.club> Resent-From: "Acid Bong" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2024 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74334 X-GNU-PR-Package: emacs Original-Received: via spool by 74334-submit@debbugs.gnu.org id=B74334.17314850263830 (code B ref 74334); Wed, 13 Nov 2024 08:04:02 +0000 Original-Received: (at 74334) by debbugs.gnu.org; 13 Nov 2024 08:03:46 +0000 Original-Received: from localhost ([127.0.0.1]:40596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tB8Lp-0000zi-S7 for submit@debbugs.gnu.org; Wed, 13 Nov 2024 03:03:46 -0500 Original-Received: from tilde.club ([142.44.150.184]:46012 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tB8Ln-0000zV-DJ for 74334@debbugs.gnu.org; Wed, 13 Nov 2024 03:03:44 -0500 Original-Received: from webmail.tilde.club (tilde.club [IPv6:2607:5300:203:b92b::115]) by tilde.club (Postfix) with ESMTPSA id 63392220407F6; Wed, 13 Nov 2024 08:03:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 63392220407F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1731485022; bh=Qv0J/d9Yq12g77ztJsc8ptyII5jU38HZSI09EnCsBuA=; h=Date:From:Subject:To:Cc:From; b=DjzZxkE7dYRfbLFrZ7rwEjBxnUUUFi9ppTmaRzZwOVHV9DhBt4k0FzwqUo5mLurK+ bZguxcglDK2WiLeJlsP/f44zA4R3hqtuIWPNzxu6o8/A+waoMbLn6J5wr6BOVGee4+ sgSHzaL0PAWr+/PXFcMFPE7UJ1kVr3AueFGTUc34= TLS-Required: No X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295260 Archived-At: Ight, Joao, you accidentally created a new report, but i'll answer your q= uestions 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/2d0eec312d83db0c685aa6de1= 84d0477b0bf2041), where I pushed my current state. The Cargo project is under /pkgs/rsblock= s, 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 con= tent 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=3D1): Failed to discover workspace. Consider adding the `Cargo.toml` of the workspace to the [`linkedProjects= `](https://rust-analyzer.github.io/manual.html#rust-analyzer.linkedProjec= ts) setting. Failed to load workspaces. ``` - `eglot-show-w-c` shows "null" 4. Go back to the *scratch*, type in (setq-default eglot-workspace-config= uration '(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 corre= ct: ``` { "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 bes= t 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-cu= rrent)` still shows "~/.config/nixos". Looks like project.el can't recognize nest= ed projects (both 0.9.8 and 0.11.0), but that's a whole different issue I do= n't care about.