online icon indicating copy to clipboard operation
online copied to clipboard

VSCodium/clangd: Add generation of .clangd and .vscode files to ease editing via IDE/language-server

Open sgothel opened this issue 6 months ago • 0 comments

Is your feature request related to a problem?

To allow a fast forward utilization of clang language server IDE's like VSCodium, I like our build system to generate required support files.

Goal is to allow easy editing including full clangd support, e.g. formatting, includes, tidy, refactor.

It is not a goal to support building nor debugging.

Describe the solution you'd like

Our build system, i.e. Makefile.am, should have rules to generate useful support files, e.g.

  • compile_commands.json
    • already supported via make compile_commands
  • .clangd
    • in addition to compile_commands.json, allowing setting include defaults and workspace-dir as well as other clangd settings
  • .vscode/settings.json
    • VSCodium workspace settings
  • .vscode/online.code-workspace
    • VSCodium workspace project file

A simple make gen-vscode should ensure generation of the above files, to launch a clang language server IDE, here VSCodium.

Eclipse CDT-LSP might be also of interest here.

This is similar to LibreOffice's vscode-ide-integration make target.

sgothel avatar Aug 09 '24 23:08 sgothel