Changes between Version 1 and Version 2 of Clangd


Ignore:
Timestamp:
Feb 21, 2022, 3:38:46 PM (3 years ago)
Author:
Brandon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clangd

    v1 v2  
    11==  Clangd
     2
     3[https://clangd.llvm.org clangd] is language server designed to provide features like autocomplete, go to definition, and refactoring to a wide range of editors.
     4
     5== Setting up clangd
     6
     7=== Generate compile_command.json
     8
     9==== macOS
     10clangd relies on compile_commands.json file to work, which can be generated on macOS by running
     11
     12{{{
     13make r EXPORT_COMPILE_COMMANDS=YES
     14generate-compile-commands WebKitBuild/Release
     15}}}
     16
     17I would recommend running this command each time you pull the latest code.
     18
     19If you add or remove files during development, just compile with make and run the {{{generate-compile-commands}}}.
     20
     21
     22==== Linux and Windows
     23
     24For other platforms using cmake, generating compile_commands.json can be accomplished by running
     25
     26
     27{{{
     28cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
     29}}}
     30
     31
     32=== Configure your editor
     33
     34Every editor will have slightly different method to setup clangd.
     35
     36The clangd website provides an excellent setup guide for most popular editors.
     37
     38
     39||= Editors =||= Links =||
     40|| BBEdit ||          https://www.barebones.com/support/bbedit/lsp-notes.html||
     41|| Clion ||          https://www.jetbrains.com/help/clion/settings-languages-cpp-clangd.html||
     42|| Emacs ||          https://clangd.llvm.org/installation#editor-plugins||
     43|| Vim ||          https://clangd.llvm.org/installation#editor-plugins||
     44|| VSCode ||          https://clangd.llvm.org/installation#editor-plugins||
     45|| Sublime Text ||          https://clangd.llvm.org/installation#editor-plugins||