+To enable the LSP client plugin in the editor, add the following snippet into [.filepath]#~/.config/nvim/init.vim# if you are using Neovim, or [.filepath]#~/.vim/vimrc# if you are using Vim:
+Read link:https://github.com/prabirshrestha/vim-lsp/blob/master/README.md#registering-servers[] to learn setting up the keybindings 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 is 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:
+You can also use scan-build from link:https://github.com/rizsotto/scan-build[rizsotto/scan-build] 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, to generate 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 key 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 compilation database is generated, you can 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 is significantly longer before the LSP server is able to give complete result, due to initial background indexing by 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 compilation database, thus you would not see complete results on source files not being compiled during the `make`.