diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c9270b26..4361d9f9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,47 +1,95 @@ name: "🐛 Bug Report" -description: "Submit a bug report to help us improve" -#title: "[Bug] " +description: "Submit a bug report to help us improve nvf" +title: "" labels: [bug] body: - type: checkboxes - id: no-duplicate-issues attributes: - label: "⚠️ Please verify that this bug has NOT been reported before." - description: "Search in the issues sections by clicking [HERE](https://github.com/notashelf/neovim-flake/issues?q=)" + label: I have confirmed that this is a bug related to nvf + description: >- + If you are unsure whether this is a bug, a packaging issue, or user error that is *not* + stemming from nvf, please consider creating a [discussion](https://github.com/notashelf/nvf/discussions) + post instead. Invalid bug reports will be closed without an explanation. options: - - label: "I checked all existing issues and didn't find a similar issue" - required: true + - required: true + label: >- + This is a bug, and not an user error or a support request. I understand that my issue + will be closed if it is not a bug in nvf. + - required: true + label: >- + I have checked the [issues tab](https://github.com/notashelf/nvf/issues?q=is%3Aissue) + and confirmed that my issue has not yet been reported. I understand that my issue will + be closed if it is a duplicate. + - type: textarea - id: description - validations: - required: false attributes: - label: "Description" - description: "You could also upload screenshots, if necessary" + label: Description + placeholder: "Describe the issue here..." + description: >- + Describe the issue in detail, with steps you have taken included. If applicable, please include + a minimal reproducible example, relevant Nix logs, comparisons with alternative commands and + screenshots. Do note that **logs** are preferred over screenshots. + validations: + required: true + + - type: dropdown + attributes: + label: Installation Method + description: "How was nvf installed?" + options: + - NixOS Module (`nixosModules.default`) + - Home Manager Module (`homeManagerModules.default`) + - Standalone (flake outputs, `nix profile install`, etc.) + - Other + validations: + required: true + + - type: textarea + attributes: + label: Installation Method (Other) + description: "If you have selected 'Other' in the previous section, please describe your installation method" + placeholder: >- + I installed nvf from... + + - type: textarea + attributes: + label: nvf Version + description: "Which version of nvf are you using? If added as a flake input, write 'master'" + placeholder: >- + For example, v0.8 if consuming nvf from a tagged release. + validations: + required: true + - type: textarea id: steps-to-reproduce + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through the problem, step by step" + placeholder: >- + 1. Do this + 2. Do that + 3. Observe validations: required: true - attributes: - label: "👟 Reproduction steps" - description: "How do you trigger this bug? Please walk us through the problem, step by step" - placeholder: "..." + - type: textarea id: expected-behavior - validations: - required: true attributes: - label: "👀 Expected behavior" + label: Expected behavior description: "What did you think would or should happen?" placeholder: "..." - - type: textarea - id: actual-behavior validations: required: true + + - type: textarea + id: actual-behavior attributes: - label: "😓 Actual Behavior" + label: Actual Behavior description: "What actually happen?" placeholder: "..." + validations: + required: true + - type: input id: nix-metadata attributes: @@ -50,11 +98,32 @@ body: placeholder: '[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"' validations: required: true + + - type: textarea + attributes: + label: System Information + description: "Output of `nix-info --markdown`" + render: bash + placeholder: |- + '[user@system:~]$ nix-shell -p nix-info --run "nix-info --markdown" + - system: + - host os: + - multi-user?: + - sandbox: + - version: + - nixpkgs: + validations: + required: true + - type: textarea id: logs attributes: - label: "📝 Relevant log output" - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: bash + label: "📝 Relevant log output" + description: >- + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + + > [!TIP] + > You can get your nvf configuration with `nvf-print-config` and attach it by using a service like termbin.com validations: required: true 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 diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 87561a9d..e18c95fe 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -36,6 +36,7 @@ [yazi.nvim]: https://github.com/mikavilpas/yazi.nvim [snacks.nvim]: https://github.com/folke/snacks.nvim [oil.nvim]: https://github.com/stevearc/oil.nvim +[hunk.nvim]: https://github.com/julienvincent/hunk.nvim - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. @@ -104,6 +105,8 @@ relevant packages in a simple UI. - This deprecates `vim.useSystemClipboard` as well, see breaking changes section above for migration options. +- Add [hunk.nvim], Neovim plugin & tool for splitting diffs in Neovim. Available + as `vim.git.hunk-nvim` [amadaluzia](https://github.com/amadaluzia): @@ -382,7 +385,10 @@ [poz](https://poz.pet): +[everforest]: https://github.com/sainnhe/everforest + - Fix gitsigns null-ls issue. +- Add [everforest] theme support. [Haskex](https://github.com/haskex): @@ -428,7 +434,7 @@ - Add missing `transparent` option for existing [onedark.nvim](https://github.com/navarasu/onedark.nvim) theme. - + [theutz](https://github.com/theutz): - Added "auto" flavour for catppuccin theme @@ -440,19 +446,21 @@ [neogit]: https://github.com/NeogitOrg/neogit - Add [solarized.nvim] theme with support for multiple variants -- Add [smart-splits.nvim] for navigating between Neovim windows and terminal multiplexer panes. - Available at `vim.utility.smart-splits`. -- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated config. +- Add [smart-splits.nvim] for navigating between Neovim windows and terminal + multiplexer panes. Available at `vim.utility.smart-splits`. +- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated + config. - Fix lualine separator options -- Add [neogit], an interactive and powerful Git interface for Neovim, inspired by Magit +- Add [neogit], an interactive and powerful Git interface for Neovim, inspired + by Magit - Allow deregistering which-key binds or groups by setting them to `null` [justDeeevin](https://github.com/justDeeevin): [supermaven-nvim]: https://github.com/supermaven-inc/supermaven-nvim -- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable` and - `setupOpts` +- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable` + and `setupOpts` [trueNAHO](https://github.com/trueNAHO): @@ -460,9 +468,10 @@ download size. - `flake-utils`'s `systems` inputs follows nvf's `systems` input to transitively - leverage the pattern introduced in commit [fc8206e7a61d ("flake: utilize - nix-systems for overridable flake systems")]( - https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). + leverage the pattern introduced in commit + [fc8206e7a61d ("flake: utilize + nix-systems for overridable flake systems")](https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). [soliprem](https://github.com/soliprem): + - fix broken `neorg` grammars diff --git a/modules/neovim/init/diagnostics.nix b/modules/neovim/init/diagnostics.nix index 8a8e7b38..27f46efc 100644 --- a/modules/neovim/init/diagnostics.nix +++ b/modules/neovim/init/diagnostics.nix @@ -88,7 +88,7 @@ in { options.vim = { diagnostics = { - enable = mkEnableOption "diagostics module for Neovim"; + enable = mkEnableOption "diagnostics module for Neovim"; config = mkOption { type = diagnosticsSubmodule; default = {}; diff --git a/modules/plugins/git/default.nix b/modules/plugins/git/default.nix index 5b30b74a..76bb5786 100644 --- a/modules/plugins/git/default.nix +++ b/modules/plugins/git/default.nix @@ -3,6 +3,7 @@ in { imports = [ ./gitsigns + ./hunk-nvim ./vim-fugitive ./git-conflict ./gitlinker-nvim @@ -14,7 +15,9 @@ in { git integration suite. Enabling this option will enable the following plugins: + * gitsigns + * hunk-nvim * vim-fugitive * git-conflict * gitlinker-nvim diff --git a/modules/plugins/git/hunk-nvim/config.nix b/modules/plugins/git/hunk-nvim/config.nix new file mode 100644 index 00000000..db97d8f7 --- /dev/null +++ b/modules/plugins/git/hunk-nvim/config.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.git.hunk-nvim; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins = { + "hunk-nvim" = { + package = "hunk-nvim"; + setupModule = "gitlinker"; + inherit (cfg) setupOpts; + }; + }; + }; + }; +} diff --git a/modules/plugins/git/hunk-nvim/default.nix b/modules/plugins/git/hunk-nvim/default.nix new file mode 100644 index 00000000..72ce88a0 --- /dev/null +++ b/modules/plugins/git/hunk-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hunk-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/git/hunk-nvim/hunk-nvim.nix b/modules/plugins/git/hunk-nvim/hunk-nvim.nix new file mode 100644 index 00000000..b11ba4ae --- /dev/null +++ b/modules/plugins/git/hunk-nvim/hunk-nvim.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.git.hunk-nvim = { + enable = mkEnableOption "tool for splitting diffs in Neovim [hunk-nvim]" // {default = config.vim.git.enable;}; + setupOpts = mkPluginSetupOption "hunk-nvim" {}; + }; +} diff --git a/modules/plugins/lsp/otter/otter.nix b/modules/plugins/lsp/otter/otter.nix index 0b0c2c4c..2ccc393b 100644 --- a/modules/plugins/lsp/otter/otter.nix +++ b/modules/plugins/lsp/otter/otter.nix @@ -25,15 +25,6 @@ in { }; }; 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 setting the filetype - ''; - }; write_to_disk = mkOption { type = bool; default = false; diff --git a/modules/plugins/theme/supported-themes.nix b/modules/plugins/theme/supported-themes.nix index 1d1f2397..ea858cae 100644 --- a/modules/plugins/theme/supported-themes.nix +++ b/modules/plugins/theme/supported-themes.nix @@ -246,10 +246,10 @@ in { transparent = { enabled = ${boolToString transparent}, }, - ${optionalString (!isNull palette) ''palette = "${palette}",''} - ${optionalString (!isNull variant) ''variant = "${variant}",''} + ${optionalString (palette != null) ''palette = "${palette}",''} + ${optionalString (variant != null) ''variant = "${variant}",''} } - ${optionalString (!isNull background) ''vim.opt.background = "${background}"''} + ${optionalString (background != null) ''vim.opt.background = "${background}"''} vim.cmd.colorscheme "solarized" ''; styles = let @@ -281,4 +281,23 @@ in { vim.cmd.colorscheme("solarized-osaka") ''; }; + + everforest = { + setup = { + style ? "medium", + transparent ? false, + ... + }: '' + vim.g.everforest_background = "${style}" + vim.g.everforest_transparent_background = ${ + if transparent + then "1" + else "0" + } + + vim.cmd.colorscheme("everforest") + ''; + + styles = ["hard" "medium" "soft"]; + }; } diff --git a/modules/plugins/utility/binds/which-key/config.nix b/modules/plugins/utility/binds/which-key/config.nix index 625a6215..7d5ef6c1 100644 --- a/modules/plugins/utility/binds/which-key/config.nix +++ b/modules/plugins/utility/binds/which-key/config.nix @@ -10,7 +10,7 @@ inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.binds.whichKey; - register = mapAttrsToList (n: v: lib.lists.optional (! isNull v) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register; + register = mapAttrsToList (n: v: lib.lists.optional (v != null) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register; in { config = mkIf cfg.enable { vim = { diff --git a/npins/sources.json b/npins/sources.json index a5161090..00dcea83 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -442,6 +442,22 @@ "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/eeb2b5a2e99e1646861a104f108c5818dd3973dc.tar.gz", "hash": "1l0xjis8jp5mf3v42f9xsjmwpjskf6zk6brpr8l39sp1bjn9z4x7" }, + "everforest": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "sainnhe", + "repo": "everforest" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v0.3.0", + "revision": "1e625639362661972821e83d8bbe528b8981a05f", + "url": "https://api.github.com/repos/sainnhe/everforest/tarball/v0.3.0", + "hash": "18h7mwr9lpsdsdi90vn4nc868g50li27xvylrs2srppfjr7kvl7w" + }, "fastaction-nvim": { "type": "Git", "repository": { @@ -676,6 +692,22 @@ "url": "https://github.com/phaazon/hop.nvim/archive/1a1eceafe54b5081eae4cb91c723abd1d450f34b.tar.gz", "hash": "08h18cam2yr57qvfsnf1bra28vbl6013wlchnr5crb757xw8aysa" }, + "hunk-nvim": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "julienvincent", + "repo": "hunk.nvim" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v1.8.0", + "revision": "1e0a4d719c780bb8b0690a54915601508ced321e", + "url": "https://api.github.com/repos/julienvincent/hunk.nvim/tarball/v1.8.0", + "hash": "036cwnswx36m048mvlwa8rr9baclf7lrgjlq065pb4w13c4drbmx" + }, "hydra-nvim": { "type": "GitRelease", "repository": {