diff --git a/Build.md b/Build.md index 016a735..41edd6f 100644 --- a/Build.md +++ b/Build.md @@ -5,7 +5,7 @@ To get started building ccls, first install the required dependencies: * CMake 3.1 or higher * C++ Compiler with C++17 support: * Clang 5 or higher - * GCC 5 or higher + * GCC 6 or higher * MSVC 2017 or higher (included with VS2017 Build Tools) After installing the required dependencies, clone the repository along with its @@ -93,3 +93,9 @@ cmake --build release ├── libclang.so.7 -> libclang.so.7.0 └── libclang.so.7.0 ``` + +If you don't have an up-to-date `libstdc++` and want to use `libc++` in the bundled clang+llvm archive: + +```zsh +cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_CXX_COMPILER=clang++ -DCLANG_USE_BUNDLED_LIBC++=on -Brelease -H. +``` \ No newline at end of file diff --git a/Emacs.md b/Emacs.md index 1d79cc2..46eca52 100644 --- a/Emacs.md +++ b/Emacs.md @@ -1,10 +1,12 @@ 1. See [[Getting started]] to build the `bin/ccls` executable 1. Install [lsp-mode](https://github.com/emacs-lsp/lsp-mode) -2. Install [emacs-ccls](https://github.com/ccls-project/emacs-ccls) and [configure](#configure) it +2. Install [emacs-ccls](https://github.com/MaskRay/emacs-ccls) and [configure](#configure) it 3. Open a source file where either [[.ccls|Getting-started#ccls]] or [[compile_commands.json]] is in the project root (it may work without them, though not recommended) 4. `M-x lsp-ccls-enable`. Don't invoke `M-x lsp-mode`. `lsp-ccls-enable` will turn on `lsp-mode` for you -### Install [emacs-ccls](https://github.com/ccls-project/emacs-ccls) +### Install [emacs-ccls](https://github.com/MaskRay/emacs-ccls) + +https://github.com/melpa/melpa/pull/5405 https://melpa.org/#/ccls @@ -29,7 +31,7 @@ The only required configuration is `ccls-executable`. Others have good defaults. #### Projects with subprojects -For each source file that has turned on `lsp-ccls-enable`, variable `ccls-project-roots`, projectile, `compile_commands.json` are consulted to locate the project root and the associated lsp-mode workspace. If your project has subprojects, `(projectile-project-root)` may think files in the subproject belong to the child workspace, which is not desired. `(setq ccls-project-roots '("~/my-root-project" ))` to override projectile roots. +For each source file that has turned on `lsp-ccls-enable`, variable `MaskRay-roots`, projectile, `compile_commands.json` are consulted to locate the project root and the associated lsp-mode workspace. If your project has subprojects, `(projectile-project-root)` may think files in the subproject belong to the child workspace, which is not desired. `(setq MaskRay-roots '("~/my-root-project" ))` to override projectile roots. If you do not mind files in subprojects are treated as part of the whole project in projectile: @@ -64,7 +66,7 @@ The buffer `*lsp-ccls stderr*` and `--log-file=/tmp/cq.log` contain logs. ## [[Initialization options]] -Initialization options are defined in [config.h](https://github.com/ccls-project/ccls/blob/master/src/config.h), but you need to customize them in S-exp. +Initialization options are defined in [config.h](https://github.com/MaskRay/ccls/blob/master/src/config.h), but you need to customize them in S-exp. Use `t` for true, `:json-false` for false, `:json-null` for null. ```elisp @@ -151,7 +153,7 @@ Install [company-lsp](https://github.com/tigersoldier/company-lsp) and add `comp Type `#i"` (or `#include "`) for quote-style includes and `#i<` (or `#include <`) for system headers. -See https://github.com/ccls-project/ccls/pull/391#issuecomment-362872732 for an alternative view (contextual parent as detail, signature as label) +See https://github.com/MaskRay/ccls/pull/391#issuecomment-362872732 for an alternative view (contextual parent as detail, signature as label) ```elisp (setq ccls-extra-init-params '(:completion (:detailedLabel t))) ```