From c957b23aaa97034d075fffd303afb86140aa7620 Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 26 Sep 2024 17:07:04 +0200 Subject: [PATCH 1/9] docs: fix dead links in CONTRIBUTING + put PR template in its appropriate location (#384) --- .github/CONTRIBUTING.md | 2 +- .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md (100%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 436a68ec..d85c28da 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,7 +16,7 @@ If you have any questions regarding those files, feel free to open an issue or [ ## Contributing -The contribution process is mostly documented in the [pull request template](.github/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.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 diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/pull_request_template.md From ab9a7c16003b245f0f0076aaf0480b525ad5f94b Mon Sep 17 00:00:00 2001 From: raf Date: Sat, 28 Sep 2024 18:28:17 +0000 Subject: [PATCH 2/9] modules/wrapper: add `vim.options` (#386) * wrapper/rc: add `vim.options` Translates an attribute set of values into `vim.o` values in a key-value format. * docs: document addition of optionsScript * wrapper/rc: don't filter null values in {options,global}Script * wrapper/rc: add examples to vim.options & vim.globals; wording --- docs/manual/configuring/dag-entries.md | 17 +++++++++------ modules/wrapper/rc/config.nix | 14 +++++++----- modules/wrapper/rc/options.nix | 30 ++++++++++++++++++++++---- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/docs/manual/configuring/dag-entries.md b/docs/manual/configuring/dag-entries.md index d5afa9b6..402cde66 100644 --- a/docs/manual/configuring/dag-entries.md +++ b/docs/manual/configuring/dag-entries.md @@ -5,16 +5,19 @@ can add code that relies on other code. However, if you don't know what the entries are called, it's hard to do that, so here is a list of the internal entries in nvf: -`vim.luaConfigRC` (top-level DAG): +## `vim.luaConfigRC` (top-level DAG) {#ch-vim-luaconfigrc} 1. (`luaConfigPre`) - not a part of the actual DAG, instead, it's simply inserted before the rest of the DAG 2. `globalsScript` - used to set globals defined in `vim.globals` 3. `basic` - used to set basic configuration options -4. `theme` (this is simply placed before `pluginConfigs`, meaning that surrounding entries don't depend on it) - used to set up the theme, which has to be done before other plugins -5. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option, - see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your own - plugins) DAG, used to set up internal plugins -6. `extraPluginConfigs` - the result of `vim.extraPlugins`, which is not a +4. `optionsScript` - used to set options defined in `vim.o` +5. `theme` (this is simply placed before `pluginConfigs`, meaning that + surrounding entries don't depend on it) - used to set up the theme, which has + to be done before other plugins +6. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option, + see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your + own plugins) DAG, used to set up internal plugins +7. `extraPluginConfigs` - the result of `vim.extraPlugins`, which is not a direct DAG, but is converted to, and resolved as one internally -7. `mappings` - the result of `vim.maps` +8. `mappings` - the result of `vim.maps` diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index 8ebf1c2c..193be3fc 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -80,10 +80,11 @@ maps); in { config = let - filterNonNull = attrs: filterAttrs (_: value: value != null) attrs; globalsScript = - mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}") - (filterNonNull cfg.globals); + mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}") cfg.globals; + + optionsScript = + mapAttrsToList (name: value: "vim.o.${name} = ${toLuaObject value}") cfg.options; extraPluginConfigs = resolveDag { name = "extra plugin configs"; @@ -132,9 +133,12 @@ in { in { vim = { luaConfigRC = { + # `vim.g` and `vim.o` globalsScript = entryAnywhere (concatLines globalsScript); - # basic - pluginConfigs = entryAfter ["basic"] pluginConfigs; + optionsScript = entryAfter ["basic"] (concatLines optionsScript); + + # Basic + pluginConfigs = entryAfter ["optionsScript"] pluginConfigs; extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs; mappings = entryAfter ["extraPluginConfigs"] mappings; }; diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 4165da6d..70ab2a8a 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -129,16 +129,38 @@ in { globals = mkOption { type = attrs; default = {}; + example = {"some_variable" = 42;}; description = '' An attribute set containing global variable values for storing vim variables as early as possible. If populated, this option will set vim variables in the built luaConfigRC as the first item. - E.g. {foo = "bar"} will set `vim.g.foo` to "bar" where - the type of `bar` in the resulting vimscript will be - infered from the type of the value in the `{name = value}` - pair. + ::: {.note} + `{foo = "bar";}` will set `vim.g.foo` to "bar", where + the type of `bar` in the resulting Lua value will be + inferred from the type of the value in the `{name = value;}` + pair passed to the option. + ::: + ''; + }; + + options = mkOption { + type = attrs; + default = {}; + example = {visualbell = true;}; + description = '' + An attribute set containing vim options to be set + as early as possible. If populated, this option will + set vim options in the built luaConfigRC after `basic` + and before `pluginConfigs` DAG entries. + + ::: {.note} + `{foo = "bar";}` will set `vim.o.foo` to "bar", where + the type of `bar` in the resulting Lua value will be + inferred from the type of the value in the`{name = value;}` + pair passed to the option. + ::: ''; }; From ccea1a615938859401f35e4a21dfd2b480d7c5f7 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 28 Sep 2024 22:18:28 +0300 Subject: [PATCH 3/9] dashboard/dashboard-nvim: add setupOpts --- modules/plugins/dashboard/dashboard-nvim/config.nix | 13 +++++++------ .../dashboard/dashboard-nvim/dashboard-nvim.nix | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/plugins/dashboard/dashboard-nvim/config.nix b/modules/plugins/dashboard/dashboard-nvim/config.nix index 088842ad..7ded14c2 100644 --- a/modules/plugins/dashboard/dashboard-nvim/config.nix +++ b/modules/plugins/dashboard/dashboard-nvim/config.nix @@ -5,16 +5,17 @@ }: let inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.dashboard.dashboard-nvim; in { config = mkIf cfg.enable { - vim.startPlugins = [ - "dashboard-nvim" - ]; + vim = { + startPlugins = ["dashboard-nvim"]; - vim.pluginRC.dashboard-nvim = entryAnywhere '' - require("dashboard").setup{} - ''; + pluginRC.dashboard-nvim = entryAnywhere '' + require("dashboard").setup(${toLuaObject cfg.setupOpts}) + ''; + }; }; } diff --git a/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix b/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix index 518082eb..cdc41fc7 100644 --- a/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix +++ b/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix @@ -1,7 +1,9 @@ {lib, ...}: let inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.dashboard.dashboard-nvim = { enable = mkEnableOption "Fancy and Blazing Fast start screen plugin of neovim [dashboard.nvim]"; + setupOpts = mkPluginSetupOption "dashboard.nvim" {}; }; } From bce45d4eeb82b3c2d68c555e972bb4c376e29738 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 28 Sep 2024 22:20:55 +0300 Subject: [PATCH 4/9] docs: add missing changelog entries --- docs/release-notes/rl-0.7.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index 7fd48768..d93bb2c6 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -187,6 +187,12 @@ everyone. - Add [python-lsp-server](https://github.com/python-lsp/python-lsp-server) as an additional Python LSP server. +- Add [](#opt-vim.options) to set `vim.o` values in in your nvf configuration + without using additional Lua. See option documentation for more details. + +- Add [](#opt-vim.dashboard.dashboard-nvim.setupOpts) to allow user + configuration for [dashboard.nvim](https://github.com/nvimdev/dashboard-nvim) + [ppenguin](https://github.com/ppenguin): - Telescope: From 69cd77630b1af497db09369118afd89504cc80f0 Mon Sep 17 00:00:00 2001 From: Soliprem <73885403+Soliprem@users.noreply.github.com> Date: Sat, 28 Sep 2024 22:21:27 +0200 Subject: [PATCH 5/9] lsp/otter: init (#385) * r: implementing lsp * r: version bump to context fixes treesitter bug * r: changing treesitter package definition to mkGrammarOption * added changelog entry * created otter file * created otter file * update * update * otter: fixing fixing input * committing flake.lock * fixed typo * configuration: disabling ccc and enabling otter * added assertion to make sure ccc and otter aren't enabled at the same time * configuration: otter set for isMaximal * otter: changelog * otter: better changelog * otter-nvim: renamed from otter to otter-nvim * otter: added setupopts --------- Co-authored-by: raf --- configuration.nix | 3 +- docs/release-notes/rl-0.7.md | 2 + flake.lock | 17 +++++++ flake.nix | 5 +++ modules/plugins/languages/ts.nix | 2 +- modules/plugins/lsp/default.nix | 1 + modules/plugins/lsp/otter/config.nix | 39 ++++++++++++++++ modules/plugins/lsp/otter/default.nix | 6 +++ modules/plugins/lsp/otter/otter.nix | 64 +++++++++++++++++++++++++++ 9 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 modules/plugins/lsp/otter/config.nix create mode 100644 modules/plugins/lsp/otter/default.nix create mode 100644 modules/plugins/lsp/otter/otter.nix diff --git a/configuration.nix b/configuration.nix index 08b0f9b6..b21b26aa 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,6 +19,7 @@ isMaximal: { lspsaga.enable = false; trouble.enable = true; lspSignature.enable = true; + otter-nvim.enable = isMaximal; lsplines.enable = isMaximal; nvim-docs-view.enable = isMaximal; }; @@ -155,7 +156,7 @@ isMaximal: { }; utility = { - ccc.enable = isMaximal; + ccc.enable = false; vim-wakatime.enable = false; icon-picker.enable = isMaximal; surround.enable = isMaximal; diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index d93bb2c6..55746f2b 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -202,3 +202,5 @@ everyone. [Soliprem](https://github.com/Soliprem) - Add LSP and Treesitter support for R under `vim.languages.R`. +- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with + ccc diff --git a/flake.lock b/flake.lock index 91fc5060..ecc02f27 100644 --- a/flake.lock +++ b/flake.lock @@ -1373,6 +1373,22 @@ "type": "github" } }, + "plugin-otter-nvim": { + "flake": false, + "locked": { + "lastModified": 1724585935, + "narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=", + "owner": "jmbuhr", + "repo": "otter.nvim", + "rev": "ca9ce67d0399380b659923381b58d174344c9ee7", + "type": "github" + }, + "original": { + "owner": "jmbuhr", + "repo": "otter.nvim", + "type": "github" + } + }, "plugin-oxocarbon": { "flake": false, "locked": { @@ -1861,6 +1877,7 @@ "plugin-obsidian-nvim": "plugin-obsidian-nvim", "plugin-onedark": "plugin-onedark", "plugin-orgmode-nvim": "plugin-orgmode-nvim", + "plugin-otter-nvim": "plugin-otter-nvim", "plugin-oxocarbon": "plugin-oxocarbon", "plugin-plenary-nvim": "plugin-plenary-nvim", "plugin-project-nvim": "plugin-project-nvim", diff --git a/flake.nix b/flake.nix index c4996fcf..4813481b 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,11 @@ flake = false; }; + plugin-otter-nvim = { + url = "github:jmbuhr/otter.nvim"; + flake = false; + }; + # Language support plugin-sqls-nvim = { url = "github:nanotee/sqls.nvim"; diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index e6e718ed..5ceccecf 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -226,7 +226,7 @@ in { { assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver"; message = '' - As of a recent lspconfig update, he `tsserver` configuration has been renamed + As of a recent lspconfig update, the `tsserver` configuration has been renamed to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver` is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server` to `"ts_ls"` instead of to `${cfg.lsp.server}` diff --git a/modules/plugins/lsp/default.nix b/modules/plugins/lsp/default.nix index a5d5163d..421f5fda 100644 --- a/modules/plugins/lsp/default.nix +++ b/modules/plugins/lsp/default.nix @@ -13,6 +13,7 @@ ./trouble ./lsp-signature ./lightbulb + ./otter ./lspkind ./lsplines ./nvim-docs-view diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix new file mode 100644 index 00000000..e5df92f7 --- /dev/null +++ b/modules/plugins/lsp/otter/config.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding; + + cfg = config.vim.lsp; + + self = import ./otter.nix {inherit lib;}; + mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings; + mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions; +in { + config = mkIf (cfg.enable && cfg.otter-nvim.enable) { + assertions = [ + { + assertion = !config.vim.utility.ccc.enable; + message = '' + ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them + ''; + } + ]; + vim = { + startPlugins = ["otter-nvim"]; + + maps.normal = mkMerge [ + (mkSetBinding mappings.toggle "lua require'otter'.activate()") + ]; + + pluginRC.otter-nvim = entryAnywhere '' + -- Enable otter diagnostics viewer + require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}}) + ''; + }; + }; +} diff --git a/modules/plugins/lsp/otter/default.nix b/modules/plugins/lsp/otter/default.nix new file mode 100644 index 00000000..935f1447 --- /dev/null +++ b/modules/plugins/lsp/otter/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./otter.nix + ./config.nix + ]; +} diff --git a/modules/plugins/lsp/otter/otter.nix b/modules/plugins/lsp/otter/otter.nix new file mode 100644 index 00000000..79797aaf --- /dev/null +++ b/modules/plugins/lsp/otter/otter.nix @@ -0,0 +1,64 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.types) bool str listOf; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.lsp = { + otter-nvim = { + enable = mkEnableOption '' + lsp features and a code completion source for code embedded in other documents [otter-nvim] + ''; + mappings = { + toggle = mkMappingOption "Activate LSP on Cursor Position [otter-nvim]" "lo"; + }; + setupOpts = mkPluginSetupOption "otter.nvim" { + lsp = { + diagnostic_update_event = mkOption { + type = listOf str; + default = ["BufWritePost"]; + description = '' + `:h events` that cause the diagnostic to update. + Set to: {"BufWritePost", "InsertLeave", "TextChanged" } + for less performant but more instant diagnostic updates + ''; + }; + }; + buffers = { + set_filetype = mkOption { + type = bool; + default = false; + description = '' + if set to true, the filetype of the otterbuffers will be set. Other wide only + the autocommand of lspconfig that attaches the language server will be + executed without stting the filetype + ''; + }; + write_to_disk = mkOption { + type = bool; + default = false; + description = '' + write .otter. files to disk on save of main buffer. + Useful for some linters that require actual files. + Otter files are deleted on quit or main buffer close + ''; + }; + }; + strip_wrapping_quote_characters = mkOption { + type = listOf str; + default = ["'" ''"'' "`"]; + description = '' + ''; + }; + handle_leading_whitespace = mkOption { + type = bool; + default = false; + description = '' + otter may not work the way you expect when entire code blocks are indented + (eg. in Org files) When true, otter handles these cases fully. + ''; + }; + }; + }; + }; +} From cef3aefabb4ece8eda69c2dc7a35affc36e2cba2 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 28 Sep 2024 23:32:25 +0300 Subject: [PATCH 6/9] flake: add formatting check --- flake.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 4813481b..987e3e59 100644 --- a/flake.nix +++ b/flake.nix @@ -13,8 +13,8 @@ inherit inputs; specialArgs = {inherit lib;}; } { - # provide overridable systems - # https://github.com/nix-systems/nix-systems + # Allow users to bring their own systems. + # «https://github.com/nix-systems/nix-systems» systems = import inputs.systems; imports = [ ./flake/apps.nix @@ -62,7 +62,6 @@ pkgs, ... }: { - formatter = pkgs.alejandra; devShells = { default = self'.devShells.lsp; nvim-nix = pkgs.mkShell {packages = [config.packages.nix];}; @@ -70,6 +69,21 @@ packages = with pkgs; [nil statix deadnix alejandra]; }; }; + + # Provide the default formatter. `nix fmt` in project root + # will format available files with the correct formatter. + # P.S: Please do not format with nixfmt! It messes with many + # syntax elements and results in unreadable code. + formatter = pkgs.alejandra; + + # Check if codebase is properly formatted. + # This can be initiated with `nix build .#checks..nix-fmt` + # or with `nix flake check` + checks = { + nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} '' + alejandra --check ${self} < /dev/null | tee $out + ''; + }; }; }; From d6bbae1a91d7da1ee4e44bd9d40a9dc5effc9508 Mon Sep 17 00:00:00 2001 From: raf Date: Sat, 28 Sep 2024 20:36:07 +0000 Subject: [PATCH 7/9] docs: re-format README; clean up sections (#387) * docs: re-format README; clean up sections * docs: update README with features section --- .github/README.md | 184 ++++++++++++++++++++++++++++------------------ 1 file changed, 111 insertions(+), 73 deletions(-) diff --git a/.github/README.md b/.github/README.md index 06c9eb7d..33304fdb 100644 --- a/.github/README.md +++ b/.github/README.md @@ -33,10 +33,9 @@ @@ -44,6 +43,7 @@

+[Features]: #features [Get Started]: #get-started [Documentation]: #documentation [Help]: #help @@ -51,119 +51,146 @@ [FAQ]: #faq [Credits]: #credits -**[
 Get Started 
][Get Started]** -**[
 Documentation 
][Documentation]** -**[
 Help 
][Help]** -**[
 Contribute 
][Contribute]** -**[
 FAQ 
][Faq]** -**[
 Credits 
][Credits]** +**[
 Features
][Features]** +**[
 Get Started 
][Get Started]** +**[
 Documentation 
][Documentation]** +**[
 Help 
][Help]** +**[
 Contribute 
][Contribute]** +**[
 FAQ 
][Faq]** **[
 Credits 
][Credits]**

