Cleanup `README.md`.

pull/9/head
Joshua Potter 2023-11-26 14:54:42 -07:00
parent 27bc9f7283
commit 3b3041139c
1 changed files with 9 additions and 18 deletions

View File

@ -1,10 +1,9 @@
# Clang Flake Template # Clang Flake Template
This is a template for constructing a working environment for C development with This is a template for constructing a working environment for C development with
the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. [direnv](https://direnv.net/)
can be used to launch a dev shell upon entering this directory (refer to
[direnv](https://direnv.net/) can be used to launch a dev shell upon entering `.envrc`). Otherwise run via:
this directory (refer to `.envrc`). Otherwise, run via:
```bash ```bash
nix develop nix develop
``` ```
@ -15,9 +14,7 @@ The [clangd](https://clangd.llvm.org/) LSP (version 14.0.6) is included in this
flake. The [codelldb](https://github.com/vadimcn/codelldb) VSCode plugin is also flake. The [codelldb](https://github.com/vadimcn/codelldb) VSCode plugin is also
included to interface with the LSP. Note this plugin, despite its name, is included to interface with the LSP. Note this plugin, despite its name, is
compatible with other editors (e.g. neovim). To configure, refer to your compatible with other editors (e.g. neovim). To configure, refer to your
editor's documentation. editor's documentation. To use the LSP across files, a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
To use the LSP across files, a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
must be generated. For this reason, [bear](https://github.com/rizsotto/Bear) must be generated. For this reason, [bear](https://github.com/rizsotto/Bear)
(version 3.1.3) is included in this flake. Use as follows to generate a (version 3.1.3) is included in this flake. Use as follows to generate a
`compile_commands.json` file: `compile_commands.json` file:
@ -28,11 +25,8 @@ $> bear -- <your-build-command>
## Documentation ## Documentation
Documentation is generated using [Doxygen](https://www.doxygen.nl/index.html) Documentation is generated using [Doxygen](https://www.doxygen.nl/index.html)
(version 1.9.7). The included Doxyfile was generated by running: (version 1.9.7). (Re)generate documentation by editing the `Doxyfile` and
```bash running:
$> doxygen -g
```
(Re)generate documentation by editing the `Doxyfile` and running:
```bash ```bash
$> doxygen $> doxygen
``` ```
@ -42,12 +36,9 @@ $> doxygen
Formatting depends on the [clang-format](https://clang.llvm.org/docs/ClangFormat.html) Formatting depends on the [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
(version 14.0.6) tool. Refer to `.clang-format` for default formatting options. (version 14.0.6) tool. Refer to `.clang-format` for default formatting options.
A `pre-commit` hook is included in `.githooks` that can be used to format all A `pre-commit` hook is included in `.githooks` that can be used to format all
`*.c$` and `*.h$` files prior to commit. Install via: `*.c` and `*.h` files prior to commit. Install via:
```bash ```bash
$> git config --local core.hooksPath .githooks/ $> git config --local core.hooksPath .githooks/
``` ```
If running [direnv](https://direnv.net/), this hook is installed automatically. If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory.
## Direnv