+To enable the LSP client plugin in the editor, add the following snippet into [.filepath]#~/.config/nvim/init.vim# when using Neovim, or [.filepath]#~/.vim/vimrc# when using Vim:
+Please refer to link:https://github.com/prabirshrestha/vim-lsp/blob/master/README.md#registering-servers[] to learn about setting up key bindings and code completion.
+The official site of clangd is link:https://clangd.llvm.org[], and the repository link of ccls is link:https://github.com/MaskRay/ccls/[].
+
+Below are the reference settings of keybindings and code completions.
+Put the following snippet into [.filepath]#~/.config/nvim/init.vim#, or [.filepath]#~/.vim/vimrc# for Vim users to use it:
+link:https://github.com/rizsotto/scan-build[rizsotto/scan-build] can be used instead of LLVM's scan-build-py.
+The LLVM's scan-build-py was rizsotto/scan-build merged into the LLVM tree.
+This implementation can be installed by `pip install --user scan-build`.
+The `intercept-build` script is in [.filename]#~/.local/bin# by default.
+
+===== Usage
+
+In the top-level directory of the FreeBSD src tree, generate the compilation database with `intercept-build`:
+
+[source,shell]
+....
+# intercept-build --append make buildworld buildkernel -j`sysctl -n hw.ncpu`
+....
+
+The `--append` flag tells the `intercept-build` to read an existing compilation database (if a compilation database exists) and append the results to the database.
+Entries with duplicated command keys are merged.
+The generated compilation database by default is saved in the current working directory as [.filename]#compiler_commands.json#.
+
+[[generators-bear]]
+==== Using devel/bear
+
+===== Usage
+
+In the top-level directory of the FreeBSD src tree, to generate compilation database with `bear`:
+
+[source,shell]
+....
+# bear -a make buildworld buildkernel -j`sysctl -n hw.ncpu`
+....
+
+The `-a` flag tells `bear` to read an existing compilation database if it is present, and append the results to the database.
+Entries with duplicated command key are merged.
+The generated compilation database by default is saved in the current working directory as [.filename]#compiler_commands.json#.
+
+[[final]]
+== Final
+
+Once the compilation database is generated, open any source files in the FreeBSD src tree and LSP server daemon will be launched as well in background.
+Opening source files in the src tree for the first time takes significantly longer time before the LSP server is able to give a complete result, due to initial background indexing by the LSP server compiling all the listed entries in the compilation database.
+The language server daemon however does not index the source files not appearing in the compilation database, thus no complete results are shown on source files not being compiled during the `make`.