diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index d85c28d..a43a944 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -8,23 +8,42 @@
## Welcome
-I'm glad you are thinking about contributing to neovim-flake! If you're unsure about anything, just ask - or submit the issue or pull request anyway. The worst that can happen is you'll be politely asked to change something. Friendly contributions are always welcome.
+I'm glad you are thinking about contributing to nvf! If you're unsure about
+anything, just ask - or submit the issue or pull request anyway. The worst that
+can happen is you'll be politely asked to change something. Friendly
+contributions are always welcome.
-Before you contribute, I encourage you to read this project's CONTRIBUTING policy (you are here), its [LICENSE](LICENSE.md), and its [README](README.md).
+Before you contribute, I encourage you to read this project's CONTRIBUTING
+policy (you are here) and its [LICENSE](../LICENSE) to understand how your
+contributions are licensed.
-If you have any questions regarding those files, feel free to open an issue or [shoot me an email](mailto:me@notashelf.dev). Discussions tab is also available for more informal discussions.
+If you have any questions regarding those files, feel free to open an issue or
+[shoot me an email](mailto:me@notashelf.dev). Discussions tab is also available
+for more informal discussions.
## Contributing
-The contribution process is mostly documented in the [pull request template](pull_request_template.md). You will find a checklist of items to complete before submitting a pull request. Please make sure you complete it before submitting a pull request. If you are unsure about any of the items, please ask.
+The contribution process is mostly documented in the
+[pull request template](PULL_REQUEST_TEMPLATE/pull_request_template.md). You
+will find a checklist of items to complete before submitting a pull request.
+Please make sure you complete it before submitting a pull request. If you are
+unsure about any of the items, please ask.
### Guidelines
-We provide instructions on a healthy contribution to neovim-flake - including styling, commit formats, how-to guides for adding new modules and options.
-You are very well recommended to read the contributing guideliner over at [the documentation](https://notashelf.github.io/neovim-flake#hacking)
+We provide instructions on a healthy contribution to neovim-flake - including
+styling, commit formats, how-to guides for adding new modules and options. You
+are very well recommended to read the contributing guidelines over at
+[the documentation](https://notashelf.github.io/nvf#hacking)
### Code of Conduct
-This project does not quite have a code of conduct yet. And to be honest, I'm not sure if I want one or if it will ever have one. I'm not expecting this project to be a hotbed of activity, but I do want to make sure that everyone who does contribute feels welcome and safe. As such, I will do my best to make sure that those who distrupt the project are dealt with swiftly and appropriately.
+This project does not quite have a code of conduct yet. And to be perfectly
+honest, I'm not sure if I want one or if it will ever have one. I'm not
+expecting this project to be a hotbed of activity, but I do want to make sure
+that everyone who does contribute feels welcome and safe. As such, I will do my
+best to make sure that those who distrupt the project are dealt with swiftly and
+appropriately.
-If you feel that you are not being treated with respect, please contact me directly.
+If you feel that you are not being treated with respect, please contact me
+directly.
diff --git a/.github/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
similarity index 83%
rename from .github/pull_request_template.md
rename to .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
index 7768d36..b2a2691 100644
--- a/.github/pull_request_template.md
+++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
@@ -6,7 +6,7 @@ or dependency in this section.
If your pull request aims to fix an open issue or a please bug, please also link the relevant issue
below this line. You may attach an issue to your pull request with `Fixes #` outside
-this comment.
+this comment, and it will be closed when your pull request is merged.
-->
## Sanity Checking
@@ -23,20 +23,20 @@ it above in your description.
[editorconfig]: https://editorconfig.org
[changelog]: https://github.com/NotAShelf/nvf/tree/main/docs/release-notes
-- [ ] I have updated the [changelog] as per my changes.
-- [ ] I have tested, and self-reviewed my code.
+- [ ] I have updated the [changelog] as per my changes
+- [ ] I have tested, and self-reviewed my code
- Style and consistency
- - [ ] I ran **Alejandra** to format my code (`nix fmt`).
- - [ ] My code conforms to the [editorconfig] configuration of the project.
- - [ ] My changes are consistent with the rest of the codebase.
+ - [ ] I ran **Alejandra** to format my code (`nix fmt`)
+ - [ ] My code conforms to the [editorconfig] configuration of the project
+ - [ ] My changes are consistent with the rest of the codebase
- If new changes are particularly complex:
- [ ] My code includes comments in particularly complex areas
- - [ ] I have added a section in the manual.
- - [ ] _(For breaking changes)_ I have included a migration guide.
+ - [ ] I have added a section in the manual
+ - [ ] _(For breaking changes)_ I have included a migration guide
- Package(s) built:
- [ ] `.#nix` (default package)
- [ ] `.#maximal`
- - [ ] `.#docs-html`
+ - [ ] `.#docs-html` (manual, must build)
- Tested on platform(s)
- [ ] `x86_64-linux`
- [ ] `aarch64-linux`
diff --git a/.github/README.md b/.github/README.md
index 531d062..029f2fc 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -48,7 +48,7 @@
[Documentation]: #documentation
[Help]: #help
[Contribute]: #contributing
-[FAQ]: #faq
+[FAQ]: #frequently-asked-questions
[Credits]: #credits
**[
Features
][Features]**
@@ -56,7 +56,7 @@
**[
Documentation
][Documentation]**
**[
Help
][Help]**
**[
Contribute
][Contribute]**
-**[
FAQ
][Faq]** **[
Credits
][Credits]**
+**[
FAQ
][FAQ]** **[
Credits
][Credits]**
@@ -64,12 +64,21 @@
## Features
+[standalone]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-installation
+[NixOS module]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-nixos
+[Home-Manager module]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-hm
+
+- **Simple**: One language to rule them all! Use Nix to configure everything,
+ with additional Lua Support
- **Reproducible**: Your configuration will behave the same _anywhere_. No
surprises, promise!
- **Portable**: nvf depends _solely_ on your Nix store, and nothing else. No
more global binaries! Works on all platforms, without hassle.
+ - Options to install [standalone], [NixOS module] or [Home-Manager module].
- **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully
customizable through the Nix module system.
+- Not comfortable with a full-nix config or want to bring your Lua config? You
+ can do just that, no unnecessary restrictions.
- **Well-documented**: Documentation is priority. You will _never_ face
undocumented, obscure behaviour.
- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and
@@ -120,7 +129,9 @@ instructions.
## Documentation
-The _recommended_ way of installing **nvf** is using either the NixOS or the
+### Installation
+
+The _recommended_ way of installing nvf is using either the NixOS or the
Home-Manager module, though it is completely possible and no less supported to
install **nvf** as a standalone package, or a flake output.
@@ -138,11 +149,13 @@ Please create an issue on the [issue tracker] if you find the documentation
lacking or confusing. Any improvements to the documentation through pull
requests are also welcome, and appreciated.
-## Help
+## Getting Help
-You can create an issue on the [issue tracker] to ask questions or report bugs.
-I am not yet on spaces like matrix or IRC, so please use the issue tracker for
-now.
+If you are confused, stuck or would like to ask a simple question; you may
+create an issue on the [issue tracker] to ask questions or report bugs.
+
+We are not not yet on spaces like matrix or IRC, so please use the issue tracker
+for now.
## Contributing
@@ -152,7 +165,7 @@ submitting a pull request. You can also create an issue on the [issue tracker]
before submitting a pull request if you would like to discuss a feature or bug
fix.
-## FAQ
+## Frequently Asked Questions
[appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose
[list of branches]: https://github.com/NotAShelf/nvf/branches
@@ -160,13 +173,15 @@ fix.
**Q**: What platforms are supported?
**A**: nvf actively supports Linux and Darwin platforms using standalone
-Nix, NixOS or Home-Manager. Please take a look at the
+Nix, NixOS or Home-Manager. Please take a look at the [nvf manual] for available
+installation instructions.
**Q**: Can you add _X_?
**A**: Maybe! It is not one of our goals to support each and every Neovim
plugin, however, I am always open to new modules and plugin setup additions to
**nvf**. Use the [appropriate issue template] and I will consider a module
-addition. As mentioned before, PRs adding new features are also welcome.
+addition. As mentioned before, pull requests to add new features are also
+welcome.
**Q**: A plugin I need is not available in **nvf**. What to do?
**A**: **nvf** exposes several APIs for you to be able to add your own
@@ -185,22 +200,26 @@ better prepare to breaking changes.
### Contributors
-Special, heart-felt thanks to
+[mnw]: https://github.com/gerg-l/mnw
-- [@fufexan](https://github.com/fufexan) - For the transition to flake-parts
-- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to
- work
+nvf would not be what it is today without the awesome people below. Special,
+heart-felt thanks to
+
+- [@fufexan](https://github.com/fufexan) - For the transition to flake-parts and
+ invaluable Nix assistance.
+- [@FlafyDev](https://github.com/FlafyDev) - For getting home-manager module to
+ work and Nix assistance.
- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally
- possible
+ possible, and other module additions.
- [@horriblename](https://github.com/horriblename) - For actively implementing
- planned features and quality of life updates
+ planned features and quality of life updates.
- [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo
- [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I
- could not
-- [@Diniamo](https://github.com/Diniamo) - For actively submitting PRs, pull
- requests and overall assistence
-- [@Gerg-l](https://github.com/gerg-l) - For the modern Neovim wrapper, mnw and
- occasional code improvements
+ could not.
+- [@Diniamo](https://github.com/Diniamo) - For actively submitting pull
+ requests, issues and assistance with maintenance of nvf.
+- [@Gerg-l](https://github.com/gerg-l) - For the modern Neovim wrapper, [mnw],
+ and occasional code improvements.
and everyone who has submitted issues or pull requests!
@@ -214,7 +233,7 @@ including:
is originally based on.
- [@sioodmy's](https://github.com/sioodmy)
[dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design
- choices.
+ choices for UI and plugin defaults.
- [@wiltaylor's](https://github.com/wiltaylor)
[neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and
design ideas.
@@ -229,10 +248,11 @@ recommend checking their work out.
## License
Following the license of the
-[original neovim-flake](https://github.com/jordanisaacs/neovim-flake), **nvf**
-has been made available under the [**MIT License**](LICENSE). However, all
-assets and documentation are published under the
-[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE).
+[original neovim-flake](https://github.com/jordanisaacs/neovim-flake), nvf has
+been made available under the [**MIT License**](LICENSE). However, all assets
+and documentation are published under the
+[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE)
+under explicit permission by the artist.
Yes, this includes the logo work too. Stop taking artwork that is not yours!
diff --git a/.github/typos.toml b/.github/typos.toml
new file mode 100644
index 0000000..df76201
--- /dev/null
+++ b/.github/typos.toml
@@ -0,0 +1,2 @@
+
+default.extend-ignore-words-re = ["(?i)(noice)", "befores", "annote", "viw"]
diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml
index 18e6a2e..b543c81 100644
--- a/.github/workflows/check-docs.yml
+++ b/.github/workflows/check-docs.yml
@@ -19,19 +19,12 @@ jobs:
- docs-manpages
- docs-json
steps:
- - uses: easimon/maximize-build-space@v10
- with:
- overprovision-lvm: true
- remove-android: true
- remove-dotnet: true
- remove-haskell: true
-
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- - uses: actions/checkout@v4
- name: Checkout
+ - name: Checkout
+ uses: actions/checkout@v4
- name: Set default git branch (to reduce log spam)
run: git config --global init.defaultBranch main
@@ -49,3 +42,16 @@ jobs:
with:
name: "${{ matrix.package }}"
path: result/share/doc/nvf
+ flake-docs-linkcheck:
+ name: Validate hyperlinks in documentation sources
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@main
+ - uses: DeterminateSystems/magic-nix-cache-action@main
+
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Build documentation packages
+ run: nix build .#docs-linkcheck -Lv
diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml
index 68176c7..d411c89 100644
--- a/.github/workflows/editorconfig.yml
+++ b/.github/workflows/editorconfig.yml
@@ -15,7 +15,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api \
- repos/notashelf/neovim-flake/pulls/${{github.event.number}}/files --paginate \
+ repos/notashelf/nvf/pulls/${{github.event.number}}/files --paginate \
| jq '.[] | select(.status != "removed") | .filename' \
> "$HOME/changed_files"
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml
index 23381e4..5b66c8a 100644
--- a/.github/workflows/manual.yml
+++ b/.github/workflows/manual.yml
@@ -47,7 +47,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: |
- nix build .#docs
+ nix build .#docs -Lv
cp -r result/share/doc/nvf public
- uses: peaceiris/actions-gh-pages@v4
with:
diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml
new file mode 100644
index 0000000..d74ee5b
--- /dev/null
+++ b/.github/workflows/typos.yml
@@ -0,0 +1,30 @@
+name: "Check for typos in the source tree"
+
+permissions: read-all
+
+on:
+ pull_request:
+ workflow_dispatch:
+ push:
+
+jobs:
+ check-typos:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.pull_request.title, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Check for typos
+ uses: crate-ci/typos@master
+ with:
+ config: .github/typos.toml
+
+ - name: Fail Gracefully
+ if: ${{ failure() }}
+ shell: bash
+ run: |
+ echo "::error:: Current codebase contains typos that were caught by the CI!"
+ echo "If those typos were intentional, please add them to the ignored regexes in .github/typos.toml"
+ echo "[skip ci] label may be used if this is a one-time issue"
+ exit 1
diff --git a/docs/manual.nix b/docs/manual.nix
index f5b23d0..531a6d4 100644
--- a/docs/manual.nix
+++ b/docs/manual.nix
@@ -1,63 +1,112 @@
{
lib,
stdenvNoCC,
+ fetchzip,
+ runCommandLocal,
# build inputs
nixos-render-docs,
documentation-highlighter,
+ dart-sass,
path,
# nrd configuration
release,
optionsJSON,
-}:
-stdenvNoCC.mkDerivation {
- name = "nvf-manual";
- src = builtins.path {
- path = lib.sourceFilesBySuffices ./manual [".md"];
- name = "nvf-manual";
+} @ args: let
+ manual-release = args.release or "unstable";
+
+ scss-reset = fetchzip {
+ url = "https://github.com/Frontend-Layers/scss-reset/archive/refs/tags/1.4.2.zip";
+ hash = "sha256-cif5Sx8Ca5vxdw/mNAgpulLH15TwmzyJFNM7JURpoaE=";
};
- nativeBuildInputs = [nixos-render-docs];
+ compileStylesheet = runCommandLocal "compile-nvf-stylesheet" {} ''
+ mkdir -p $out
- buildPhase = ''
- dest="$out/share/doc/nvf"
- mkdir -p "$(dirname "$dest")"
- mkdir -p $dest/{highlightjs,media}
+ tmpfile=$(mktemp -d)
+ trap "rm -r $tmpfile" EXIT
- cp -vt $dest/highlightjs \
- ${documentation-highlighter}/highlight.pack.js \
- ${documentation-highlighter}/LICENSE \
- ${documentation-highlighter}/mono-blue.css \
- ${documentation-highlighter}/loader.js
+ ln -s "${scss-reset}/build" "$tmpfile/scss-reset"
- substituteInPlace ./options.md \
- --subst-var-by \
- OPTIONS_JSON \
- ${optionsJSON}/share/doc/nixos/options.json
+ ${dart-sass}/bin/sass --load-path "$tmpfile" \
+ ${./static/style.scss} "$out/style.css"
- substituteInPlace ./manual.md \
- --subst-var-by \
- NVF_VERSION \
- ${release}
-
- # copy stylesheet
- cp ${./static/style.css} "$dest/style.css"
-
- # copy release notes
- cp -vr ${./release-notes} release-notes
-
- # generate manual from
- nixos-render-docs manual html \
- --manpage-urls ${path + "/doc/manpage-urls.json"} \
- --revision ${lib.trivial.revisionWithDefault release} \
- --stylesheet style.css \
- --script highlightjs/highlight.pack.js \
- --script highlightjs/loader.js \
- --toc-depth 2 \
- --section-toc-depth 1 \
- manual.md \
- "$dest/index.xhtml"
-
- mkdir -p $out/nix-support/
- echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products
+ echo "Generated styles"
'';
-}
+in
+ stdenvNoCC.mkDerivation {
+ name = "nvf-manual";
+ src = builtins.path {
+ name = "nvf-manual-${manual-release}";
+ path = lib.sourceFilesBySuffices ./manual [".md" ".md.in"];
+ };
+
+ strictDependencies = true;
+ nativeBuildInputs = [nixos-render-docs];
+
+ postPatch = ''
+ ln -s ${optionsJSON}/share/doc/nixos/options.json ./config-options.json
+ '';
+
+ buildPhase = ''
+ dest="$out/share/doc/nvf"
+ mkdir -p "$(dirname "$dest")"
+ mkdir -p $dest/{highlightjs,script}
+
+ # Copy highlight scripts to /highlights in document root.
+ cp -vt $dest/highlightjs \
+ ${documentation-highlighter}/highlight.pack.js \
+ ${documentation-highlighter}/LICENSE \
+ ${documentation-highlighter}/mono-blue.css \
+ ${documentation-highlighter}/loader.js
+
+ # Copy anchor scripts to the script directory in document root.
+ cp -vt "$dest"/script \
+ ${./static/script}/anchor-min.js \
+ ${./static/script}/anchor-use.js
+
+ substituteInPlace ./options.md \
+ --subst-var-by OPTIONS_JSON ./config-options.json
+
+ substituteInPlace ./manual.md \
+ --subst-var-by NVF_VERSION ${manual-release}
+
+ substituteInPlace ./hacking/additional-plugins.md \
+ --subst-var-by NVF_REPO "https://github.com/notashelf/nvf/blob/${manual-release}"
+
+ # Move compiled stylesheet
+ cp -vt $dest \
+ ${compileStylesheet}/style.css
+
+ # Move release notes
+ cp -vr ${./release-notes} release-notes
+
+ # Generate final manual from a set of parameters. Explanation of the CLI flags are
+ # as follows:
+ #
+ # 1. --manpage-urls will allow you to use manual pages as they are defined in
+ # the nixpkgs documentation.
+ # 2. --revision is the project revision as it is defined in 'release.json' in the
+ # repository root
+ # 3. --script will inject a given Javascript file into the resulting pages inside
+ # the