all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: Ergus <spacibba@aol.com>
Cc: Dmitry Gutov <dmitry@gutov.dev>, emacs-devel@gnu.org
Subject: Re: Project out of sources compilation
Date: Sat, 16 Mar 2024 23:56:19 +0300	[thread overview]
Message-ID: <db8a99ad05a7a4739eac05ad421020f06a373797.camel@yandex.ru> (raw)
In-Reply-To: <qqy6sxqon7ugdv2v4fdvhnp2adib7jzkq42dsxx4oz256u7lmg@bkpllaucn5rb>

On Sat, 2024-03-16 at 20:00 +0100, Ergus wrote:
> Hi:
> 
> On Sat, Mar 16, 2024 at 07:50:49PM +0300, Konstantin Kharlamov wrote:
> > On Sat, 2024-03-16 at 14:12 +0100, Ergus wrote:
> > > 2. Eglot compilations database place.
> > > 
> > > When compilation is out of sources the cmake generated
> > > compile_commands.json also goes in that directory by default.
> > > 
> > > This issue can be managed with a line in dir-locals, or just
> > > manually
> > > coping the database.
> > > 
> > > ((eglot-workspace-configuration
> > > 	� . (:clangd (:initializationOptions
> > > (:compilationDatabasePath
> > > 	� "build")))))
> > 
> > Just wanted to clarify two things:
> > 
> > 1. You can't just copy clangd database (i.e.
> > `compile_commands.json`)
> > because the field "directory" has absolute path and clangd doesn't
> > support relative one. So you'll also have to regexp-replace the
> > paths
> > after it's been copied.
> 
> Yes, I know that (now). But that is actually the most popular
> solution in:
> 
> https://emacs.stackexchange.com/questions/73922/how-do-you-tell-eglot-and-clangd-about-the-compilation-database-compile-command

Actually, I stand corrected. I certainly remember that way not working
≈2 years ago (last time I tried and learned all that information);
however right now creating a symlink to `compile_commands.json` as well
as just copying does work.

I just tested that on a C project at work by symlinking/copying the
json file, then starting lsp and trying to "goto definition" to a
generated `.h` file that resides in the build dir. It works. I tested
that both with dir called `build` and `build-docs` (in the latter case
`build` dir was absent to make sure).

clangd version 16.0.6



  reply	other threads:[~2024-03-16 20:56 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4wwljrdnra3bsloehioa46y24ozxajajmvf2elvskxxq3mhtg2.ref@pyv2z5snot6h>
2024-03-16 13:12 ` Project out of sources compilation Ergus
2024-03-16 16:50   ` Konstantin Kharlamov
2024-03-16 19:00     ` Ergus
2024-03-16 20:56       ` Konstantin Kharlamov [this message]
2024-03-17  2:53   ` Dmitry Gutov
2024-03-17  7:22     ` Ergus
2024-03-17  8:45       ` Eli Zaretskii
2024-03-17 17:33         ` Ergus
2024-03-17 17:38           ` Eli Zaretskii
2024-03-17 17:58             ` Ergus
2024-03-17 11:36   ` Augusto Stoffel
2024-03-17 17:47     ` Ergus
2024-03-19 18:36       ` Ergus
2024-03-27 16:38         ` [PATCH] " Ergus
2024-03-31  2:41           ` Dmitry Gutov
2024-03-31 21:07             ` Ergus
2024-04-01  7:49               ` Dirk-Jan C. Binnema
2024-04-01 13:52                 ` Ergus
2024-04-01 15:09                   ` Dirk-Jan C. Binnema
2024-04-01 17:18                     ` Ergus
2024-04-02 23:23                   ` Dmitry Gutov
2024-04-03 19:47                     ` Ergus
2024-04-06  2:05                     ` Ergus
2024-04-14  1:44                       ` Dmitry Gutov
2024-04-16 14:56                         ` Ergus
2024-04-22 17:05                         ` Ergus
2024-04-22 18:48                           ` Ergus
2024-04-22 21:20                             ` Mohsin Kaleem
2024-04-23 15:17                               ` Ergus
2024-04-23 19:26                                 ` Mohsin Kaleem
2024-04-26  0:47                               ` Dmitry Gutov
2024-04-02 21:39               ` Richard Stallman
2024-04-02 22:43                 ` Dr. Arne Babenhauserheide
2024-04-05 21:40                   ` Richard Stallman
2024-04-03 10:40                 ` Konstantin Kharlamov
2024-04-03 11:45                   ` Eli Zaretskii
2024-04-03 13:31                     ` Konstantin Kharlamov
2024-04-03 14:11                       ` Eli Zaretskii
2024-04-03 15:00                         ` Konstantin Kharlamov
2024-04-03 15:47                           ` Eli Zaretskii
2024-04-03 17:27                             ` Konstantin Kharlamov
2024-04-03 18:22                               ` Eli Zaretskii
2024-04-03 19:08                                 ` Konstantin Kharlamov
2024-04-03 20:12                                   ` Ergus
2024-04-04  5:26                                     ` Eli Zaretskii
2024-04-04  9:59                                       ` Ergus
2024-04-04 11:59                                         ` Eli Zaretskii
2024-04-04 12:34                                           ` Ergus
2024-04-04 13:02                                             ` Eli Zaretskii
2024-04-04 14:27                                               ` Ergus
2024-04-04 14:41                                                 ` Eli Zaretskii
2024-04-04 18:15                                                   ` Ergus
2024-04-04 18:56                                                     ` Eli Zaretskii
2024-04-04 20:16                                                   ` Konstantin Kharlamov
2024-04-05  5:11                                                     ` Eli Zaretskii
2024-04-04  5:07                                   ` Eli Zaretskii
     [not found]                               ` <87jzlefgi9.fsf@dick>
2024-04-03 18:44                                 ` Konstantin Kharlamov

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=db8a99ad05a7a4739eac05ad421020f06a373797.camel@yandex.ru \
    --to=hi-angel@yandex.ru \
    --cc=dmitry@gutov.dev \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.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.