--- +## Features + +- **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. +- **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully + customizable through the Nix module system. +- **Well-documented**: Documentation is priority. You will never face + undocumented, obscure behaviour. +- **Idiomatic**: nvf does things _the right way_. The codebase is, and will, + remain maintainable. + ## Get Started -### Using `nix` CLI +If you are not sold on the concepts of **nvf**, and would like to try out the +default configuration before even _thinking about_ installing it, you may run +the following in order to take **nvf** out for a spin. -If you would like to try out the configuration before even thinking about -installing it, you can run the following command - -```console +```bash nix run github:notashelf/nvf ``` -This will get you a feel for the base configuration and UI design. -The flake exposes `#nix` as the default package, providing minimal -language support and various utilities.You may also use `#nix`, -`#tidal` or `#maximal` to get try out different configurations. +This will get you a feel for the base configuration and UI design. Though, none +of the configuration options are final as **nvf** is designed to be modular and +configurable. -It is as simple as changing the target output to get a different -configuration. For example, to get a configuration with `tidal` support, run: +> [!TIP] +> The flake exposes `#nix` as the default package, providing minimal language +> support and various utilities. You may also use the `#nix` or `#maximal` +> packages provided by the this flake to get try out different configurations. -```console -nix run github:notashelf/nvf#tidal +It is as simple as changing the target output to get a different configuration. +For example, to get a configuration with large language coverage, run: + +```bash +nix run github:notashelf/nvf#maximal ``` Similar instructions will apply for `nix profile install`. However, you are recommended to instead use the module system as described in the manual. -> [!NOTE] -> The `maximal` configuration is _massive_ and will take a while to build. -> To get a feel for the configuration, use the default `nix` or `tidal` -> configurations. Should you choose to try out the `maximal` configuration, -> using the binary cache as described in the manual is _strongly_ recommended. +> [!NOTE] +> The `maximal` configuration is _massive_ and will take a while to build. To +> get a feel for the configuration, use the default `nix` configuration. Should +> you choose to try out the `maximal` configuration, using the binary cache as +> described in the manual is _strongly_ recommended. + +If you are convinced, proceed to the next section to view the installation +instructions. ## Documentation -See the [**nvf** Manual](https://notashelf.github.io/nvf/) for -detailed installation guides, configurations, available options, release notes -and more. Tips for installing userspace plugins is also contained in the -documentation. +[nvf manual]: https://notashelf.github.io/nvf/ -If you want to dive right into trying **nvf** you can get a fully -featured configuration with `nix` language support by running: +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. -```console -nix run github:notashelf/nvf#nix -``` +See the [**nvf** manual] for detailed and up-to-date installation guides, +configurations, available options, release notes and more. Tips for installing +userspace plugins is also contained in the documentation. -[Issues]: https://github.com/NotAShelf/nvf/issues +[issue tracker]: https://github.com/NotAShelf/nvf/issues -Please create an issue on the [issue tracker](issues) if you find -the documentation lacking or confusing. I also appreciate any contributions -to the documentation. +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 -You can create an issue on the [issue tracker](issues) to ask questions -or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue -tracker for now. +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. ## Contributing I am always looking for new ways to help improve this flake. If you would like to contribute, please read the [contributing guide](CONTRIBUTING.md) before -submitting a pull request. You can also create an issue on the -[issue tracker](issues) before submitting a pull request if you would -like to discuss a feature or bug fix. +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 +[appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose + +**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 + **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 [appropritate issue template](issues/new/choose) and I will -consider a module addition. +
**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. **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 +
**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 available to the end user. If you have -not noticed any activity on the main branch, consider taking a look at the [list -of branches](https://github.com/NotAShelf/nvf/branches=) or the [list of open -pull requests](https://github.com/NotAShelf/nvf) +not noticed any activity on the main branch, consider taking a look at the +[list of branches](https://github.com/NotAShelf/nvf/branches=) or the +[list of open pull requests](https://github.com/NotAShelf/nvf) ## Credits ### Contributors -Special thanks to +Special, heart-felt thanks to - [@fufexan](https://github.com/fufexan) - For the transition to flake-parts -- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to work -- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally possible -- [@horriblename](https://github.com/horriblename) - For actively implementing planned features and quality of life updates +- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to + work +- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally + possible +- [@horriblename](https://github.com/horriblename) - For actively implementing + 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 +- [@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 and everyone who has submitted issues or pull requests! @@ -172,10 +199,18 @@ and everyone who has submitted issues or pull requests! This configuration borrows from and is based on a few other configurations, including: -- [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake is originally based on. -- [@sioodmy's](https://github.com/sioodmy) [dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design choices. -- [@wiltaylor's](https://github.com/wiltaylor) [neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and design ideas. -- [@gvolpe's](https://github.com/gvolpe) [neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and nix concepts. +- [@jordanisaacs's](https://github.com/jordanisaacs) + [neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake + is originally based on. +- [@sioodmy's](https://github.com/sioodmy) + [dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design + choices. +- [@wiltaylor's](https://github.com/wiltaylor) + [neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and + design ideas. +- [@gvolpe's](https://github.com/gvolpe) + [neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and + nix concepts. I am grateful for their previous work and inspiration, and I wholeheartedly recommend checking their work out. @@ -183,11 +218,14 @@ 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 +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). +
Yeah this includes the logo work too, stop stealing artwork that is not yours!
+ ---
From 38fc01b9c6086091bd0817474288109e347200b4 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 28 Sep 2024 23:43:15 +0300 Subject: [PATCH 8/9] docs: wording --- .github/README.md | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/README.md b/.github/README.md index 33304fdb..1c3e22c3 100644 --- a/.github/README.md +++ b/.github/README.md @@ -64,24 +64,28 @@ ## Features -- **Reproducible**: Your configuration will behave the same anywhere. No +- **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. - **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully customizable through the Nix module system. -- **Well-documented**: Documentation is priority. You will never face +- **Well-documented**: Documentation is priority. You will _never_ face undocumented, obscure behaviour. -- **Idiomatic**: nvf does things _the right way_. The codebase is, and will, - remain maintainable. +- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and + will, remain maintainable for myself and any contributors. ## Get Started +[nvf manual]: https://notashelf.github.io/nvf/ +[issue tracker]: https://github.com/NotAShelf/nvf/issues + If you are not sold on the concepts of **nvf**, and would like to try out the default configuration before even _thinking about_ installing it, you may run the following in order to take **nvf** out for a spin. ```bash +# Run the default package nix run github:notashelf/nvf ``` @@ -98,6 +102,7 @@ It is as simple as changing the target output to get a different configuration. For example, to get a configuration with large language coverage, run: ```bash +# Run the maximal package nix run github:notashelf/nvf#maximal ``` @@ -105,18 +110,16 @@ Similar instructions will apply for `nix profile install`. However, you are recommended to instead use the module system as described in the manual. > [!NOTE] -> The `maximal` configuration is _massive_ and will take a while to build. To -> get a feel for the configuration, use the default `nix` configuration. Should -> you choose to try out the `maximal` configuration, using the binary cache as -> described in the manual is _strongly_ recommended. +> The `maximal` configuration is quite large, and might take a while to build. +> To get a feel for the configuration, use the default `nix` configuration. +> Should you choose to try out the `maximal` configuration, using the binary +> cache as described in the manual is _strongly_ recommended. If you are convinced, proceed to the next section to view the installation instructions. ## Documentation -[nvf manual]: https://notashelf.github.io/nvf/ - 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. @@ -125,8 +128,6 @@ See the [**nvf** manual] for detailed and up-to-date installation guides, configurations, available options, release notes and more. Tips for installing userspace plugins is also contained in the documentation. -[issue tracker]: https://github.com/NotAShelf/nvf/issues - 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. @@ -148,6 +149,8 @@ fix. ## FAQ [appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose +[list of branches]: https://github.com/NotAShelf/nvf/branches +[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 @@ -164,12 +167,13 @@ addition. As mentioned before, PRs adding new features are also welcome. 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 available to the end user. If you have +
**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](https://github.com/NotAShelf/nvf/branches=) or the -[list of open pull requests](https://github.com/NotAShelf/nvf) +[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. ## Credits @@ -224,7 +228,7 @@ 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). -
Yeah this includes the logo work too, stop stealing artwork that is not yours!
+
Yes, this includes the logo work too. Stop taking artwork that is not yours!
--- From c727528b6fb001f04d311de7b6d7f1be0b08b5cd Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 28 Sep 2024 23:44:22 +0300 Subject: [PATCH 9/9] CI: clean up stale branches periodically --- .github/workflows/cleanup.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 00000000..204dcba7 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,22 @@ +name: Cleanup +on: + workflow_dispatch: + schedule: + - cron: "0 4 1 * *" # 4AM on 1st of every month + - cron: "0 4 15 * *" # 4AM on the 15th of every month +jobs: + branches: + name: Cleanup old branches + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Delete old branches" + uses: beatlabs/delete-old-branches-action@v0.0.10 + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + date: "1 months ago" + dry_run: false + delete_tags: false + exclude_open_pr_branches: true