From 4df7591d78b20c8f31dd85b946cc3833674c121d Mon Sep 17 00:00:00 2001 From: Igor Lacerda <84649544+igorlfs@users.noreply.github.com> Date: Sat, 16 Oct 2021 23:45:02 -0300 Subject: docs: mention Bear can generate compile_commands.json (#1318) --- lua/lspconfig/ccls.lua | 2 +- lua/lspconfig/clangd.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/ccls.lua b/lua/lspconfig/ccls.lua index 0cff78e1..d7170662 100644 --- a/lua/lspconfig/ccls.lua +++ b/lua/lspconfig/ccls.lua @@ -16,7 +16,7 @@ https://github.com/MaskRay/ccls/wiki ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json or, for simpler projects, a compile_flags.txt. -For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). +For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example: diff --git a/lua/lspconfig/clangd.lua b/lua/lspconfig/clangd.lua index e8876af6..0e6543a9 100644 --- a/lua/lspconfig/clangd.lua +++ b/lua/lspconfig/clangd.lua @@ -68,7 +68,7 @@ https://clangd.llvm.org/installation.html clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json or, for simpler projects, a compile_flags.txt. -For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). +For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). ]], default_config = { root_dir = [[root_pattern("compile_commands.json", "compile_flags.txt", ".git") or dirname]], -- cgit v1.2.3-70-g09d2