Problem:
The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.
Solution:
Re-implement the flow using Lua, LPEG and treesitter.
- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
- LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
- LPEG for C parsing (see `scripts/cdoc_parser.lua`)
- Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
- Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
- `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
* fix(flake): clang-tools moved to nativeBuildInputs
Buildtime binaries should go in `nativeBuildInputs`
Before `clang-tools` version was overwriten breaking the Lsp.
Relevant issues:
https://github.com/NixOS/nixpkgs/issues/76486
* remove cmake, available in the nixpkgs derivation
Updated inputs so no need to add tree-sitter ourselves anymore.
Added checks:
- for pylint/shlint
- distinguish the devolpment shell from the ASAN build (closure for ASAN
version is smaller). While in the devShell, functionaltests would fail
because bin/nvim could not load
outputs/out/share/nvim/syntax/syntax.vim
So we touch the file.
`flakes` is a feature available in the unstable version of the `nix` package manager
to ease the distribution of nix expressions see https://www.tweag.io/blog/2020-05-25-flakes/ .
Nix excels at software reproducibility and is available/can be
installed on different distributions (ubuntu/void/debian etc) as well
as macOS.
This flakes contains 3 packages that can be installed via for instance
`nix run 'github:neovim/neovim?dir=contrib#nvim-debug'`
or
`nix run 'github:neovim/neovim?dir=contrib'` for the default version.
you can register an alias
`nix registry add neovim 'github:neovim/neovim?dir=contrib'`
and the previous commands become:
`nix run neovim`