diff --git a/.editorconfig b/.editorconfig index 43456223..c92fdf7f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,7 +14,7 @@ indent_style = space indent_size = 2 trim_trailing_whitespace = false -[*.{js,nix,yml,yaml}] +[*.{js,json,nix,yml,yaml}] indent_style = space indent_size = 2 tab_width = 2 diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index b2a26919..66fe9c0f 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -7,14 +7,17 @@ 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, and it will be closed when your pull request is merged. + +A developer package template is provided in flake/develop.nix. If working on a module, you may use +it to test your changes with minimal dependency changes. --> ## Sanity Checking --- diff --git a/.github/README.md b/.github/README.md index 9a059419..01395211 100644 --- a/.github/README.md +++ b/.github/README.md @@ -50,6 +50,7 @@ [Contribute]: #contributing [FAQ]: #frequently-asked-questions [Credits]: #credits +[License]: #license **[
 Features
][Features]** **[
 Get Started 
][Get Started]** @@ -67,6 +68,10 @@ [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 +[release notes]: https://notashelf.github.io/nvf/release-notes.html +[discussions tab]: https://github.com/notashelf/nvf/discussions +[FAQ section]: #frequently-asked-questions +[DAG]: https://en.wikipedia.org/wiki/Directed_acyclic_graph - **Simple**: One language to rule them all! Use Nix to configure everything, with optional Lua support for robust configurability! @@ -79,11 +84,31 @@ 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. - - Lazyloading? We got it! Lazyload both internal and external plugins at will. + - Lazyloading 💤? We got it! Lazyload both internal and external plugins at + will. + - nvf allows _ordering configuration bits_ using [DAG] (_Directed acyclic + graph_)s. It has never been easier to construct an editor configuration + deterministically! + - nvf exposes everything you need to avoid a vendor lock-in. Which means you + can add new modules, plugins and so on without relying on us adding a module + for them! Though, of course, feel free to request them. + - Use plugins from anywhere. Inputs, npins, nixpkgs... You name it. + - Add your own modules, with ease. It's all built-in! - **Well-documented**: Documentation is priority. You will _never_ face undocumented, obscure behaviour. + - Changes, breaking or otherwise, will be communicated in the [release notes] + - Refer to the [FAQ section] for answers to common questions. + - Your question not there? Head to the to the [discussions tab]! - **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and will, remain maintainable for myself and any contributors. +- **Community-Led**: we would like nvf to be fully capable of accomplishing what + you really want it to do. If you have a use case that is not made possible by + nvf, please open an issue (or a pull request!) + - Your feedback is more than welcome! Feedback is what _drives_ nvf forward. + If you have anything to say, or ask, please let us know. + - Pull requests are _always_ welcome. If you think the project can benefit + from something you did locally, but are not quite sure how to upstream, + please feel free to contact us! We'll help you get it done. ## Get Started @@ -173,36 +198,49 @@ fix. [list of open pull requests]: https://github.com/NotAShelf/nvf/pulls **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 [nvf manual] -for available installation instructions. + +**A**: nvf actively supports **Linux and Darwin** platforms using standalone +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 + +**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, 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 -plugin configurations! Please see the documentation on how you may do this. + +**A**: **nvf** exposes several APIs for you to be able to add your own plugin +configurations! Please see the documentation on how you may do this. **Q**: Main branch is awfully silent, is the project dead? -
**A**: No! Sometimes we branch out (e.g. `v0.6`) to avoid breaking -userspace and work in a separate branch until we make sure the new additions are -implemented in the most comfortable way possible for the end user. If you have -not noticed any activity on the main branch, consider taking a look at the + +**A**: No! Sometimes we branch out (e.g. `v0.6`) to avoid breaking userspace and +work in a separate branch until we make sure the new additions are implemented +in the most comfortable way possible for the end user. If you have not noticed +any activity on the main branch, consider taking a look at the [list of branches] or the [list of open pull requests]. You may also consider _testing_ those release branches to get access to new features ahead of time and better prepare to breaking changes. **Q**: Will you support non-flake installations? -
**A**: Quite possibly. **nvf** started as "neovim-flake", which does mean -it is and will remain flakes-first but we might consider non-flakes -compatibility. Though keep in mind that **nvf** under non-flake environments -would lose customizability of plugin inputs, which is one of our primary -features. + +**A**: Quite possibly. **nvf** started as "neovim-flake", which does mean it is +and will remain flakes-first but we might consider non-flakes compatibility. +Though keep in mind that **nvf** under non-flake environments would lose +customizability of plugin inputs, which is one of our primary features. + +**Q**: I prefer working with Lua, can I use nvf as a plugin manager while I use +an imperative path (e.g., `~/.config/nvim`) for my Neovim configuration instead +of a configuration generated from Nix? + +**A**: Yes! Add `"~/.config.nvim"` to `vim.additionalRuntimePaths = [ ... ]` and +any plugins you want to load to `vim.startPlugins`. This will load your +configuration from `~/.config/nvim`. You may still use `vim.*` to modify +Neovim's behaviour with Nix. ## Credits @@ -245,7 +283,7 @@ and everyone who has submitted issues or pull requests! ### Inspiration -This configuration borrows from and is based on a few other configurations, +This configuration borrows from, and is based on a few other configurations, including: - [@jordanisaacs's](https://github.com/jordanisaacs) diff --git a/configuration.nix b/configuration.nix index 2159edc8..15138a2b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,7 @@ # This is the sample configuration for nvf, aiming to give you a feel of the default options -# while certain plugins are enabled. While it may act as one, this is not an overview of nvf's -# module options. To find a complete overview of nvf's options and examples, visit the manual. +# while certain plugins are enabled. While it may partially act as one, this is *not* quite +# an overview of nvf's module options. To find a complete and curated list of nvf module +# options, examples, instruction tutorials and more; please visit the online manual. # https://notashelf.github.io/nvf/options.html isMaximal: { config.vim = { @@ -175,6 +176,7 @@ isMaximal: { icon-picker.enable = isMaximal; surround.enable = isMaximal; diffview-nvim.enable = true; + yanky-nvim.enable = false; motion = { hop.enable = true; leap.enable = true; diff --git a/docs/man/header.5 b/docs/man/header.5 index a28fc3dd..556a113a 100644 --- a/docs/man/header.5 +++ b/docs/man/header.5 @@ -1,13 +1,16 @@ -.TH "nvf" "5" "01/01/1980" "nvf" +.TH "nvf" "5" "January 1, 1980" "nvf" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" enable line breaks after slashes .cflags 4 / + .SH "NAME" -nvf configuration specification -.SH "OPTIONS" -.PP -You can use the following options to configure nvf: -.PP +nvf \- Configuration specification for the nvf. + +.SH "DESCRIPTION" +The nvf configuration specification provides a declarative structure for configuring Neovim using Nix with few +lines of Nix. This document outlines the available options and their usage to create modular, reusable, and +reproducible configurations using nvf's module system options. For tips, tricks and possible quirks with available +plugins please visit https://notashelf.github.io/nvf/ diff --git a/docs/man/nvf.1 b/docs/man/nvf.1 index 0f1e36dc..d7519651 100644 --- a/docs/man/nvf.1 +++ b/docs/man/nvf.1 @@ -1,5 +1,5 @@ .Dd January 1, 1980 -.Dt nvf 1 +.Dt NVF 1 .Os nvf .\" disable hyphenation .nh @@ -7,27 +7,46 @@ .ad l .\" enable line breaks after slashes .cflags 4 / + .Sh NAME .Nm nvf -.Nd A highly modular, extensible and distro-agnostic Neovim configuration framework for Nix/NixOS. -. +.Nd A modular, extensible, and distro-agnostic Neovim configuration framework for Nix/NixOS. + +.Sh DESCRIPTION +.Nm nvf +is a highly modular, configurable, extensible, and easy-to-use Neovim configuration in Nix. +Designed for flexibility and ease of use, nvf allows you to easily configure your fully featured +Neovim instance with a few lines of Nix. + +.Sh COMMANDS +The following commands are bundled with nvf to allow easier debugging of your configuration. + +.Bl -tag -width Ds +.It Nm nvf-print-config +Outputs the full configuration of the current `nvf` setup. This command is useful for debugging +or inspecting the applied configuration. +.Pp +.It Nm nvf-print-config-path +Prints the file path to the configuration file currently in use. This command is helpful for locating +the source configuration file for troubleshooting or easily sharing it via online paste utilities. +.El + .Sh BUGS .Pp -Please report any bugs that you might encounter on the -\m[blue]\fBproject issue tracker\fR\m[]\&. +Please report any bugs on the project issue tracker: +.Lk https://github.com/notashelf/nvf/issues .Sh SEE ALSO .Pp -\fBnvf\fR(5) +.Fn nvf 5 .Sh AUTHOR .Pp -\fBnvf contributors\fR +.Fn nvf contributors .RS 4 -Author. +Primary contributors and maintainers of the project. .RE .Sh COPYRIGHT -.br -Copyright \(co 2023\(en2024 nvf contributors -.br +.Pp +Copyright (c) 2023–2025 nvf contributors. diff --git a/docs/manual.nix b/docs/manual.nix index 4becdf2d..50a5dab4 100644 --- a/docs/manual.nix +++ b/docs/manual.nix @@ -102,7 +102,7 @@ in --script script/anchor-use.js \ --script script/anchor-min.js \ --script script/search.js \ - --toc-depth 2 \ + --toc-depth 1 \ --section-toc-depth 1 \ manual.md \ "$dest/index.xhtml" diff --git a/docs/manual/options.md b/docs/manual/options.md index 3b70484f..61282dfa 100644 --- a/docs/manual/options.md +++ b/docs/manual/options.md @@ -1,9 +1,13 @@ -# Neovim Flake Configuration Options {#ch-options} +# nvf Configuration Options {#ch-options} Below are the module options provided by nvf, in no particular order. Most options will include useful comments, warnings or setup tips on how a module option is meant to be used as well as examples in complex cases. +An offline version of this page is bundled with nvf as a part of the manpages +which you can access with `man 5 nvf`. Please us know if you believe any of the +options below are missing useful examples. +