From: Jeff King Date: Wed, 02 Sep 2020 08:04:32 GMT Subject: Re: [PATCH] Makefile: add support for generating JSON compilation database Message-ID: <20200902080432.GB855335@coredump.intra.peff.net> In-Reply-To: <20200902013351.GD241078@camp.crustytoothpaste.net> On Wed, Sep 02, 2020 at 01:33:51AM +0000, brian m. carlson wrote: > Traditionally, editors had to learn about every language if they wanted > to add special functionality like refactoring (e.g., renaming "struct > foo" to "struct bar"), finding all the instances of a type, finding > where a type or function was declared, or similar IDE features. When > Microsoft developed Visual Studio Code, they decided that they did not > want to implement this functionality for every language under the sun, > and instead developed the Language Server Protocol[0]. > [...] Thanks for the explanation. I understand what LSP does, but the missing link for me was how "here are the command-line flags to the compiler" turned into something useful like "here's a list of identifiers". And clangd fills in that gap (presumably re-running the front-end bits of clang on the fly to pull out that kind of information). -Peff