From 56a6e0573c46585c1773d49e60ca8fcd82eaabd7 Mon Sep 17 00:00:00 2001
From: NotAShelf
Date: Mon, 4 Nov 2024 17:00:28 +0300
Subject: [PATCH 1/5] flake: improve deprecation messages for old
`neovim-flake` modules'
---
flake.nix | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/flake.nix b/flake.nix
index 987e3e5..404aeaf 100644
--- a/flake.nix
+++ b/flake.nix
@@ -30,29 +30,25 @@
};
homeManagerModules = {
+ nvf = import ./flake/modules/home-manager.nix self.packages lib;
+ default = self.homeManagerModules.nvf;
neovim-flake =
lib.warn ''
- homeManagerModules.neovim-flake has been deprecated.
- Plese use the homeManagerModules.nvf instead
+ 'homeManagerModules.neovim-flake' has been deprecated, and will be removed
+ in a future release. Please use 'homeManagerModules.nvf' instead.
''
self.homeManagerModules.nvf;
-
- nvf = import ./flake/modules/home-manager.nix self.packages lib;
-
- default = self.homeManagerModules.nvf;
};
nixosModules = {
+ nvf = import ./flake/modules/nixos.nix self.packages lib;
+ default = self.nixosModules.nvf;
neovim-flake =
lib.warn ''
- nixosModules.neovim-flake has been deprecated.
- Please use the nixosModules.nvf instead
+ 'nixosModules.neovim-flake' has been deprecated, and will be removed
+ in a future release. Please use 'nixosModules.nvf' instead.
''
self.nixosModules.nvf;
-
- nvf = import ./flake/modules/nixos.nix self.packages lib;
-
- default = self.nixosModules.nvf;
};
};
From 3c8b50ed8624d9e15f6d201fc68892b48532c336 Mon Sep 17 00:00:00 2001
From: NotAShelf
Date: Mon, 4 Nov 2024 17:23:18 +0300
Subject: [PATCH 2/5] docs: clean up project README
---
.github/README.md | 72 ++++++++++++++++++++++++++++++-----------------
1 file changed, 46 insertions(+), 26 deletions(-)
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!
From e8d94ffc4de20829a458cb298458dbe56e2ab381 Mon Sep 17 00:00:00 2001
From: NotAShelf
Date: Mon, 4 Nov 2024 17:38:45 +0300
Subject: [PATCH 3/5] docs: fix typo in standalone installation pages
---
docs/manual/installation/standalone/home-manager.md | 2 +-
docs/manual/installation/standalone/nixos.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/manual/installation/standalone/home-manager.md b/docs/manual/installation/standalone/home-manager.md
index db1ae63..1f5d55c 100644
--- a/docs/manual/installation/standalone/home-manager.md
+++ b/docs/manual/installation/standalone/home-manager.md
@@ -1,6 +1,6 @@
# Standalone Installation on Home-Manager {#ch-standalone-hm}
-Your built Neoevim configuration can be exposed as a flake output to make it
+Your built Neovim configuration can be exposed as a flake output to make it
easier to share across machines, repositories and so on. Or it can be added to
your system packages to make it available across your system.
diff --git a/docs/manual/installation/standalone/nixos.md b/docs/manual/installation/standalone/nixos.md
index 2e6343a..33235ac 100644
--- a/docs/manual/installation/standalone/nixos.md
+++ b/docs/manual/installation/standalone/nixos.md
@@ -1,6 +1,6 @@
# Standalone Installation on NixOS {#ch-standalone-nixos}
-Your built Neoevim configuration can be exposed as a flake output to make it
+Your built Neovim configuration can be exposed as a flake output to make it
easier to share across machines, repositories and so on. Or it can be added to
your system packages to make it available across your system.
From fa8472375e94d4f8f53df9f0c2f3def086a942ce Mon Sep 17 00:00:00 2001
From: NotAShelf
Date: Mon, 4 Nov 2024 17:39:10 +0300
Subject: [PATCH 4/5] docs/installation: add standalone flake example
---
.../installation/custom-configuration.md | 54 +++++++++++++++++--
1 file changed, 51 insertions(+), 3 deletions(-)
diff --git a/docs/manual/installation/custom-configuration.md b/docs/manual/installation/custom-configuration.md
index 408b039..64ae64e 100644
--- a/docs/manual/installation/custom-configuration.md
+++ b/docs/manual/installation/custom-configuration.md
@@ -1,8 +1,9 @@
# Standalone Installation {#ch-standalone-installation}
-It is possible to install **nvf** without depending on NixOS or home-manager as the parent
-module system, using the `neovimConfiguration` function exposed by **nvf** extended library.
-It takes in the configuration as a module, and returns an attribute set as a result.
+It is possible to install nvf without depending on NixOS or Home-Manager as the
+parent module system, using the `neovimConfiguration` function exposed in the
+extended library. This function will take `modules` and `extraSpecialArgs` as
+arguments, and return the following schema as a result.
```nix
{
@@ -13,6 +14,53 @@ It takes in the configuration as a module, and returns an attribute set as a res
}
```
+An example flake that exposes your custom Neovim configuration might look like
+
+```nix
+{
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ nvf.url = "github:notashelf/nvf";
+ };
+
+ outputs = {
+ self,
+ nixpkgs,
+ ...
+ } @ inputs: {
+ packages."x86_64-linux" = let
+ neovimConfigured = (inputs.nvf.lib.neovimConfiguration {
+ inherit (nixpkgs.legacyPackages."x86_64-linux") pkgs;
+ modules = [{
+ config.vim = {
+ # Enable custom theming options
+ theme.enable = true;
+
+ # Enable Treesitter
+ tree-sitter.enable = true;
+
+ # Other options will go here. Refer to the config
+ # reference in Appendix B of the nvf manual.
+ # ...
+ };
+ }];
+ });
+ in {
+ # Set the default package to the wrapped instance of Neovim.
+ # This will allow running your Neovim configuration with
+ # `nix run` and in addition, sharing your configuration with
+ # other users in case your repository is public.
+ default = neovimConfigured.neovim;
+ };
+ };
+}
+```
+
+
+
+The next two chapters will detail specific usage of standalone nvf
+configurations on NixOS and Home-Manager.
+
```{=include=} chapters
standalone/nixos.md
standalone/home-manager.md
From eb1f4cd98ec704ff7118cce9e0334383e5036c39 Mon Sep 17 00:00:00 2001
From: NotAShelf
Date: Mon, 4 Nov 2024 17:39:23 +0300
Subject: [PATCH 5/5] docs: add preface to modules chapter
---
docs/manual/installation/modules.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/manual/installation/modules.md b/docs/manual/installation/modules.md
index d8462e9..f78046d 100644
--- a/docs/manual/installation/modules.md
+++ b/docs/manual/installation/modules.md
@@ -1,5 +1,9 @@
# Module Installation {#ch-module-installation}
+The below chapters will describe installing nvf as NixOS and Home-Manager
+modules. Note that those methods are mutually exclusive, and will likely cause
+path collisions if used simultaneously.
+
```{=include=} chapters
modules/nixos.md
modules/home-manager.md