diff --git a/.editorconfig b/.editorconfig index c7fdc76d..1f39b72e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,13 +19,12 @@ indent_style = space indent_size = 2 tab_width = 2 -[*.{diff,patch}] +[*.{diff,patch,lock}] end_of_line = unset insert_final_newline = unset trim_trailing_whitespace = unset -[*.lock] -indent_size = unset - [npins/sources.json] -insert_final_newline = unset +indent_style = unset +indent_size = unset +trim_trailing_whitespace = unset diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a43a9445..2379973f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,48 +2,72 @@ ## Table of Contents -- [Welcome](#welcome) -- [Contributing](#contributing) +- [Preface](#preface) +- [Contributing Process](#contributing-process) - [Code of Conduct](#code-of-conduct) -## Welcome +## Preface -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. +[LICENSE]: ../LICENSE -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. +I am glad you are thinking about contributing to nvf! The project is shaped by +contributors and user feedback, and all contributions are appreciated. -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 are unsure about anything, whether a change is necessary or if it would +be accepted _had_ you created a PR, please just ask! Or submit the issue or pull +request anyway, the worst that can happen is that you will be politely asked to +change something. Friendly contributions are _always_ welcome. -## Contributing +Before you contribute, I encourage you to read the rest of this document for our +contributing policy and guidelines, followed by the [LICENSE] to understand how +your contributions are licensed. -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 +If you have any questions regarding those files, or would like to ask a question +that is not covered by any of them, please feel free to open an issue! +Discussions tab is also available for less formal discussions. You may also +choose to contact me on Discord or Matrix if you would like to talk to me +personally. + +## Contributing Process + +[pull request template]: ./PULL_REQUEST_TEMPLATE.md + +The contribution process is mostly documented in the [pull request template]. +When you create a pull request, you will find a checklist of items to complete +before it can be submitted. We ask that you please complete it before submitting +a pull request to help maintainers provide more specific feedback. 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 guidelines over at -[the documentation](https://notashelf.github.io/nvf#hacking) +We provide instructions for a healthy contribution to nvf. This includes +**styling**, **commit formats**, **how-to guides for common contributions**. You +are strongly encouraged to read the contributing guidelines in full over at +[the documentation](https://notashelf.github.io/nvf#hacking). + +A general gist of our requirements is that you must + +1. Write clean Nix code +2. Self-test your changes +3. Document your changes + +Though, please take a look at the manual for the complete contributing guide. +Please also feel free to let us know if you feel that something is missing. We +hope to provide clear, comprehensive instructions that make the contribution +process a breeze. ### Code of Conduct -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. +This project does not have a formal code of conduct yet, and to be perfectly +honest I am not entirely positive if I want one or if it will _ever_ have one. +This project is not expected to be a hotbed of activity, and I trust my +contributors to keep it civil and respectful. + +I do, however, want to make sure that everyone who does contribute feels welcome +and safe around project spaces. As such, I will do my best to make sure anyone +who disrupts the project or engages in negative behaviour will are dealt with +appropriately, and swiftly. You are invited to share any concerns that you have +with the projects moderation, be it over public or private spaces. If you feel that you are not being treated with respect, please contact me directly. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c9270b26..be97db2a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,60 +1,120 @@ 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: "..." + validations: + required: true + - type: textarea id: actual-behavior - validations: - required: true attributes: - label: "πŸ˜“ Actual Behavior" + label: Actual Behavior description: "What actually happen?" placeholder: "..." - - type: input - id: nix-metadata - attributes: - label: "πŸ’» Metadata" - description: 'Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.' - 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/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index d7ed2654..819891df 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -1,58 +1,72 @@ name: πŸš€ Feature Request description: "Propose a new feature" -#title: "[Feature] " +title: "" labels: [feature-request] body: - type: checkboxes - id: no-duplicate-issues attributes: - label: "⚠️ Please verify that this feature request has NOT been suggested before." - description: "Search in the issues sections by clicking [HERE](https://github.com/notashelf/neovim-flake/issues?q=)" + label: I have verified that this feature request has not been made before + description: >- + Before opening a new issue for feature requests, please consider searching through currently + open issues [here](https://github.com/notashelf/nvf/issues). If you would like to discuss a + new addition beforehand, you may first want to create a new discussion threat and discuss it + with the maintainers [on the discussions tab](https://github.com/notashelf/nvf/discussions) options: - - label: "I checked and didn't find a similar feature request" - required: true + - required: true + label: >- + I have checked the [issues tab](https://github.com/notashelf/nvf/issues?q=is%3Aissue), + and did not find a similar feature request. I understand that my issue will be closed + if it is a duplicate. + - type: dropdown id: feature-area attributes: - label: "🏷️ Feature Type" - description: "What kind of a feature request is this?" + label: Feature Type + description: Please describe the kind of addition this is multiple: true options: - - New Command - - New Addon - - API Additions + - New Plugin + - Update Request (Plugin/Nixpkgs) + - Documentation Updates - Other validations: required: true + + - type: textarea id: feature-description + attributes: + label: Feature description + description: >- + Please provide a clear and concise description of the desired addition. If this is a plugin + addition, please also include a link to the desired plugin and the reason why you think this + is a good addition. Keep in mind that we may refuse plugin requests as nvf already provides + appropriate methods of installing plugins in user configurations. + placeholder: >- + "nvf currently does [...], which really frustrates me" or "You should add [...] because I think + [...]" validations: required: true - attributes: - label: "πŸ”– Feature description" - description: "A clear and concise description of what your feature request is." - placeholder: "'You should add [...]' or '[...] has always frustrated me' " - - type: textarea - id: solution - validations: - required: true - attributes: - label: "βœ”οΈ Solution" - description: "A clear and concise description of what you want to happen." - placeholder: "In my use-case, I would like [...]" + - type: textarea id: alternatives + attributes: + label: Alternatives + description: >- + If you have tried anything before creating this issue, please give us a clear and concise + description of any alternative solutions or methods you have considered. + placeholder: "I have considered [...]" validations: required: false - attributes: - label: "❓ Alternatives" - description: "A clear and concise description of any alternative solutions or features you've considered." - placeholder: "I have considered [...]" + - type: textarea id: additional-context + attributes: + label: Additional Context + description: >- + If there is anything else you would like to mention, such as additional context or screenshots + demonstrating the requested feature, please add them here. This field is optional, but you may + be requested to provide further context. Please ensure that your feature request clearly describes + the requested feature in good detail. validations: required: false - attributes: - label: "πŸ“ Additional Context" - description: "Add any other context or screenshots about the feature request here." - placeholder: "..." 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/.github/labels.yml b/.github/labels.yml new file mode 100644 index 00000000..34c3bf2c --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,55 @@ +# This file is used by .github/workflows/labels.yml +"topic: plugins": + - any: + - changed-files: + - any-glob-to-any-file: + - modules/plugins/**/* + +"topic: modules": + - any: + - changed-files: + - any-glob-to-any-file: + - modules/**/* + +"topic: dependencies": + - any: + - changed-files: + - any-glob-to-any-file: + - npins + - flake.lock + +"topic: CI": + - any: + - changed-files: + - any-glob-to-any-file: + - .github/workflows/*.yml + - .github/typos.toml + - .github/dependabot.yml + +"topic: meta": + - any: + - changed-files: + - any-glob-to-any-file: + - .github/CODEOWNERS + - LICENSE + - .github/README.md + - .github/funding.yml + - .github/assets + - .github/*_TEMPLATE + - .gitignore + - .editorconfig + - release.json + +"topic: documentation": + - any: + - changed-files: + - any-glob-to-any-file: + - docs/**/* + - .github/CONTRIBUTING.md + - .github/README.md +"topic: packaging": + - any: + - changed-files: + - any-glob-to-any-file: + - flake.nix + - flake/packages.nix diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..0a558fb8 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,33 @@ +name: Backport PR on Label + +on: + pull_request_target: + types: + - labeled + +# Permissions needed for the korthout/backport-action to create branches and PRs +permissions: + contents: write + pull-requests: write + +jobs: + backport: + name: Create Backport PR + runs-on: ubuntu-latest + if: | + github.event.pull_request.merged == true && startsWith(github.event.label.name, 'backport-') + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + token: ${{ steps.app-token.outputs.token }} + + - name: Backport Action + uses: korthout/backport-action@v3 + with: + # Regex pattern for labels that should trigger a backport AND extracts the target branch + # from the name (e.g. v0.x or v0.x.y; we use zerover). This action will ONLY proceed if + # the label that triggered the workflow fully matches this pattern. + # Example matching labels: "backport-v0.1", "backport-v0.10.1" + # Example non-matching labels: "backport-foo", "backport-v1.0" + label_pattern: '^backport-(v0\.\d+(\.\d+)?)$' diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 959a04b6..8f392c47 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -21,15 +21,6 @@ jobs: - nix - maximal steps: - - uses: easimon/maximize-build-space@v10 - name: Maximize build space - with: - overprovision-lvm: true - remove-android: true - remove-dotnet: true - remove-haskell: true - remove-codeql: true - - uses: actions/checkout@v4 name: Checkout diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a349cb07..c0338f1d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -37,7 +37,18 @@ jobs: uses: DeterminateSystems/nix-installer-action@main - name: Check formatting via Alejandra - run: nix run nixpkgs#alejandra -- -c . + run: nix run nixpkgs#alejandra -- --check . --exclude npins + + - name: Check formatting via Deno + run: nix run nixpkgs#deno -- fmt --check --ext md **/*.md + + - if: ${{ failure() }} + shell: bash + run: | + echo "::error:: Current codebase contains formatting errors that were caught by the CI!" + echo "Please ensure that all Nix code is formatted with Alejandra, and Markdown with `deno fmt" + echo "[skip ci] label may be added to the PR title if this is a one-time issue and is safe to ignore" + exit 1 check-typos: name: "Check source tree for typos" @@ -142,7 +153,8 @@ jobs: - name: Checking Editorconfig conformance shell: bash run: | - < "$HOME/changed_files" nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size' + < "$HOME/changed_files" nix-shell -p editorconfig-checker \ + --run 'xargs -r editorconfig-checker -disable-indent-size --exclude flake.lock' - if: ${{ failure() }} shell: bash diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..fc2e0d65 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,21 @@ +name: "Label PR" + +on: + pull_request_target: + types: [edited, opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + labels: + name: "Label PR" + runs-on: ubuntu-latest + if: "!contains(github.event.pull_request.title, '[skip ci]')" + steps: + - uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labels.yml + sync-labels: true diff --git a/.github/README.md b/README.md similarity index 83% rename from .github/README.md rename to README.md index 3fc7ffdf..7786636a 100644 --- a/.github/README.md +++ b/README.md @@ -1,5 +1,6 @@ +
- nvf Logo + nvf Logo

nvf

@@ -46,11 +47,10 @@ [Features]: #features [Get Started]: #get-started [Documentation]: #documentation -[Help]: #help +[Help]: #getting-help [Contribute]: #contributing [FAQ]: #frequently-asked-questions [Credits]: #credits -[License]: #license **[
 Features
][Features]** **[
 Get Started 
][Get Started]** @@ -84,21 +84,22 @@ 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! + - 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] + - Any and all 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]! + - Your question not there? Head 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 @@ -121,7 +122,7 @@ the following in order to take **nvf** out for a spin. ```bash # Run the default package -nix run github:notashelf/nvf +$ nix run github:notashelf/nvf ``` This will get you a feel for the base configuration and UI design. Though, none @@ -129,20 +130,25 @@ of the configuration options are final as **nvf** is designed to be modular and configurable. > [!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. +> The flake exposes `nix` as the default package, which will be evaluated when +> you run `nix build` or `nix run` on this repo. It is minimal, and providing +> limited language support and various utilities. We also expose the `maximal` +> package, which you may choose to build if you'd like to see more of nvf's +> built-in modules. Please keep in mind that those are demo packages, nvf does +> not ship a default configuration if installed as a NixOS/Home-Manager module +> or via standalone method. -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: +It is as simple as changing the target output in your `nix run` command 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 +$ 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. +recommended to instead use the module system as described in the [nvf manual]. > [!NOTE] > The `maximal` configuration is quite large, and might take a while to build. @@ -155,6 +161,10 @@ instructions. ## Documentation +**nvf** prides itself in its rich, intuitive documentation. The chapter below +covers several methods through which you can install **nvf**. If you believe +something is missing, or could be done better, please feel free to contact us! + ### Installation The _recommended_ way of installing nvf is using either the NixOS or the @@ -163,7 +173,7 @@ install **nvf** as a standalone package, or a flake output. See the rendered [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. +userspace plugins are also contained in the documentation. > [!TIP] > While using NixOS or Home-Manager modules, @@ -180,16 +190,18 @@ requests are also welcome, and appreciated. 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. +We are not yet on spaces like matrix or IRC, so please use the issue tracker for +now. The [discussions tab] can also be a place to request help from community +members, or engage in productive discussion with the maintainers. ## Contributing +[contributing guide]: .github/CONTRIBUTING.md + 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] -before submitting a pull request if you would like to discuss a feature or bug -fix. +to contribute, please read the [contributing guide] before 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. ## Frequently Asked Questions @@ -225,7 +237,7 @@ 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. +better prepare for breaking changes. **Q**: Will you support non-flake installations? @@ -240,19 +252,19 @@ 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. +configuration from `~/.config/nvim`. You may still use `vim.*` options in Nix to +further configure Neovim. ## Credits ### Co-Maintainers Alongside [myself](https://github.com/notashelf), nvf is developed by those -talented folk. nvf would not be what it is today without their invaluable +talented folk. **nvf** would not be what it is today without their invaluable contributions. - [**@horriblename**](https://github.com/horriblename) - ([Liberapay](https://liberapay.com/horriblename/))- For actively implementing + ([Liberapay](https://liberapay.com/horriblename/)) - For actively implementing planned features and quality of life updates. - [**@Soliprem**](https://github.com/soliprem) - For rigorously implementing missing features and excellent work on new language modules. diff --git a/configuration.nix b/configuration.nix index 78dad9c7..68776638 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,17 +15,21 @@ isMaximal: { spellcheck = { enable = true; + programmingWordlist.enable = isMaximal; }; lsp = { + # This must be enabled for the language modules to hook into + # the LSP API. + enable = true; + formatOnSave = true; lspkind.enable = false; lightbulb.enable = true; lspsaga.enable = false; trouble.enable = true; - lspSignature.enable = true; + lspSignature.enable = !isMaximal; # conflicts with blink in maximal otter-nvim.enable = isMaximal; - lsplines.enable = isMaximal; nvim-docs-view.enable = isMaximal; }; @@ -39,7 +43,6 @@ isMaximal: { # This section does not include a comprehensive list of available language modules. # To list all available language module options, please visit the nvf manual. languages = { - enableLSP = true; enableFormat = true; enableTreesitter = true; enableExtraDiagnostics = true; @@ -125,7 +128,15 @@ isMaximal: { autopairs.nvim-autopairs.enable = true; - autocomplete.nvim-cmp.enable = true; + # nvf provides various autocomplete options. The tried and tested nvim-cmp + # is enabled in default package, because it does not trigger a build. We + # enable blink-cmp in maximal because it needs to build its rust fuzzy + # matcher library. + autocomplete = { + nvim-cmp.enable = !isMaximal; + blink-cmp.enable = isMaximal; + }; + snippets.luasnip.enable = true; filetree = { @@ -151,6 +162,7 @@ isMaximal: { enable = true; gitsigns.enable = true; gitsigns.codeActions.enable = false; # throws an annoying debug message + neogit.enable = isMaximal; }; minimap = { @@ -180,6 +192,9 @@ isMaximal: { surround.enable = isMaximal; leetcode-nvim.enable = isMaximal; multicursors.enable = isMaximal; + smart-splits.enable = isMaximal; + undotree.enable = isMaximal; + nvim-biscuits.enable = isMaximal; motion = { hop.enable = true; @@ -188,6 +203,7 @@ isMaximal: { }; images = { image-nvim.enable = false; + img-clip.enable = isMaximal; }; }; @@ -236,6 +252,7 @@ isMaximal: { cmp.enable = isMaximal; }; codecompanion-nvim.enable = false; + avante-nvim.enable = isMaximal; }; session = { diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..e597b612 --- /dev/null +++ b/default.nix @@ -0,0 +1,15 @@ +(import ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + inherit (lock.nodes.flake-compat.locked) url rev narHash; + in + builtins.fetchTarball { + url = "${url}/archive/${rev}.tar.gz"; + sha256 = narHash; + } + ) { + src = ./.; + copySourceTreeToStore = false; + useBuiltinsFetchTree = true; + }) +.defaultNix diff --git a/docs/default.nix b/docs/default.nix index 98b29db0..49f90b80 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -12,6 +12,7 @@ inherit ( (lib.evalModules { + specialArgs = {inherit inputs;}; modules = import ../modules/modules.nix { inherit lib pkgs; diff --git a/docs/manual/configuring.md b/docs/manual/configuring.md index f891c7a6..95195f78 100644 --- a/docs/manual/configuring.md +++ b/docs/manual/configuring.md @@ -1,5 +1,15 @@ # Configuring nvf {#ch-configuring} +[helpful tips section]: #ch-helpful-tips + +nvf allows for _very_ extensive configuration in Neovim through the Nix module +interface. The below chapters describe several of the options exposed in nvf for +your convenience. You might also be interested in the [helpful tips section] for +more advanced or unusual configuration options supported by nvf. + +Note that this section does not cover module _options_. For an overview of all +module options provided by nvf, please visit the [appendix](/nvf/options.html) + ```{=include=} chapters configuring/custom-package.md configuring/custom-plugins.md @@ -7,4 +17,5 @@ configuring/overriding-plugins.md configuring/languages.md configuring/dags.md configuring/dag-entries.md +configuring/autocmds.md ``` diff --git a/docs/manual/configuring/autocmds.md b/docs/manual/configuring/autocmds.md new file mode 100644 index 00000000..be10e726 --- /dev/null +++ b/docs/manual/configuring/autocmds.md @@ -0,0 +1,119 @@ +# Autocommands and Autogroups {#ch-autocmds-augroups} + +This module allows you to declaratively configure Neovim autocommands and +autogroups within your Nix configuration. + +## Autogroups (`vim.augroups`) {#sec-vim-augroups} + +Autogroups (`augroup`) organize related autocommands. This allows them to be +managed collectively, such as clearing them all at once to prevent duplicates. +Each entry in the list is a submodule with the following options: + +| Option | Type | Default | Description | Example | +| :------- | :----- | :------ | :--------------------------------------------------------------------------------------------------- | :---------------- | +| `enable` | `bool` | `true` | Enables or disables this autogroup definition. | `true` | +| `name` | `str` | _None_ | **Required.** The unique name for the autogroup. | `"MyFormatGroup"` | +| `clear` | `bool` | `true` | Clears any existing autocommands within this group before adding new ones defined in `vim.autocmds`. | `true` | + +**Example:** + +```nix +{ + vim.augroups = [ + { + name = "MyCustomAuGroup"; + clear = true; # Clear previous autocommands in this group on reload + } + { + name = "Formatting"; + # clear defaults to true + } + ]; +} +``` + +## Autocommands (`vim.autocmds`) {#sec-vim-autocmds} + +Autocommands (`autocmd`) trigger actions based on events happening within Neovim +(e.g., saving a file, entering a buffer). Each entry in the list is a submodule +with the following options: + +| Option | Type | Default | Description | Example | +| :--------- | :-------------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- | +| `enable` | `bool` | `true` | Enables or disables this autocommand definition. | `true` | +| `event` | `nullOr (listOf str)` | `null` | **Required.** List of Neovim events that trigger this autocommand (e.g., `BufWritePre`, `FileType`). | `[ "BufWritePre" ]` | +| `pattern` | `nullOr (listOf str)` | `null` | List of file patterns (globs) to match against (e.g., `*.py`, `*`). If `null`, matches all files for the given event. | `[ "*.lua", "*.nix" ]` | +| `callback` | `nullOr luaInline` | `null` | A Lua function to execute when the event triggers. Use `lib.nvim.types.luaInline` or `lib.options.literalExpression "mkLuaInline '''...'''"`. **Cannot be used with `command`.** | `lib.nvim.types.luaInline "function() print('File saved!') end"` | +| `command` | `nullOr str` | `null` | A Vimscript command to execute when the event triggers. **Cannot be used with `callback`.** | `"echo 'File saved!'"` | +| `group` | `nullOr str` | `null` | The name of an `augroup` (defined in `vim.augroups`) to associate this autocommand with. | `"MyCustomAuGroup"` | +| `desc` | `nullOr str` | `null` | A description for the autocommand (useful for introspection). | `"Format buffer on save"` | +| `once` | `bool` | `false` | If `true`, the autocommand runs only once and then automatically removes itself. | `false` | +| `nested` | `bool` | `false` | If `true`, allows this autocommand to trigger other autocommands. | `false` | + +:::{.warning} + +You cannot define both `callback` (for Lua functions) and `command` (for +Vimscript) for the same autocommand. Choose one. + +::: + +**Examples:** + +```nix +{ lib, ... }: +{ + vim.augroups = [ { name = "UserSetup"; } ]; + + vim.autocmds = [ + # Example 1: Using a Lua callback + { + event = [ "BufWritePost" ]; + pattern = [ "*.lua" ]; + group = "UserSetup"; + desc = "Notify after saving Lua file"; + callback = lib.nvim.types.luaInline '' + function() + vim.notify("Lua file saved!", vim.log.levels.INFO) + end + ''; + } + + # Example 2: Using a Vim command + { + event = [ "FileType" ]; + pattern = [ "markdown" ]; + group = "UserSetup"; + desc = "Set spellcheck for Markdown"; + command = "setlocal spell"; + } + + # Example 3: Autocommand without a specific group + { + event = [ "BufEnter" ]; + pattern = [ "*.log" ]; + desc = "Disable line numbers in log files"; + command = "setlocal nonumber"; + # No 'group' specified + } + + # Example 4: Using Lua for callback + { + event = [ "BufWinEnter" ]; + pattern = [ "*" ]; + desc = "Simple greeting on entering a buffer window"; + callback = lib.generators.mkLuaInline '' + function(args) + print("Entered buffer: " .. args.buf) + end + ''; + + # Run only once per session trigger + once = true; + } + ]; +} +``` + +These definitions are automatically translated into the necessary Lua code to +configure `vim.api.nvim_create_augroup` and `vim.api.nvim_create_autocmd` when +Neovim starts. diff --git a/docs/manual/configuring/custom-package.md b/docs/manual/configuring/custom-package.md index 51d996b6..3e9e324a 100644 --- a/docs/manual/configuring/custom-package.md +++ b/docs/manual/configuring/custom-package.md @@ -1,12 +1,12 @@ # Custom Neovim Package {#ch-custom-package} As of v0.5, you may now specify the Neovim package that will be wrapped with -your configuration. This is done with the `vim.package` option. +your configuration. This is done with the [](#opt-vim.package) option. ```nix {inputs, pkgs, ...}: { # using the neovim-nightly overlay - vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim; + vim.package = inputs.neovim-overlay.packages.${pkgs.stdenv.system}.neovim; } ``` diff --git a/docs/manual/configuring/custom-plugins.md b/docs/manual/configuring/custom-plugins.md index 79a691e2..bf986a0f 100644 --- a/docs/manual/configuring/custom-plugins.md +++ b/docs/manual/configuring/custom-plugins.md @@ -1,22 +1,33 @@ # Custom Plugins {#ch-custom-plugins} -**nvf**, by default, exposes a wide variety of plugins as module options for -your convenience and bundles necessary dependencies into **nvf**'s runtime. In -case a plugin is not available in **nvf**, you may consider making a pull -request to **nvf** to include it as a module or you may add it to your -configuration locally. +**nvf** exposes a very wide variety of plugins by default, which are consumed by +module options. This is done for your convenience, and to bundle all necessary +dependencies into **nvf**'s runtime with full control of versioning, testing and +dependencies. In the case a plugin you need is _not_ available, you may consider +making a pull request to add the package you're looking for, or you may add it +to your configuration locally. The below section describes how new plugins may +be added to the user's configuration. ## Adding Plugins {#ch-adding-plugins} -There are multiple ways of adding custom plugins to your **nvf** configuration. +Per **nvf**'s design choices, there are several ways of adding custom plugins to +your configuration as you need them. As we aim for extensive configuration, it +is possible to add custom plugins (from nixpkgs, pinning tools, flake inputs, +etc.) to your Neovim configuration before they are even implemented in **nvf** +as a module. -You can use custom plugins, before they are implemented in the flake. To add a -plugin to the runtime, you need to add it to the [](#opt-vim.startPlugins) list -in your configuration. +:::{.info} -Adding a plugin to `startPlugins` will not allow you to configure the plugin -that you have added, but **nvf** provides multiple way of configuring any custom -plugins that you might have added to your configuration. +To add a plugin to your runtime, you will need to add it to +[](#opt-vim.startPlugins) list in your configuration. This is akin to cloning a +plugin to `~/.config/nvim`, but they are only ever placed in the Nix store and +never exposed to the outside world for purity and full isolation. + +::: + +As you would configure a cloned plugin, you must configure the new plugins that +you've added to `startPlugins.` **nvf** provides multiple ways of configuring +any custom plugins that you might have added to your configuration. ```{=include=} sections custom-plugins/configuring.md diff --git a/docs/manual/configuring/custom-plugins/configuring.md b/docs/manual/configuring/custom-plugins/configuring.md index 5106d29b..a4b3ce19 100644 --- a/docs/manual/configuring/custom-plugins/configuring.md +++ b/docs/manual/configuring/custom-plugins/configuring.md @@ -1,13 +1,20 @@ # Configuring {#sec-configuring-plugins} Just making the plugin to your Neovim configuration available might not always -be enough. In that case, you can write custom lua config using either -`config.vim.lazy.plugins.*.setupOpts` `config.vim.extraPlugins.*.setup` or -`config.vim.luaConfigRC`. +be enough., for example, if the plugin requires a setup table. In that case, you +can write custom Lua configuration using one of -The first option uses an extended version of `lz.n`'s PluginSpec. `setupModule` -and `setupOpt` can be used if the plugin uses a `require('module').setup(...)` -pattern. Otherwise, the `before` and `after` hooks should do what you need. +- `config.vim.lazy.plugins.*.setupOpts` +- `config.vim.extraPlugins.*.setup` +- `config.vim.luaConfigRC`. + +## Lazy Plugins {#ch-vim-lazy-plugins} + +`config.vim.lazy.plugins.*.setupOpts` is useful for lazy-loading plugins, and +uses an extended version of `lz.n's` `PluginSpec` to expose a familiar +interface. `setupModule` and `setupOpt` can be used if the plugin uses a +`require('module').setup(...)` pattern. Otherwise, the `before` and `after` +hooks should do what you need. ```nix { @@ -25,50 +32,61 @@ pattern. Otherwise, the `before` and `after` hooks should do what you need. } ``` -The second option uses an attribute set, which maps DAG section names to a +## Standard API {#ch-vim-extra-plugins} + +`vim.extraPlugins` uses an attribute set, which maps DAG section names to a custom type, which has the fields `package`, `after`, `setup`. They allow you to set the package of the plugin, the sections its setup code should be after (note that the `extraPlugins` option has its own DAG scope), and the its setup code respectively. For example: ```nix -config.vim.extraPlugins = with pkgs.vimPlugins; { - aerial = { - package = aerial-nvim; - setup = "require('aerial').setup {}"; - }; +{pkgs, ...}: { + config.vim.extraPlugins = { + aerial = { + package = pkgs.vimPlugins.aerial-nvim; + setup = "require('aerial').setup {}"; + }; - harpoon = { - package = harpoon; - setup = "require('harpoon').setup {}"; - after = ["aerial"]; # place harpoon configuration after aerial + harpoon = { + package = pkgs.vimPlugins.harpoon; + setup = "require('harpoon').setup {}"; + after = ["aerial"]; # place harpoon configuration after aerial + }; }; } ``` -The third option also uses an attribute set, but this one is resolved as a DAG +### Setup using luaConfigRC {#setup-using-luaconfigrc} + +`vim.luaConfigRC` also uses an attribute set, but this one is resolved as a DAG directly. The attribute names denote the section names, and the values lua code. For example: ```nix { - # this will create an "aquarium" section in your init.lua with the contents of your custom config - # which will be *appended* to the rest of your configuration, inside your init.vim + # This will create a section called "aquarium" in the 'init.lua' with the + # contents of your custom configuration. By default 'entryAnywhere' is implied + # in DAGs, so this will be inserted to an arbitrary position. In the case you + # wish to control the position of this section with more precision, please + # look into the DAGs section of the manual. config.vim.luaConfigRC.aquarium = "vim.cmd('colorscheme aquiarum')"; } ``` +[DAG system]: #ch-using-dags +[DAG section]: #ch-dag-entries ::: {.note} -One of the greatest strengths of nvf is the ability to order -snippets of configuration via the DAG system. It will allow specifying positions -of individual sections of configuration as needed. nvf provides helper functions +One of the **greatest strengths** of **nvf** is the ability to order +configuration snippets precisely using the [DAG system]. DAGs +are a very powerful mechanism that allows specifying positions +of individual sections of configuration as needed. We provide helper functions in the extended library, usually under `inputs.nvf.lib.nvim.dag` that you may use. -Please refer to the [DAG section](#ch-dag-entries) in the nvf manual +Please refer to the [DAG section] in the nvf manual to find out more about the DAG system. ::: - diff --git a/docs/manual/configuring/custom-plugins/lazy-method.md b/docs/manual/configuring/custom-plugins/lazy-method.md index ae766535..c16966b8 100644 --- a/docs/manual/configuring/custom-plugins/lazy-method.md +++ b/docs/manual/configuring/custom-plugins/lazy-method.md @@ -1,7 +1,8 @@ # Lazy Method {#sec-lazy-method} -As of version **0.7**, we exposed an API for configuring lazy-loaded plugins via -`lz.n` and `lzn-auto-require`. +As of version **0.7**, an API is exposed to allow configuring lazy-loaded +plugins via `lz.n` and `lzn-auto-require`. Below is a comprehensive example of +how it may be loaded to lazy-load an arbitrary plugin. ```nix { @@ -41,7 +42,8 @@ As of version **0.7**, we exposed an API for configuring lazy-loaded plugins via ## LazyFile event {#sec-lazyfile-event} -You can use the `LazyFile` user event to load a plugin when a file is opened: +**nvf** re-implements `LazyFile` as a familiar user event to load a plugin when +a file is opened: ```nix { @@ -55,5 +57,6 @@ You can use the `LazyFile` user event to load a plugin when a file is opened: } ``` -You can consider `LazyFile` as an alias to -`["BufReadPost" "BufNewFile" "BufWritePre"]` +You can consider the `LazyFile` event as an alias to the combination of +`"BufReadPost"`, `"BufNewFile"` and `"BufWritePre"`, i.e., a list containing all +three of those events: `["BufReadPost" "BufNewFile" "BufWritePre"]` diff --git a/docs/manual/configuring/custom-plugins/legacy-method.md b/docs/manual/configuring/custom-plugins/legacy-method.md index b2bddf43..6c399aaf 100644 --- a/docs/manual/configuring/custom-plugins/legacy-method.md +++ b/docs/manual/configuring/custom-plugins/legacy-method.md @@ -1,26 +1,31 @@ # Legacy Method {#sec-legacy-method} -Prior to version v0.5, the method of adding new plugins was adding the plugin -package to `vim.startPlugins` and add its configuration as a DAG under one of -`vim.configRC` or `vim.luaConfigRC`. Users who have not yet updated to 0.5, or -prefer a more hands-on approach may use the old method where the load order of -the plugins is determined by DAGs. +Prior to version **0.5**, the method of adding new plugins was adding the plugin +package to [](#opt-vim.startPlugins) and adding its configuration as a DAG under +one of `vim.configRC` or [](#opt-vim.luaConfigRC). While `configRC` has been +deprecated, users who have not yet updated to 0.5 or those who prefer a more +hands-on approach may choose to use the old method where the load order of the +plugins is explicitly determined by DAGs without internal abstractions. -## Adding plugins {#sec-adding-plugins} +## Adding New Plugins {#sec-adding-new-plugins} -To add a plugin not available in nvf as a module to your configuration, you may -add it to [](#opt-vim.startPlugins) in order to make it available to Neovim at -runtime. +To add a plugin not available in **nvf** as a module to your configuration using +the legacy method, you must add it to [](#opt-vim.startPlugins) in order to make +it available to Neovim at runtime. ```nix {pkgs, ...}: { # Add a Neovim plugin from Nixpkgs to the runtime. + # This does not need to come explicitly from packages. 'vim.startPlugins' + # takes a list of *string* (to load internal plugins) or *package* to load + # a Neovim package from any source. vim.startPlugins = [pkgs.vimPlugins.aerial-nvim]; } ``` -And to configure the added plugin, you can use the `luaConfigRC` option to -provide configuration as a DAG using the **nvf** extended library. +Once the package is available in Neovim's runtime, you may use the `luaConfigRC` +option to provide configuration as a DAG using the **nvf** extended library in +order to configure the added plugin, ```nix {inputs, ...}: let @@ -29,6 +34,8 @@ provide configuration as a DAG using the **nvf** extended library. # to specialArgs, the 'inputs' prefix may be omitted. inherit (inputs.nvf.lib.nvim.dag) entryAnywhere; in { + # luaConfigRC takes Lua configuration verbatim and inserts it at an arbitrary + # position by default or if 'entryAnywhere' is used. vim.luaConfigRC.aerial-nvim= entryAnywhere '' require('aerial').setup { -- your configuration here diff --git a/docs/manual/configuring/custom-plugins/non-lazy-method.md b/docs/manual/configuring/custom-plugins/non-lazy-method.md index 351af2eb..24ef7688 100644 --- a/docs/manual/configuring/custom-plugins/non-lazy-method.md +++ b/docs/manual/configuring/custom-plugins/non-lazy-method.md @@ -1,14 +1,15 @@ # Non-lazy Method {#sec-non-lazy-method} -As of version **0.5**, we have a more extensive API for configuring plugins, -under `vim.extraPlugins`. Instead of using DAGs exposed by the library, you may -use the extra plugin module as follows: +As of version **0.5**, we have a more extensive API for configuring plugins that +should be preferred over the legacy method. This API is available as +[](#opt-vim.extraPlugins). Instead of using DAGs exposed by the library +_directly_, you may use the extra plugin module as follows: ```nix -{ - config.vim.extraPlugins = with pkgs.vimPlugins; { +{pkgs, ...}: { + config.vim.extraPlugins = { aerial = { - package = aerial-nvim; + package = pkgs.vimPlugins.aerial-nvim; setup = '' require('aerial').setup { -- some lua configuration here @@ -17,10 +18,12 @@ use the extra plugin module as follows: }; harpoon = { - package = harpoon; + package = pkgs.vimPlugins.harpoon; setup = "require('harpoon').setup {}"; after = ["aerial"]; }; }; } ``` + +This provides a level of abstraction over the DAG system for faster iteration. diff --git a/docs/manual/configuring/languages/lsp.md b/docs/manual/configuring/languages/lsp.md index 6d6ed5bc..2ddc08b5 100644 --- a/docs/manual/configuring/languages/lsp.md +++ b/docs/manual/configuring/languages/lsp.md @@ -1,17 +1,22 @@ # LSP Custom Packages/Command {#sec-languages-custom-lsp-packages} -In any of the `opt.languages..lsp.package` options you can provide -your own LSP package, or provide the command to launch the language server, as a -list of strings. You can use this to skip automatic installation of a language -server, and instead use the one found in your `$PATH` during runtime, for -example: +One of the strengths of **nvf** is convenient aliases to quickly configure LSP +servers through the Nix module system. By default the LSP packages for relevant +language modules will be pulled into the closure. If this is not desirable, you +may provide **a custom LSP package** (e.g., a Bash script that calls a command) +or **a list of strings** to be interpreted as the command to launch the language +server. By using a list of strings, you can use this to skip automatic +installation of a language server, and instead use the one found in your `$PATH` +during runtime, for example: ```nix vim.languages.java = { lsp = { enable = true; - # this expects jdt-language-server to be in your PATH - # or in `vim.extraPackages` + + # This expects 'jdt-language-server' to be in your PATH or in + # 'vim.extraPackages.' There are no additional checks performed to see + # if the command provided is valid. package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"]; }; } diff --git a/docs/manual/configuring/overriding-plugins.md b/docs/manual/configuring/overriding-plugins.md index bb698666..25a71559 100644 --- a/docs/manual/configuring/overriding-plugins.md +++ b/docs/manual/configuring/overriding-plugins.md @@ -2,9 +2,9 @@ The [additional plugins section](#sec-additional-plugins) details the addition of new plugins to nvf under regular circumstances, i.e. while making a pull -request to the project. You may _override_ those plugins in your config -to change source versions, e.g., to use newer versions of plugins -that are not yet updated in **nvf**. +request to the project. You may _override_ those plugins in your config to +change source versions, e.g., to use newer versions of plugins that are not yet +updated in **nvf**. ```nix vim.pluginOverrides = { diff --git a/docs/manual/default-configs.md b/docs/manual/default-configs.md deleted file mode 100644 index 96ffa81a..00000000 --- a/docs/manual/default-configs.md +++ /dev/null @@ -1,10 +0,0 @@ -# Default Configs {#ch-default-configs} - -While you can configure **nvf** yourself using the builder, you can also use the -pre-built configs that are available. Here are a few default configurations you -can use. - -```{=include=} chapters -default-configs/maximal.md -default-configs/nix.md -``` diff --git a/docs/manual/default-configs/maximal.md b/docs/manual/default-configs/maximal.md deleted file mode 100644 index 36887633..00000000 --- a/docs/manual/default-configs/maximal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Maximal {#sec-default-maximal} - -```bash -$ nix shell github:notashelf/nvf#maximal test.nix -``` - -It is the same fully configured Neovim as with the [Nix](#sec-default-nix) -configuration, but with every supported language enabled. - -::: {.note} Running the maximal config will download _a lot_ of packages as it -is downloading language servers, formatters, and more. ::: diff --git a/docs/manual/default-configs/nix.md b/docs/manual/default-configs/nix.md deleted file mode 100644 index 5210ef39..00000000 --- a/docs/manual/default-configs/nix.md +++ /dev/null @@ -1,9 +0,0 @@ -# Nix {#sec-default-nix} - -```bash -$ nix run github:notashelf/nvf#nix test.nix -``` - -Enables all the of Neovim plugins, with language support for specifically Nix. -This lets you see what a fully configured neovim setup looks like without -downloading a whole bunch of language servers and associated tools. diff --git a/docs/manual/hacking/additional-plugins.md b/docs/manual/hacking/additional-plugins.md index 0ed252c7..1f7ba778 100644 --- a/docs/manual/hacking/additional-plugins.md +++ b/docs/manual/hacking/additional-plugins.md @@ -1,25 +1,92 @@ # Adding Plugins {#sec-additional-plugins} -To add a new Neovim plugin, use `npins` +There are two methods for adding new Neovim plugins to **nvf**. npins is the +faster option that should be preferred if the plugin consists of pure Lua or +Vimscript code. In which case there is no building required, and we can easily +handle the copying of plugin files. Alternative method, which is required when +plugins try to build their own libraries (e.g., in Rust or C) that need to be +built with Nix to function correctly. -Use: +## With npins {#sec-npins-for-plugins} -`nix-shell -p npins` or `nix shell nixpkgs#npins` +npins is the standard method of adding new plugins to **nvf**. You simply need +the repository URL for the plugin, and can add it as a source to be built +automatically with one command. To add a new Neovim plugin, use `npins`. For +example: + +```bash +nix-shell -p npins # or nix shell nixpkgs#npins if using flakes +``` Then run: -`npins add --name github -b ` +```bash +npins add --name github -b +``` -Be sure to replace any non-alphanumeric characters with `-` for `--name` +::: {.note} -For example +Be sure to replace any non-alphanumeric characters with `-` for `--name`. For +example -`npins add --name lazydev-nvim github folke lazydev.nvim -b main` +```bash +npins add --name lazydev-nvim github folke lazydev.nvim -b main +``` -You can now reference this plugin as a **string**. +::: + +Once the `npins` command is done, you can start referencing the plugin as a +**string**. ```nix -config.vim.startPlugins = ["lazydev-nvim"]; +{ + config.vim.startPlugins = ["lazydev-nvim"]; +} +``` + +## Packaging Complex Plugins {#sec-pkgs-for-plugins} + +[blink.cmp]: https://github.com/Saghen/blink.cmp + +Some plugins require additional packages to be built and substituted to function +correctly. For example [blink.cmp] requires its own fuzzy matcher library, built +with Rust, to be installed or else defaults to a much slower Lua implementation. +In the Blink documentation, you are advised to build with `cargo` but that is +not ideal since we are leveraging the power of Nix. In this case the ideal +solution is to write a derivation for the plugin. + +We use `buildRustPackage` to build the library from the repository root, and +copy everything in the `postInstall` phase. + +```nix +postInstall = '' + cp -r {lua,plugin} "$out" + + mkdir -p "$out/doc" + cp 'doc/'*'.txt' "$out/doc/" + + mkdir -p "$out/target" + mv "$out/lib" "$out/target/release" +''; +``` + +In a similar fashion, you may utilize `stdenv.mkDerivation` and other Nixpkgs +builders to build your library from source, and copy the relevant files and Lua +plugin files in the `postInstall` phase. Do note, however, that you still need +to fetch the plugin sources somehow. npins is, once again, the recommended +option to fetch the plugin sources. Refer to the previous section on how to use +npins to add a new plugin. + +Plugins built from source must go into the `flake/pkgs/by-name` overlay. It will +automatically create flake outputs for individual packages. Lastly, you must add +your package to the plugin builder (`pluginBuilders`) function manually in +`modules/wrapper/build/config.nix`. Once done, you may refer to your plugin as a +**string**. + +```nix +{ + config.vim.startPlugins = ["blink-cmp"]; +} ``` ## Modular setup options {#sec-modular-setup-options} @@ -70,7 +137,7 @@ in { } ``` -This above config will result in this lua script: +This above config will result in this Lua script: ```lua require('plugin-name').setup({ @@ -101,23 +168,41 @@ own fields! As you've seen above, `toLuaObject` is used to convert our nix attrSet `cfg.setupOpts`, into a lua table. Here are some rules of the conversion: -1. nix `null` converts to lua `nil` -2. number and strings convert to their lua counterparts -3. nix attrSet/list convert into lua tables -4. you can write raw lua code using `lib.generators.mkLuaInline`. This function - is part of nixpkgs. +1. Nix `null` converts to lua `nil` +2. Number and strings convert to their lua counterparts +3. Nix attribute sets (`{}`) and lists (`[]`) convert into Lua dictionaries and + tables respectively. Here is an example of Nix -> Lua conversion. + - `{foo = "bar"}` -> `{["foo"] = "bar"}` + - `["foo" "bar"]` -> `{"foo", "bar"}` +4. You can write raw Lua code using `lib.generators.mkLuaInline`. This function + is part of nixpkgs, and is accessible without relying on **nvf**'s extended + library. + - `mkLuaInline "function add(a, b) return a + b end"` will yield the + following result: -Example: + ```nix + { + _type = "lua-inline"; + expr = "function add(a, b) return a + b end"; + } + ``` -```nix -vim.your-plugin.setupOpts = { - on_init = lib.generators.mkLuaInline '' - function() - print('we can write lua!') - end - ''; -} -``` + The above expression will be interpreted as a Lua expression in the final + config. Without the `mkLuaInline` function, you will only receive a string + literal. You can use it to feed plugin configuration tables Lua functions + that return specific values as expected by the plugins. + + ```nix + { + vim.your-plugin.setupOpts = { + on_init = lib.generators.mkLuaInline '' + function() + print('we can write lua!') + end + ''; + }; + } + ``` ## Lazy plugins {#sec-lazy-plugins} @@ -126,25 +211,24 @@ Lazy plugins are managed by `lz.n`. ```nix # in modules/.../your-plugin/config.nix -{lib, config, ...}: -let +{config, ...}: let cfg = config.vim.your-plugin; in { vim.lazy.plugins.your-plugin = { - # instead of vim.startPlugins, use this: + # Instead of vim.startPlugins, use this: package = "your-plugin"; - # if your plugin uses the `require('your-plugin').setup{...}` pattern + # Δ±f your plugin uses the `require('your-plugin').setup{...}` pattern setupModule = "your-plugin"; inherit (cfg) setupOpts; - # events that trigger this plugin to be loaded + # Events that trigger this plugin to be loaded event = ["DirChanged"]; cmd = ["YourPluginCommand"]; - # keymaps + # Plugin Keymaps keys = [ - # we'll cover this in detail in the keymaps section + # We'll cover this in detail in the 'keybinds' section { key = "d"; mode = "n"; @@ -152,7 +236,6 @@ in { } ]; }; -; } ``` @@ -163,7 +246,9 @@ require('lz.n').load({ { "name-of-your-plugin", after = function() - require('your-plugin').setup({--[[ your setupOpts ]]}) + require('your-plugin').setup({ + --[[ your setupOpts ]]-- + }) end, event = {"DirChanged"}, @@ -175,5 +260,7 @@ require('lz.n').load({ }) ``` -A full list of options can be found -[here](https://notashelf.github.io/nvf/options.html#opt-vim.lazy.plugins +[`vim.lazy.plugins` spec]: https://notashelf.github.io/nvf/options.html#opt-vim.lazy.plugins + +A full list of options can be found in the [`vim.lazy.plugins` spec] on the +rendered manual. diff --git a/docs/manual/hacking/keybinds.md b/docs/manual/hacking/keybinds.md index 3940466f..90623dd3 100644 --- a/docs/manual/hacking/keybinds.md +++ b/docs/manual/hacking/keybinds.md @@ -30,8 +30,8 @@ There are many settings available in the options. Please refer to the [documentation](https://notashelf.github.io/nvf/options.html#opt-vim.keymaps) to see a list of them. -**nvf** provides a helper function, so that you don't have to write the -mapping attribute sets every time: +**nvf** provides a helper function, so that you don't have to write the mapping +attribute sets every time: - `mkKeymap`, which mimics neovim's `vim.keymap.set` function diff --git a/docs/manual/installation/custom-configuration.md b/docs/manual/installation/custom-configuration.md index 940f35a3..52f81573 100644 --- a/docs/manual/installation/custom-configuration.md +++ b/docs/manual/installation/custom-configuration.md @@ -39,7 +39,7 @@ An example flake that exposes your custom Neovim configuration might look like theme.enable = true; # Enable Treesitter - tree-sitter.enable = true; + treesitter.enable = true; # Other options will go here. Refer to the config # reference in Appendix B of the nvf manual. diff --git a/docs/manual/installation/modules/flakes.md b/docs/manual/installation/modules/flakes.md new file mode 100644 index 00000000..273d2b00 --- /dev/null +++ b/docs/manual/installation/modules/flakes.md @@ -0,0 +1,33 @@ +### Prerequisites {#sec-flakes-prerequisites} + +To install nvf with flakes, you must make sure the following requirements are +met. + +1. Nix 2.4 or later must be installed. You may use `nix-shell` to get a later + version of Nix from nixpkgs. +2. Flake-related experimental features must be enabled. Namely, you need + `nix-command` and `flakes`. Some Nix vendors enable those by default, please + consult their documentation if you are not using mainstream Nix. + - When using NixOS, add the following to your `configuration.nix` and rebuild + your system. + + ```nix + nix.settings.experimental-features = "nix-command flakes"; + ``` + + - If you are not using NixOS, add the following to `nix.conf` (located at + `~/.config/nix/` or `/etc/nix/nix.conf`). + + ```bash + experimental-features = nix-command flakes + ``` + + - You may need to restart the Nix daemon with, for example, + `sudo systemctl restart nix-daemon.service`. + + - Alternatively, you can enable flakes on a per-command basis with the + following additional flags to `nix` and `home-manager`: + + ```sh + $ nix --extra-experimental-features "nix-command flakes" + ``` diff --git a/docs/manual/installation/modules/home-manager.md b/docs/manual/installation/modules/home-manager.md index 2b359af5..37d35e2b 100644 --- a/docs/manual/installation/modules/home-manager.md +++ b/docs/manual/installation/modules/home-manager.md @@ -5,9 +5,18 @@ inside the home-manager configuration without having to call for the wrapper yourself. It is the recommended way to use **nvf** alongside the NixOS module depending on your needs. -To use it, we first add the input flake. +## With Flakes {#sec-hm-flakes} + +```{=include=} +flakes.md +``` + +### Usage {#sec-hm-flakes-usage} + +To use **nvf** with flakes, we first need to add the input to our `flake.nix`. ```nix +# flake.nix { inputs = { # Optional, if you intend to follow nvf's obsidian-nvim input @@ -16,7 +25,7 @@ To use it, we first add the input flake. # Required, nvf works best and only directly supports flakes nvf = { - url = "github:notashelf/nvf"; + url = "github:NotAShelf/nvf"; # You can override the input nixpkgs to follow your system's # instance of nixpkgs. This is safe to do as nvf does not depend # on a binary cache. @@ -25,6 +34,8 @@ To use it, we first add the input flake. # for example: inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs }; + + # ... }; } ``` @@ -39,7 +50,7 @@ Followed by importing the home-manager module somewhere in your configuration. } ``` -## Example Installation {#sec-example-installation-hm} +### Example Installation {#sec-example-installation-hm} ```nix { @@ -66,7 +77,8 @@ Once the module is properly imported by your host, you will be able to use the `programs.nvf` module option anywhere in your configuration in order to configure **nvf**. -```nix{ +```nix +{ programs.nvf = { enable = true; # your settings need to go into the settings attribute set @@ -89,3 +101,45 @@ installation sections of the manual. You may find all available options in the [appendix](https://notashelf.github.io/nvf/options) ::: + +## Without Flakes {#sec-hm-flakeless} + +As of v0.8, it is possible to install **nvf** on a system if you are not using +flakes. This is possible thanks to the flake-compat project. + +To get started, you must fetch the repository using `builtins.fetchTarball` or a +similar mechanism. + +```nix +# home.nix +let + nvf = import (builtins.fetchTarball { + url = "https://github.com/notashelf/nvf/archive/.tar.gz"; + # Optionally, you can add 'sha256' for verification and caching + # sha256 = ""; + }); +in { + imports = [ + # Import the NixOS module from your fetched input + nvf.homeManagerModules.nvf + ]; + + # Once the module is imported, you may use `programs.nvf` as exposed by the + # NixOS module. + programs.nvf.enable = true; +} +``` + +[npins]: https://github.com/andir/npins +[niv]: https://github.com/nmattia/niv + +::: {.tip} + +Nix2 does not have a builtin lockfile mechanism like flakes. As such you must +manually update the URL and hash for your input. This is annoying to deal with, +and most users choose to defer this task to projects such as [npins] or [niv]. +If you are new to NixOS, I encourage you to look into Flakes and see if they fit +your use case. Alternatively, look into the aforementioned projects for more +convenient dependency management mechanisms. + +::: diff --git a/docs/manual/installation/modules/nixos.md b/docs/manual/installation/modules/nixos.md index bcf7472b..946905c1 100644 --- a/docs/manual/installation/modules/nixos.md +++ b/docs/manual/installation/modules/nixos.md @@ -5,9 +5,18 @@ the NixOS configuration without having to call for the wrapper yourself. It is the recommended way to use **nvf** alongside the home-manager module depending on your needs. -To use it, we first add the input flake. +## With Flakes {#sec-nixos-flakes} + +```{=include=} +flakes.md +``` + +### Usage {#sec-nixos-flakes-usage} + +To use **nvf** with flakes, we first need to add the input to our `flake.nix`. ```nix +# flake.nix { inputs = { # Optional, if you intend to follow nvf's obsidian-nvim input @@ -16,7 +25,7 @@ To use it, we first add the input flake. # Required, nvf works best and only directly supports flakes nvf = { - url = "github:notashelf/nvf"; + url = "github:NotAShelf/nvf"; # You can override the input nixpkgs to follow your system's # instance of nixpkgs. This is safe to do as nvf does not depend # on a binary cache. @@ -25,6 +34,8 @@ To use it, we first add the input flake. # for example: inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs }; + + # ... }; } ``` @@ -39,7 +50,7 @@ Followed by importing the NixOS module somewhere in your configuration. } ``` -## Example Installation {#sec-example-installation-nixos} +### Example Installation {#sec-example-installation-nixos} ```nix { @@ -64,10 +75,12 @@ Once the module is properly imported by your host, you will be able to use the `programs.nvf` module option anywhere in your configuration in order to configure **nvf**. -```nix{ +```nix +{ programs.nvf = { enable = true; - # your settings need to go into the settings attribute set + + # Your settings need to go into the settings attribute set # most settings are documented in the appendix settings = { vim.viAlias = false; @@ -87,3 +100,45 @@ installation sections of the manual. You may find all available options in the [appendix](https://notashelf.github.io/nvf/options) ::: + +## Without Flakes {#sec-nixos-flakeless} + +As of v0.8, it is possible to install **nvf** on a system if you are not using +flakes. This is possible thanks to the flake-compat project. + +To get started, you must fetch the repository using `builtins.fetchTarball` or a +similar mechanism. + +```nix +# configuration.nix +let + nvf = import (builtins.fetchTarball { + url = "https://github.com/notashelf/nvf/archive/.tar.gz"; + # Optionally, you can add 'sha256' for verification and caching + # sha256 = ""; + }); +in { + imports = [ + # Import the NixOS module from your fetched input + nvf.nixosModules.nvf + ]; + + # Once the module is imported, you may use `programs.nvf` as exposed by the + # NixOS module. + programs.nvf.enable = true; +} +``` + +[npins]: https://github.com/andir/npins +[niv]: https://github.com/nmattia/niv + +::: {.tip} + +Nix2 does not have a builtin lockfile mechanism like flakes. As such you must +manually update the URL and hash for your input. This is annoying to deal with, +and most users choose to defer this task to projects such as [npins] or [niv]. +If you are new to NixOS, I encourage you to look into Flakes and see if they fit +your use case. Alternatively, look into the aforementioned projects for more +convenient dependency management mechanisms. + +::: diff --git a/docs/manual/installation/standalone/nixos.md b/docs/manual/installation/standalone/nixos.md index 267d15b7..65dc9205 100644 --- a/docs/manual/installation/standalone/nixos.md +++ b/docs/manual/installation/standalone/nixos.md @@ -49,7 +49,8 @@ the default theme enabled. You may use other options inside `config.vim` in # ... modules = [ # This will make wrapped neovim available in your system packages - # Can also move this to another config file if you pass inputs/self around with specialArgs + # Can also move this to another config file if you pass your own + # inputs/self around with specialArgs ({pkgs, ...}: { environment.systemPackages = [self.packages.${pkgs.stdenv.system}.neovim]; }) @@ -58,4 +59,5 @@ the default theme enabled. You may use other options inside `config.vim` in }; }; }; -}``` +} +``` diff --git a/docs/manual/manual.md b/docs/manual/manual.md index fd225766..18932896 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -8,7 +8,6 @@ try-it-out.md ``` ```{=include=} parts -default-configs.md installation.md configuring.md tips.md diff --git a/docs/manual/tips.md b/docs/manual/tips.md index 6e6dc9c2..01bddc40 100644 --- a/docs/manual/tips.md +++ b/docs/manual/tips.md @@ -1,7 +1,14 @@ # Helpful Tips {#ch-helpful-tips} +This section provides helpful tips that may be considered "unorthodox" or "too +advanced" for some users. We will cover basic debugging steps, offline +documentation, configuring **nvf** with pure Lua and using custom plugin sources +in **nvf** in this section. For general configuration tips, please see previous +chapters. + ```{=include=} chapters -tips/pure-lua-config.md tips/debugging-nvf.md tips/offline-docs.md +tips/pure-lua-config.md +tips/plugin-sources.md ``` diff --git a/docs/manual/tips/plugin-sources.md b/docs/manual/tips/plugin-sources.md new file mode 100644 index 00000000..7cf6a470 --- /dev/null +++ b/docs/manual/tips/plugin-sources.md @@ -0,0 +1,131 @@ +# Adding Plugins From Different Sources {#sec-plugin-sources} + +**nvf** attempts to avoid depending on Nixpkgs for Neovim plugins. For the most +part, this is accomplished by defining each plugin's source and building them +from source. + +[npins]: https://github.com/andir/npins + +To define plugin sources, we use [npins] and pin each plugin source using +builtin fetchers. You are not bound by this restriction. In your own +configuration, any kind of fetcher or plugin source is fine. + +## Nixpkgs & Friends {#ch-plugins-from-nixpkgs} + +`vim.startPlugins` and `vim.optPlugins` options take either a **string**, in +which case a plugin from nvf's internal plugins registry will be used, or a +**package**. If your plugin does not require any setup, or ordering for it s +configuration, then it is possible to add it to `vim.startPlugins` to load it on +startup. + +```nix +{pkgs, ...}: { + # Aerial does require some setup. In the case you pass a plugin that *does* + # require manual setup, then you must also call the setup function. + vim.startPlugins = [pkgs.vimPlugins.aerial-nvim]; +} +``` + +[`vim.extraPlugins`]: https://notashelf.github.io/nvf/options.html#opt-vim.extraPlugins + +This will fetch aerial.nvim from nixpkgs, and add it to Neovim's runtime path to +be loaded manually. Although for plugins that require manual setup, you are +encouraged to use [`vim.extraPlugins`]. + +```nix +{ + vim.extraPlugins = { + aerial = { + package = pkgs.vimPlugins.aerial-nvim; + setup = "require('aerial').setup {}"; + }; + }; +} +``` + +[custom plugins section]: https://notashelf.github.io/nvf/index.xhtml#ch-custom-plugins + +More details on the extraPlugins API is documented in the +[custom plugins section]. + +## Building Your Own Plugins {#ch-plugins-from-source} + +In the case a plugin is not available in Nixpkgs, or the Nixpkgs package is +outdated (or, more likely, broken) it is possible to build the plugins from +source using a tool, such as [npins]. You may also use your _flake inputs_ as +sources. + +Example using plugin inputs: + +```nix +{ + # In your flake.nix + inputs = { + aerial-nvim = { + url = "github:stevearc/aerial.nvim" + flake = false; + }; + }; + + # Make sure that 'inputs' is properly propagated into Nvf, for example, through + # specialArgs. + outputs = { ... }; +} +``` + +In the case, you may use the input directly for the plugin's source attribute in +`buildVimPlugin`. + +```nix +# Make sure that 'inputs' is properly propagated! It will be missing otherwise +# and the resulting errors might be too obscure. +{inputs, ...}: let + aerial-from-source = pkgs.vimUtils.buildVimPlugin { + name = "aerial-nvim"; + src = inputs.aerial-nvim; + }; +in { + vim.extraPlugins = { + aerial = { + package = aerial-from-source; + setup = "require('aerial').setup {}"; + }; + }; +} +``` + +Alternatively, if you do not want to keep track of the source using flake inputs +or npins, you may call `fetchFromGitHub` (or other fetchers) directly. An +example would look like this. + +```nix +regexplainer = buildVimPlugin { + name = "nvim-regexplainer"; + src = fetchFromGitHub { + owner = "bennypowers"; + repo = "nvim-regexplainer"; + rev = "4250c8f3c1307876384e70eeedde5149249e154f"; + hash = "sha256-15DLbKtOgUPq4DcF71jFYu31faDn52k3P1x47GL3+b0="; + }; + + # The 'buildVimPlugin' imposes some "require checks" on all plugins build from + # source. Failing tests, if they are not relevant, can be disabled using the + # 'nvimSkipModule' argument to the 'buildVimPlugin' function. + nvimSkipModule = [ + "regexplainer" + "regexplainer.buffers.init" + "regexplainer.buffers.popup" + "regexplainer.buffers.register" + "regexplainer.buffers.shared" + "regexplainer.buffers.split" + "regexplainer.component.descriptions" + "regexplainer.component.init" + "regexplainer.renderers.narrative.init" + "regexplainer.renderers.narrative.narrative" + "regexplainer.renderers.init" + "regexplainer.utils.defer" + "regexplainer.utils.init" + "regexplainer.utils.treesitter" + ]; +} +``` diff --git a/docs/manual/tips/pure-lua-config.md b/docs/manual/tips/pure-lua-config.md index eb8881e9..1dca8296 100644 --- a/docs/manual/tips/pure-lua-config.md +++ b/docs/manual/tips/pure-lua-config.md @@ -23,7 +23,7 @@ manner. # flake.nix. For the sake of the argument, we will assume that the Neovim lua # configuration is in a nvim/ directory relative to flake.nix. vim = { - additionalRuntimeDirectories = [ + additionalRuntimePaths = [ # This will be added to Neovim's runtime paths. Conceptually, this behaves # very similarly to ~/.config/nvim but you may not place a top-level # init.lua to be able to require it directly. @@ -41,7 +41,7 @@ directory, and call it with [](#opt-vim.luaConfigRC). ```nix {pkgs, ...}: { vim = { - additionalRuntimeDirectories = [ + additionalRuntimePaths = [ # You can list more than one file here. ./nvim-custom-1 diff --git a/docs/manual/try-it-out.md b/docs/manual/try-it-out.md index 8244c2b7..a5d20363 100644 --- a/docs/manual/try-it-out.md +++ b/docs/manual/try-it-out.md @@ -5,19 +5,20 @@ installing it to your machine. Below are the commands you may run to try out different configurations provided by this flake. As of v0.5, two specialized configurations are provided: -- **Nix** - Nix language server + simple utility plugins -- **Maximal** - Variable language servers + utility and decorative plugins +- **Nix** (`packages.nix`) - Nix language server + simple utility plugins +- **Maximal** (`packages.maximal`) - Variable language servers + utility and + decorative plugins You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed. -```bash +```sh $ cachix use nvf # Optional: it'll save you CPU resources and time -$ nix run github:notashelf/nvf#nix # will run the default minimal configuration +$ nix run github:notashelf/nvf#nix # Will run the default minimal configuration ``` -Do keep in mind that this is **susceptible to garbage collection** meaning it -will be removed from your Nix store once you garbage collect. +Do keep in mind that this is **susceptible to garbage collection** meaning that +the built outputs will be removed from your Nix store once you garbage collect. ## Using Prebuilt Configs {#sec-using-prebuilt-configs} @@ -26,7 +27,12 @@ $ nix run github:notashelf/nvf#nix $ nix run github:notashelf/nvf#maximal ``` -### Available Configs {#sec-available-configs} +### Available Configurations {#sec-available-configs} + +::: {.info} + +The below configurations are provided for demonstration purposes, and are +**not** designed to be installed as is. You may #### Nix {#sec-configs-nix} @@ -34,15 +40,33 @@ $ nix run github:notashelf/nvf#maximal a set of visual and functional plugins. By running `nix run .#`, which is the default package, you will build Neovim with this config. +```bash +$ nix run github:notashelf/nvf#nix test.nix +``` + +This command will start Neovim with some opinionated plugin configurations, and +is designed specifically for Nix. the `nix` configuration lets you see how a +fully configured Neovim setup _might_ look like without downloading too many +packages or shell utilities. + #### Maximal {#sec-configs-maximal} `Maximal` is the ultimate configuration that will enable support for more commonly used language as well as additional complementary plugins. Keep in mind, however, that this will pull a lot of dependencies. -::: {.tip} +```bash +$ nix run github:notashelf/nvf#maximal -- test.nix +``` -You are _strongly_ recommended to use the binary cache if you would like to try -the Maximal configuration. +It uses the same configuration template with the [Nix](#sec-configs-nix) +configuration, but supports many more languages, and enables more utility, +companion or fun plugins. + +::: {.warning} + +Running the maximal config will download _a lot_ of packages as it is +downloading language servers, formatters, and more. If CPU time and bandwidth +are concerns, please use the default package instead. ::: diff --git a/docs/release-notes/rl-0.3.md b/docs/release-notes/rl-0.3.md index 87ae5648..089f01f7 100644 --- a/docs/release-notes/rl-0.3.md +++ b/docs/release-notes/rl-0.3.md @@ -50,9 +50,8 @@ soon. - A new section has been added for language support: `vim.languages.`. - - The options [](#opt-vim.languages.enableLSP), - [](#opt-vim.languages.enableTreesitter), etc. will enable the respective - section for all languages that have been enabled. + - The options `enableLSP` [](#opt-vim.languages.enableTreesitter), etc. will + enable the respective section for all languages that have been enabled. - All LSP languages have been moved here - `plantuml` and `markdown` have been moved here - A new section has been added for `html`. The old diff --git a/docs/release-notes/rl-0.5.md b/docs/release-notes/rl-0.5.md index 0ca02164..910c93d5 100644 --- a/docs/release-notes/rl-0.5.md +++ b/docs/release-notes/rl-0.5.md @@ -91,7 +91,7 @@ Release notes for release 0.5 - Updated indent-blankine.nvim to v3 - this comes with a few option changes, which will be migrated with `renamedOptionModule` -[jacekpoz](https://jacekpoz.pl): +[poz](https://poz.pet): - Fixed scrollOffset not being used diff --git a/docs/release-notes/rl-0.6.md b/docs/release-notes/rl-0.6.md index 1807a3e9..309d6b16 100644 --- a/docs/release-notes/rl-0.6.md +++ b/docs/release-notes/rl-0.6.md @@ -69,7 +69,7 @@ vim.api.nvim_set_keymap('n', 'a', ':lua camelToSnake()', { noremap = - Added rose-pine theme. -[jacekpoz](https://jacekpoz.pl): +[poz](https://poz.pet): - Added `vim.autocomplete.alwaysComplete`. Allows users to have the autocomplete window popup only when manually activated. diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index d62e3619..ed9d2d81 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -162,7 +162,7 @@ The changes are, in no particular order: - Add [lz.n] support and lazy-load some builtin plugins. - Add simpler helper functions for making keymaps -[jacekpoz](https://jacekpoz.pl): +[poz](https://poz.pet): [ocaml-lsp]: https://github.com/ocaml/ocaml-lsp [new-file-template.nvim]: https://github.com/otavioschwanck/new-file-template.nvim diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index e4f5a5a9..21e655d2 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -19,6 +19,15 @@ unavailable as they have been refactored out of the main none-ls repository upstream. +- `vim.useSystemClipboard` has been deprecated as a part of removing most + top-level convenience options, and should instead be configured in the new + module interface. You may set [](#opt-vim.clipboard.registers) appropriately + to configure Neovim to use the system clipboard. + +- Changed which-key group used for gitsigns from `g` to `h` to + align with the "hunks" themed mapping and avoid conflict with the new [neogit] + group. + [NotAShelf](https://github.com/notashelf): [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim @@ -27,6 +36,9 @@ [yazi.nvim]: https://github.com/mikavilpas/yazi.nvim [snacks.nvim]: https://github.com/folke/snacks.nvim [colorful-menu.nvim]: https://github.com/xzbdmw/colorful-menu.nvim +[oil.nvim]: https://github.com/stevearc/oil.nvim +[hunk.nvim]: https://github.com/julienvincent/hunk.nvim +[undotree]: https://github.com/mbbill/undotree - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. @@ -86,6 +98,18 @@ - Add [colorful-menu.nvim] to enhance the completion menus, with optional integration for blink-cmp and nvim-cmp +- Add [oil.nvim] as an alternative file explorer. It will be available under + `vim.utility.oil-nvim`. +- Add `vim.diagnostics` to interact with Neovim's diagnostics module. Available + options for `vim.diagnostic.config()` can now be customized through the + [](#opt-vim.diagnostics.config) in nvf. + +- Add `vim.clipboard` module for easily managing Neovim clipboard providers and + 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): @@ -102,6 +126,10 @@ - Add [blink.cmp] support. - Add `LazyFile` user event. - Migrate language modules from none-ls to conform/nvim-lint +- Add tsx support in conform and lint +- Moved code setting `additionalRuntimePaths` and `enableLuaLoader` out of + `luaConfigPre`'s default to prevent being overridden +- Use conform over custom autocmds for LSP format on save [diniamo](https://github.com/diniamo): @@ -194,6 +222,7 @@ Inspiration from `vim.languages.clang.dap` implementation. - Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`. - Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`. +- Fix [codecompanion-nvim] plugin: nvim-cmp error and setupOpts defaults. [nezia1](https://github.com/nezia1): @@ -270,6 +299,7 @@ [BANanaD3V](https://github.com/BANanaD3V): - `alpha` is now configured with nix. +- Add `markview-nvim` markdown renderer. [viicslen](https://github.com/viicslen): @@ -283,6 +313,12 @@ [rice-cracker-dev](https://github.com/rice-cracker-dev): - `eslint_d` now checks for configuration files to load. +- Fix an error where `eslint_d` fails to load. +- Add required files support for linters under + `vim.diagnostics.nvim-lint.linters.*.required_files`. +- Add global function `nvf_lint` under + `vim.diagnostics.nvim-lint.lint_function`. +- Deprecate `vim.scrollOffset` in favor of `vim.options.scrolloff`. [Sc3l3t0n](https://github.com/Sc3l3t0n): @@ -292,6 +328,15 @@ - Add lint (luacheck) and formatting (stylua) support for Lua. - Add lint (markdownlint-cli2) support for Markdown. +- Add catppuccin integration for Bufferline, Lspsaga. +- Add `neo-tree`, `snacks.explorer` integrations to `bufferline`. +- Add more applicable filetypes to illuminate denylist. +- Disable mini.indentscope for applicable filetypes. +- Fix fzf-lua having a hard dependency on fzf. +- Enable inlay hints support - `config.vim.lsp.inlayHints`. +- Add `neo-tree`, `snacks.picker` extensions to `lualine`. +- Add support for `vim.lsp.formatOnSave` and + `vim.lsp.mappings.toggleFormatOnSave` [tebuevd](https://github.com/tebuevd): @@ -300,3 +345,144 @@ `setupOpts.pickers.find_files` - Update default `telescope.setupOpts.pickers.find_files.find_command` to only include files (and therefore exclude directories from results) + +[ckoehler](https://github.com/ckoehler): + +[flash.nvim]: https://github.com/folke/flash.nvim +[gitlinker.nvim]: https://github.com/linrongbin16/gitlinker.nvim +[nvim-treesitter-textobjects]: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + +- Fix oil config referencing snacks +- Add [flash.nvim] plugin to `vim.utility.motion.flash-nvim` +- Fix default telescope ignore list entry for '.git/' to properly match +- Add [gitlinker.nvim] plugin to `vim.git.gitlinker-nvim` +- Add [nvim-treesitter-textobjects] plugin to `vim.treesitter.textobjects` +- Default to disabling Conform for Rust if rust-analyzer is used + - To force using Conform, set `languages.rust.format.enable = true`. + +[rrvsh](https://github.com/rrvsh): + +- Add custom snippet support to `vim.snippets.luasnip` +- Fix namespace of python-lsp-server by changing it to python3Packages + +[Noah765](https://github.com/Noah765): + +[vim-sleuth]: https://github.com/tpope/vim-sleuth + +- Add missing `flutter-tools.nvim` dependency `plenary.nvim`. +- Add necessary dependency of `flutter-tools.nvim` on lsp. +- Add the `vim.languages.dart.flutter-tools.flutterPackage` option. +- Fix the type of the `highlight` color options. +- Add [vim-sleuth] plugin under `vim.utility.sleuth`. + +[howird](https://github.com/howird): + +- Change python dap adapter name from `python` to commonly expected `debugpy`. + +[aionoid](https://github.com/aionoid): + +[avante-nvim]: https://github.com/yetone/avante.nvim + +- Fix [render-markdown.nvim] file_types option type to list, to accept merging. +- Add [avante.nvim] plugin under `vim.assistant.avante-nvim`. + +[poz](https://poz.pet): + +[everforest]: https://github.com/sainnhe/everforest + +- Fix gitsigns null-ls issue. +- Add [everforest] theme support. + +[Haskex](https://github.com/haskex): + +[Hardtime.nvim]: https://github.com/m4xshen/hardtime.nvim + +- Add Plugin [Hardtime.nvim] under `vim.binds.hardtime-nvim` with `enable` and + `setupOpts` options + +[taylrfnt](https://github.com/taylrfnt): + +[nvim-tree](https://github.com/nvim-tree/nvim-tree.lua): + +- Add missing `right_align` option for existing `renderer.icons` options. +- Add missing `render.icons` options (`hidden_placement`, + `diagnostics_placement`, and `bookmarks_placement`). + +[cramt](https://github.com/cramt): + +- Add `rubylsp` option in `vim.languages.ruby.lsp.server` to use shopify's + ruby-lsp language server + +[Haskex](https://github.com/haskex): + +[solarized-osaka.nvim]: https://github.com/craftzdog/solarized-osaka.nvim + +- Add [solarized-osaka.nvim] theme + +[img-clip.nvim]: https://github.com/hakonharnes/img-clip.nvim + +- Add [img-clip.nvim] plugin in `vim.utility.images.img-clip` with `enable` and + `setupOpts` +- Add `vim.utility.images.img-clip.enable = isMaximal` in configuration.nix + +[anil9](https://github.com/anil9): + +[clojure-lsp]: https://github.com/clojure-lsp/clojure-lsp +[conjure]: https://github.com/Olical/conjure + +- Add Clojure support under `vim.languages.clojure` using [clojure-lsp] +- Add code evaluation environment [conjure] under `vim.repl.conjure` + +[CallumGilly](https://github.com/CallumGilly): + +- 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 + +[lackac](https://github.com/lackac): + +[solarized.nvim]: https://github.com/maxmx03/solarized.nvim +[smart-splits.nvim]: https://github.com/mrjones2014/smart-splits.nvim +[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. +- Fix lualine separator options +- 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` + +[trueNAHO](https://github.com/trueNAHO): + +- `flake-parts`'s `nixpkgs-lib` input follows nvf's `nixpkgs` input to reduce + 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). + +[soliprem](https://github.com/soliprem): + +- fix broken `neorg` grammars +- remove obsolete warning in the `otter` module + +[Cool-Game-Dev](https://github.com/Cool-Game-Dev): + +[nvim-biscuits]: https://github.com/code-biscuits/nvim-biscuits + +- Add [nvim-biscuits] to show block context. Available at + `vim.utility.nvim-biscuits`. diff --git a/flake.lock b/flake.lock index 8780caec..45e2be1a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,48 +1,48 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, + "flake-compat": { + "flake": false, "locked": { - "lastModified": 1741352980, - "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", - "type": "github" + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" } }, - "flake-utils": { + "flake-parts": { "inputs": { - "systems": "systems" + "nixpkgs-lib": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "lastModified": 1753121425, + "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, "mnw": { "locked": { - "lastModified": 1742255973, - "narHash": "sha256-XfEGVKatTgEMMOVb4SNp1LYLQOSzzrFTDMVDTZFyMVE=", + "lastModified": 1748710831, + "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=", "owner": "Gerg-L", "repo": "mnw", - "rev": "b982dbd5e6d55d4438832b3567c09bc2a129649d", + "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d", "type": "github" }, "original": { @@ -51,37 +51,13 @@ "type": "github" } }, - "nil": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1741118843, - "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=", - "owner": "oxalica", - "repo": "nil", - "rev": "577d160da311cc7f5042038456a0713e9863d09e", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "nil", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1743076231, - "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", + "lastModified": 1753432016, + "narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6c5963357f3c1c840201eda129a99d455074db04", + "rev": "6027c30c8e9810896b92429f0092f624f7b1aace", "type": "github" }, "original": { @@ -91,50 +67,13 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1740877520, - "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "147dee35aab2193b174e4c0868bd80ead5ce755c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "root": { "inputs": { + "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "flake-utils": "flake-utils", "mnw": "mnw", - "nil": "nil", "nixpkgs": "nixpkgs", - "systems": "systems_2" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nil", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741055476, - "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "aefb7017d710f150970299685e8d8b549d653649", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "systems": "systems" } }, "systems": { @@ -151,21 +90,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6e716581..35820e0b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,8 +5,9 @@ self, ... } @ inputs: let - # call the extended library with `inputs` - # inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function + # Call the extended library with `inputs`. + # inputs is used to get the original standard library, and to pass inputs + # to the plugin autodiscovery function lib = import ./lib/stdlib-extended.nix {inherit inputs self;}; in flake-parts.lib.mkFlake { @@ -18,10 +19,7 @@ systems = import inputs.systems; imports = [ ./flake/templates - ./flake/apps.nix - ./flake/legacyPackages.nix - ./flake/overlays.nix ./flake/packages.nix ./flake/develop.nix ]; @@ -32,6 +30,8 @@ inherit (lib.nvim) neovimConfiguration; }; + inherit (lib.importJSON ./npins/sources.json) pins; + homeManagerModules = { nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;}; default = self.homeManagerModules.nvf; @@ -53,21 +53,33 @@ '' self.nixosModules.nvf; }; - - inherit (lib.importJSON ./npins/sources.json) pins; }; perSystem = {pkgs, ...}: { - # 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; + # Provides the default formatter for 'nix fmt', which will format the + # entire tree with Alejandra. The wrapper script is necessary due to + # changes to the behaviour of Nix, which now encourages wrappers for + # tree-wide formatting. + formatter = pkgs.writeShellApplication { + name = "nix3-fmt-wrapper"; - # Check if codebase is properly formatted. - # This can be initiated with `nix build .#checks..nix-fmt` - # or with `nix flake check` + runtimeInputs = [ + pkgs.alejandra + pkgs.fd + ]; + + text = '' + # Find Nix files in the tree and format them with Alejandra + fd "$@" -t f -e nix -x alejandra -q '{}' + ''; + }; + + # Provides checks to be built an ran on 'nix flake check'. They can also + # be built individually with 'nix build' as described below. checks = { + # Check if codebase is properly formatted. + # This can be initiated with `nix build .#checks..nix-fmt` + # or with `nix flake check` nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} '' alejandra --check ${self} < /dev/null | tee $out ''; @@ -75,22 +87,23 @@ }; }; - # Flake inputs inputs = { + systems.url = "github:nix-systems/default"; + ## Basic Inputs nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - flake-utils.url = "github:numtide/flake-utils"; - systems.url = "github:nix-systems/default"; + + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + + flake-compat = { + url = "git+https://git.lix.systems/lix-project/flake-compat.git"; + flake = false; + }; # Alternate neovim-wrapper mnw.url = "github:Gerg-L/mnw"; - - # Language servers (use master instead of nixpkgs) - nil = { - url = "github:oxalica/nil"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; - }; }; } diff --git a/flake/develop.nix b/flake/develop.nix index 71c13688..aae9d92f 100644 --- a/flake/develop.nix +++ b/flake/develop.nix @@ -3,6 +3,7 @@ pkgs, config, self', + inputs', ... }: { devShells = { diff --git a/flake/legacyPackages.nix b/flake/legacyPackages.nix deleted file mode 100644 index 33aee0e3..00000000 --- a/flake/legacyPackages.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - inputs, - self, - ... -}: { - perSystem = { - system, - inputs', - ... - }: { - legacyPackages = import inputs.nixpkgs { - inherit system; - overlays = [ - inputs.self.overlays.default - - (final: prev: { - # Build nil from source to get most recent - # features as they are added. - nil = inputs'.nil.packages.default; - blink-cmp = let - pin = self.pins.blink-cmp; - in - final.callPackage ./legacyPackages/blink-cmp.nix { - inherit (pin) version; - src = prev.fetchFromGitHub { - inherit (pin.repository) owner repo; - rev = pin.revision; - sha256 = pin.hash; - }; - }; - }) - ]; - }; - }; -} diff --git a/flake/legacyPackages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix deleted file mode 100644 index 8d734719..00000000 --- a/flake/legacyPackages/blink-cmp.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - stdenv, - rustPlatform, - vimUtils, - gitMinimal, - src, - version, -}: let - blink-fuzzy-lib = rustPlatform.buildRustPackage { - pname = "blink-fuzzy-lib"; - inherit version src; - - # TODO: remove this if plugin stops using nightly rust - env.RUSTC_BOOTSTRAP = true; - - useFetchCargoVendor = true; - cargoHash = "sha256-F1wh/TjYoiIbDY3J/prVF367MKk3vwM7LqOpRobOs7I="; - - nativeBuildInputs = [gitMinimal]; - }; -in - vimUtils.buildVimPlugin { - pname = "blink-cmp"; - inherit version src; - - # blink references a repro.lua which is placed outside the lua/ directory - doCheck = false; - preInstall = let - ext = stdenv.hostPlatform.extensions.sharedLibrary; - in '' - mkdir -p target/release - ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext} - ''; - - # Module for reproducing issues - nvimSkipModules = ["repro"]; - } diff --git a/flake/overlays.nix b/flake/overlays.nix deleted file mode 100644 index 5d0ff6e8..00000000 --- a/flake/overlays.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - inherit (lib.nvim) neovimConfiguration; - - buildPkg = pkgs: modules: (neovimConfiguration {inherit pkgs modules;}).neovim; - - nixConfig = import ../configuration.nix false; - maximalConfig = import ../configuration.nix true; -in { - flake.overlays.default = final: _prev: { - inherit neovimConfiguration; - neovim-nix = buildPkg final [nixConfig]; - neovim-maximal = buildPkg final [maximalConfig]; - devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}]; - }; -} diff --git a/flake/packages.nix b/flake/packages.nix index 7abe5ec0..7d39afcb 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -1,69 +1,122 @@ -{inputs, ...}: { +{ + inputs, + self, + ... +} @ args: { perSystem = { config, pkgs, lib, ... }: let + inherit (lib.customisation) makeScope; + inherit (lib.attrsets) isDerivation isAttrs concatMapAttrs; + inherit (lib.strings) concatStringsSep; + inherit (lib.filesystem) packagesFromDirectoryRecursive; + + # Entrypoint for nvf documentation and relevant packages. docs = import ../docs {inherit pkgs inputs lib;}; + + # Helper function for creating demo configurations for nvf + # TODO: make this more generic. + buildPkg = maximal: + (args.config.flake.lib.nvim.neovimConfiguration { + inherit pkgs; + modules = [(import ../configuration.nix maximal)]; + }).neovim; + + # This constructs a by-name overlay similar to the one found in Nixpkgs. + # The goal is to automatically discover and packages found in pkgs/by-name + # as long as they have a 'package.nix' in the package directory. We also + # pass 'inputs' and 'pins' to all packages in the 'callPackage' scope, therefore + # they are always available in the relevant 'package.nix' files. + # --- + # The logic is borrowed from drupol/pkgs-by-name-for-flake-parts, available + # under the MIT license. + flattenPkgs = separator: path: value: + if isDerivation value + then { + ${concatStringsSep separator path} = value; + } + else if isAttrs value + then concatMapAttrs (name: flattenPkgs separator (path ++ [name])) value + else + # Ignore the functions which makeScope returns + {}; + + inputsScope = makeScope pkgs.newScope (_: { + inherit inputs; + inherit (self) pins; + }); + + scopeFromDirectory = directory: + packagesFromDirectoryRecursive { + inherit directory; + inherit (inputsScope) newScope callPackage; + }; + + legacyPackages = scopeFromDirectory ./pkgs/by-name; in { - packages = { - inherit (docs.manual) htmlOpenTool; - # Documentation - docs = docs.manual.html; - docs-html = docs.manual.html; - docs-manpages = docs.manPages; - docs-json = docs.options.json; - docs-linkcheck = let - site = config.packages.docs; - in - pkgs.testers.lycheeLinkCheck { - inherit site; + packages = + (flattenPkgs "/" [] legacyPackages) + // { + inherit (docs.manual) htmlOpenTool; - remap = { - "https://notashelf.github.io/nvf/" = site; + # Documentation + docs = docs.manual.html; + docs-html = docs.manual.html; + docs-manpages = docs.manPages; + docs-json = docs.options.json; + docs-linkcheck = let + site = config.packages.docs; + in + pkgs.testers.lycheeLinkCheck { + inherit site; + + remap = { + "https://notashelf.github.io/nvf/" = site; + }; + + extraConfig = { + exclude = []; + include_mail = true; + include_verbatim = true; + }; }; - extraConfig = { - exclude = []; - include_mail = true; - include_verbatim = true; - }; - }; + # Helper utility for building the HTML manual and opening it in the + # browser with $BROWSER or using xdg-open as a fallback tool. + # Adapted from Home-Manager, available under the MIT license. + docs-html-wrapped = let + xdg-open = lib.getExe' pkgs.xdg-utils "xdg-open"; + docs-html = docs.manual.html + /share/doc/nvf; + in + pkgs.writeShellScriptBin "docs-html-wrapped" '' + set -euo pipefail - # Helper utility for building the HTML manual and opening it in the - # browser with $BROWSER or using xdg-open as a fallback tool. - # Adapted from Home-Manager, available under the MIT license. - docs-html-wrapped = let - xdg-open = lib.getExe' pkgs.xdg-utils "xdg-open"; - docs-html = docs.manual.html + /share/doc/nvf; - in - pkgs.writeShellScriptBin "docs-html-wrapped" '' - set -euo pipefail + if [[ ! -v BROWSER || -z $BROWSER ]]; then + for candidate in xdg-open open w3m; do + BROWSER="$(type -P $candidate || true)" + if [[ -x $BROWSER ]]; then + break; + fi + done + fi - if [[ ! -v BROWSER || -z $BROWSER ]]; then - for candidate in xdg-open open w3m; do - BROWSER="$(type -P $candidate || true)" - if [[ -x $BROWSER ]]; then - break; - fi - done - fi + if [[ ! -v BROWSER || -z $BROWSER ]]; then + echo "$0: unable to start a web browser; please set \$BROWSER" + echo "$0: Trying xdg-open as a fallback" + ${xdg-open} ${docs-html}/index.xhtml + else + echo "\$BROWSER is set. Attempting to open manual" + exec "$BROWSER" "${docs-html}/index.xhtml" + fi + ''; - if [[ ! -v BROWSER || -z $BROWSER ]]; then - echo "$0: unable to start a web browser; please set \$BROWSER" - echo "$0: Trying xdg-open as a fallback" - ${xdg-open} ${docs-html}/index.xhtml - else - echo "\$BROWSER is set. Attempting to open manual" - exec "$BROWSER" "${docs-html}/index.xhtml" - fi - ''; - - # Exposed neovim configurations - nix = config.legacyPackages.neovim-nix; - maximal = config.legacyPackages.neovim-maximal; - default = config.legacyPackages.neovim-nix; - }; + # Exposed neovim configurations + nix = buildPkg false; + maximal = buildPkg true; + default = config.packages.nix; + }; }; } diff --git a/flake/pkgs/by-name/avante-nvim/package.nix b/flake/pkgs/by-name/avante-nvim/package.nix new file mode 100644 index 00000000..61ab21cc --- /dev/null +++ b/flake/pkgs/by-name/avante-nvim/package.nix @@ -0,0 +1,70 @@ +{ + pins, + openssl, + pkg-config, + rustPlatform, + stdenv, + vimUtils, + makeWrapper, + pkgs, + ... +}: let + # From npins + pin = pins.avante-nvim; + version = pin.branch; + src = pkgs.fetchFromGitHub { + inherit (pin.repository) owner repo; + rev = pin.revision; + sha256 = pin.hash; + }; + + avante-nvim-lib = rustPlatform.buildRustPackage { + pname = "avante-nvim-lib"; + inherit version src; + + cargoHash = "sha256-8mBpzndz34RrmhJYezd4hLrJyhVL4S4IHK3plaue1k8="; + + nativeBuildInputs = [ + pkg-config + makeWrapper + pkgs.perl + ]; + + buildInputs = [ + openssl + ]; + + buildFeatures = ["luajit"]; + + checkFlags = [ + # Disabled because they access the network. + "--skip=test_hf" + "--skip=test_public_url" + "--skip=test_roundtrip" + "--skip=test_fetch_md" + ]; + }; +in + vimUtils.buildVimPlugin { + pname = "avante-nvim"; + inherit version src; + + doCheck = false; + + postInstall = let + ext = stdenv.hostPlatform.extensions.sharedLibrary; + in '' + mkdir -p $out/build + for lib in "avante_repo_map" "avante_templates" "avante_tokenizers" "avante_html2md"; do + ln -s ${avante-nvim-lib}/lib/lib$lib${ext} $out/build/$lib${ext} + done + ''; + + nvimSkipModules = [ + # Requires setup with corresponding provider + "avante.providers.azure" + "avante.providers.copilot" + "avante.providers.vertex_claude" + "avante.providers.ollama" + ]; + } diff --git a/flake/pkgs/by-name/blink-cmp/package.nix b/flake/pkgs/by-name/blink-cmp/package.nix new file mode 100644 index 00000000..5dba17a6 --- /dev/null +++ b/flake/pkgs/by-name/blink-cmp/package.nix @@ -0,0 +1,39 @@ +{ + rustPlatform, + fetchFromGitHub, + writeShellScriptBin, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "blink-cmp"; + version = "1.6.0"; + + src = fetchFromGitHub { + owner = "Saghen"; + repo = "blink.cmp"; + tag = "v${finalAttrs.version}"; + hash = "sha256-IHRYgKcYP+JDGu8Vtawgzlhq25vpROFqb8KmpfVMwCk="; + }; + + forceShare = [ + "man" + "info" + ]; + + postInstall = '' + cp -r {lua,plugin} "$out" + + mkdir -p "$out/doc" + cp 'doc/'*'.txt' "$out/doc/" + + mkdir -p "$out/target" + mv "$out/lib" "$out/target/release" + ''; + + cargoHash = "sha256-QsVCugYWRri4qu64wHnbJQZBhy4tQrr+gCYbXtRBlqE="; + + nativeBuildInputs = [ + (writeShellScriptBin "git" "exit 1") + ]; + + env.RUSTC_BOOTSTRAP = true; +}) diff --git a/flake/templates/standalone/flake.nix b/flake/templates/standalone/flake.nix index 79617260..1057a6d5 100644 --- a/flake/templates/standalone/flake.nix +++ b/flake/templates/standalone/flake.nix @@ -26,12 +26,22 @@ config.vim = { theme.enable = true; + lsp = { + # Enable LSP functionality globally. This is required for modules found + # in `vim.languages` to enable relevant LSPs. + enable = true; + + # You may define your own LSP configurations using `vim.lsp.servers` in + # nvf without ever needing lspconfig to do it. This will use the native + # API provided by Neovim > 0.11 + servers = {}; + }; + # Language support and automatic configuration of companion plugins. # Note that enabling, e.g., languages..diagnostics will automatically # enable top-level options such as enableLSP or enableExtraDiagnostics as # they are needed. languages = { - enableLSP = true; enableFormat = true; enableTreesitter = true; enableExtraDiagnostics = true; diff --git a/lib/default.nix b/lib/default.nix index 952278a8..c4388e82 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -4,7 +4,7 @@ lib, ... }: { - types = import ./types {inherit lib;}; + types = import ./types {inherit lib self;}; config = import ./config.nix {inherit lib;}; binds = import ./binds.nix {inherit lib;}; dag = import ./dag.nix {inherit lib;}; diff --git a/lib/languages.nix b/lib/languages.nix index a202ff14..c4074144 100644 --- a/lib/languages.nix +++ b/lib/languages.nix @@ -1,10 +1,11 @@ -# From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/booleans.nix {lib}: let inherit (builtins) isString getAttr; inherit (lib.options) mkOption; - inherit (lib.types) bool; + inherit (lib.types) listOf bool str submodule attrsOf anything either nullOr; inherit (lib.nvim.attrsets) mapListToAttrs; + inherit (lib.nvim.types) luaInline; in { + # TODO: remove diagnosticsToLua = { lang, config, @@ -32,4 +33,48 @@ in { type = bool; description = "Turn on ${desc} for enabled languages by default"; }; + + lspOptions = submodule { + freeformType = attrsOf anything; + options = { + enable = mkOption { + type = bool; + default = true; + description = "Whether to enable this LSP server."; + }; + + capabilities = mkOption { + type = nullOr (either luaInline (attrsOf anything)); + default = null; + description = "LSP capabilitiess to pass to lspconfig"; + }; + + on_attach = mkOption { + type = nullOr luaInline; + default = null; + description = "Function to execute when an LSP server attaches to a buffer"; + }; + + filetypes = mkOption { + type = nullOr (listOf str); + default = null; + description = "Filetypes to auto-attach LSP in"; + }; + + cmd = mkOption { + type = nullOr (listOf str); + default = null; + description = "Command used to start the LSP server"; + }; + + root_markers = mkOption { + type = nullOr (listOf str); + default = null; + description = '' + "root markers" used to determine the root directory of the workspace, and + the filetypes associated with this LSP server. + ''; + }; + }; + }; } diff --git a/lib/lua.nix b/lib/lua.nix index e3f94498..4106a4c2 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -2,7 +2,7 @@ {lib}: let inherit (builtins) hasAttr head throw typeOf isList isAttrs isBool isInt isString isPath isFloat toJSON; inherit (lib.attrsets) mapAttrsToList filterAttrs; - inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters concatLines; + inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters; inherit (lib.trivial) boolToString warn; in rec { # Convert a null value to lua's nil diff --git a/lib/stdlib-extended.nix b/lib/stdlib-extended.nix index a85160c3..403c7b28 100644 --- a/lib/stdlib-extended.nix +++ b/lib/stdlib-extended.nix @@ -1,10 +1,6 @@ # Convenience function that returns the given Nixpkgs standard library # extended with our functions using `lib.extend`. -{ - inputs, - self, - ... -} @ args: +{inputs, ...} @ args: inputs.nixpkgs.lib.extend (self: super: { # WARNING: New functions should not be added here, but to files # imported by `./default.nix` under their own categories. If your diff --git a/lib/types/default.nix b/lib/types/default.nix index c6239227..044a8221 100644 --- a/lib/types/default.nix +++ b/lib/types/default.nix @@ -1,6 +1,9 @@ -{lib}: let +{ + lib, + self, +}: let typesDag = import ./dag.nix {inherit lib;}; - typesPlugin = import ./plugins.nix {inherit lib;}; + typesPlugin = import ./plugins.nix {inherit lib self;}; typesLanguage = import ./languages.nix {inherit lib;}; customTypes = import ./custom.nix {inherit lib;}; in { diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index fc2bd083..4be39289 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -1,4 +1,7 @@ -{lib}: let +{ + lib, + self, +}: let inherit (lib.options) mkOption; inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair; inherit (lib.strings) hasPrefix removePrefix; @@ -12,7 +15,7 @@ mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs); # Get the names of all npins - pluginInputNames = attrNames (lib.importJSON ../../npins/sources.json).pins; + pluginInputNames = ["blink-cmp"] ++ attrNames self.pins; # You can either use the name of the plugin or a package. pluginType = nullOr ( diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 5efe2ae2..0a5733ab 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -18,7 +18,7 @@ showSignColumn = "signcolumn"; # 2025-02-07 - scrollOff = "scrolloff"; + scrollOffset = "scrolloff"; }; in { imports = concatLists [ @@ -104,6 +104,22 @@ in { their behaviour was abstract, and confusing. Please use 'vim.options' or 'vim.luaConfigRC' to replicate previous behaviour. '') + + # 2025-04-04 + (mkRemovedOptionModule ["vim" "lsp" "lsplines"] '' + lsplines module has been removed from nvf, as its functionality is now built into Neovim + under the diagnostics module. Please consider using one of 'vim.diagnostics.config' or + 'vim.luaConfigRC' to configure LSP lines for Neovim through its own diagnostics API. + '') + + # 2025-05-04 + (mkRemovedOptionModule ["vim" "useSystemClipboard"] '' + Clipboard behaviour should now be controlled through the new, more fine-grained module + interface found in 'vim.clipboard'. To replicate previous behaviour, you may either + add 'vim.opt.clipboard:append("unnamedplus")' in luaConfigRC, or preferably set it + in 'vim.clipboard.registers'. Please see the documentation for the new module for more + details, or open an issue if you are confused. + '') ] # Migrated via batchRenameOptions. Further batch renames must be below this line. diff --git a/modules/modules.nix b/modules/modules.nix index c7e198dd..1eca042a 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -33,11 +33,12 @@ "minimap" "notes" "projects" + "repl" "rich-presence" "runner" "session" "snippets" - # "spellcheck" # FIXME: see neovim/init/spellcheck.nix + "spellcheck" "statusline" "tabline" "terminal" diff --git a/modules/neovim/init/autocmds.nix b/modules/neovim/init/autocmds.nix index 5da7bc55..81580e6b 100644 --- a/modules/neovim/init/autocmds.nix +++ b/modules/neovim/init/autocmds.nix @@ -17,7 +17,7 @@ mkEnableOption "" // { default = true; - description = "Whether to enable this autocommand"; + description = "Whether to enable this autocommand."; }; event = mkOption { @@ -31,7 +31,7 @@ type = nullOr (listOf str); default = null; example = ["*.lua" "*.vim"]; - description = "The file pattern(s) that determine when the autocommand applies)."; + description = "The file pattern(s) that determine when the autocommand applies."; }; callback = mkOption { @@ -44,13 +44,16 @@ end '''' ''; - description = "The file pattern(s) that determine when the autocommand applies."; + description = "Lua function to be called when the event(s) are triggered."; }; command = mkOption { type = nullOr str; default = null; - description = "Vim command string instead of a Lua function."; + description = '' + Vim command to be executed when the event(s) are triggered. + Cannot be defined if the `callback` option is already defined. + ''; }; group = mkOption { @@ -70,7 +73,7 @@ once = mkOption { type = bool; default = false; - description = "Whether autocommand run only once."; + description = "Whether to run the autocommand only once."; }; nested = mkOption { @@ -87,7 +90,7 @@ mkEnableOption "" // { default = true; - description = "Whether to enable this autogroup"; + description = "Whether to enable this autocommand group."; }; name = mkOption { @@ -118,8 +121,8 @@ in { autocommands together. Groups allow multiple autocommands to be cleared or redefined collectively, preventing duplicate definitions. - Each autogroup consists of a name, a boolean indicating whether to clear - existing autocommands, and a list of associated autocommands. + Each autogroup consists of a name and a boolean indicating whether to clear + existing autocommands. ''; }; @@ -129,8 +132,8 @@ in { description = '' A list of Neovim autocommands to be registered. - Each entry defines an autocommand, specifying events, patterns, optional - callbacks, commands, groups, and execution settings. + Each entry defines an autocommand, specifying events, patterns, a callback or Vim + command, an optional group, a description, and execution settings. ''; }; }; diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 47bfe500..2f3934ae 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -6,11 +6,10 @@ inherit (lib.options) mkOption mkEnableOption literalMD; inherit (lib.strings) optionalString; inherit (lib.attrsets) optionalAttrs; - inherit (lib.types) enum bool str int either; + inherit (lib.types) enum bool str either; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.dag) entryAfter; inherit (lib.nvim.binds) pushDownDefault; - inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.types) luaInline; cfg = config.vim; @@ -22,24 +21,12 @@ in { description = "Hide search highlight so it doesn't stay highlighted"; }; - scrollOffset = mkOption { - type = int; - default = 8; - description = "Start scrolling this number of lines from the top or bottom of the page."; - }; - syntaxHighlighting = mkOption { type = bool; default = !config.vim.treesitter.highlight.enable; description = "Enable syntax highlighting"; }; - useSystemClipboard = mkOption { - type = bool; - default = false; - description = "Make use of the clipboard for default yank and paste operations. Don't use * and +"; - }; - lineNumberMode = mkOption { type = enum ["relative" "number" "relNumber" "none"]; default = "relNumber"; @@ -144,10 +131,6 @@ in { # to pre-set Neovim options. Fear not, though as the Lua DAG is still as powerful as it # could be. luaConfigRC.basic = entryAfter ["globalsScript"] '' - ${optionalString cfg.useSystemClipboard '' - vim.opt.clipboard:append("unnamedplus") - ''} - ${optionalString cfg.syntaxHighlighting '' vim.cmd("syntax on") ''} diff --git a/modules/neovim/init/clipboard.nix b/modules/neovim/init/clipboard.nix new file mode 100644 index 00000000..132079b4 --- /dev/null +++ b/modules/neovim/init/clipboard.nix @@ -0,0 +1,80 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str submodule; + inherit (lib.attrsets) mapAttrs mapAttrsToList filterAttrs; + cfg = config.vim.clipboard; +in { + options = { + vim = { + clipboard = { + enable = mkEnableOption '' + clipboard management for Neovim. Users may still choose to manage their + clipboard through [](#opt-vim.options) should they wish to avoid using + this module. + ''; + + registers = mkOption { + type = str; + default = ""; + example = "unnamedplus"; + description = '' + The register to be used by the Neovim clipboard. Recognized types are: + + * unnamed: Vim will use the clipboard register `"*"` for all yank, delete, + change and put operations which would normally go to the unnamed register. + + * unnamedplus: A variant of the "unnamed" flag which uses the clipboard register + `"+"` ({command}`:h quoteplus`) instead of register `"*"` for all yank, delete, + change and put operations which would normally go to the unnamed register. + + When `unnamed` and `unnamedplus` is included simultaneously as `"unnamed,unnamedplus"`, + yank and delete operations (but not put) will additionally copy the text into register `"*"`. + + Please see {command}`:h clipboard` for more details. + + ''; + }; + + providers = mkOption { + type = submodule { + options = let + clipboards = { + # name = "package name"; + wl-copy = "wl-clipboard"; + xclip = "xclip"; + xsel = "xsel"; + }; + in + mapAttrs (name: pname: { + enable = mkEnableOption name; + package = mkPackageOption pkgs pname {nullable = true;}; + }) + clipboards; + }; + default = {}; + description = '' + Clipboard providers for which packages will be added to nvf's + {option}`extraPackages`. The `package` field may be set to `null` + if related packages are already found in system packages to + potentially reduce closure sizes. + ''; + }; + }; + }; + }; + + config = mkIf cfg.enable { + vim = { + options.clipboard = cfg.registers; + extraPackages = mapAttrsToList (_: v: v.package) ( + filterAttrs (_: v: v.enable && v.package != null) cfg.providers + ); + }; + }; +} diff --git a/modules/neovim/init/default.nix b/modules/neovim/init/default.nix index ac9d29e5..30a481a1 100644 --- a/modules/neovim/init/default.nix +++ b/modules/neovim/init/default.nix @@ -2,8 +2,11 @@ imports = [ ./autocmds.nix ./basic.nix + ./clipboard.nix ./debug.nix + ./diagnostics.nix ./highlight.nix + ./lsp.nix ./spellcheck.nix ]; } diff --git a/modules/neovim/init/diagnostics.nix b/modules/neovim/init/diagnostics.nix new file mode 100644 index 00000000..27f46efc --- /dev/null +++ b/modules/neovim/init/diagnostics.nix @@ -0,0 +1,116 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) attrsOf anything oneOf bool submodule; + inherit (lib.nvim.dag) entryAfter; + inherit (lib.nvim.types) luaInline; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.diagnostics; + + # Takes a boolean, a table, or a Lua list ({key = value}). We + # would like to allow all of those types, while clearly expressing + # them in the option's type. As such, this type is what it is. + diagnosticType = oneOf [(attrsOf anything) bool luaInline]; + diagnosticsSubmodule = submodule { + # The table might need to be extended, so let's allow that case + # with a freeform type of what is supported by diagnostics opts. + freeformType = attrsOf diagnosticType; + options = { + underline = mkOption { + type = diagnosticType; + default = true; + description = "Use underline for diagnostics."; + }; + + virtual_text = mkOption { + type = diagnosticType; + default = false; + example = literalExpression '' + { + format = lib.generators.mkLuaInline ''' + function(diagnostic) + return string.format("%s (%s)", diagnostic.message, diagnostic.source) + end + '''; + } + ''; + + description = '' + Use virtual text for diagnostics. If multiple diagnostics are set for a namespace, + one prefix per diagnostic + the last diagnostic message are shown. + ''; + }; + + virtual_lines = mkOption { + type = diagnosticType; + default = false; + description = '' + Use virtual lines for diagnostics. + ''; + }; + + signs = mkOption { + type = diagnosticType; + default = false; + example = literalExpression '' + signs.text = lib.generators.mkLuaInline ''' + { + [vim.diagnostic.severity.ERROR] = "σ°…š ", + [vim.diagnostic.severity.WARN] = "σ°€ͺ ", + } + '''; + ''; + description = '' + Use signs for diagnostics. See {command}`:help diagnostic-signs`. + + :::{.note} + The code presented in that example section uses Lua expressions as object keys which + only translate well if you use `lib.generators.mkLuaInline` as in the example. + ::: + ''; + }; + + update_in_insert = mkOption { + type = bool; + default = false; + description = '' + Update diagnostics in Insert mode. If `false`, diagnostics will + be updated on InsertLeave ({command}`:help InsertLeave`). + ''; + }; + }; + }; +in { + options.vim = { + diagnostics = { + enable = mkEnableOption "diagnostics module for Neovim"; + config = mkOption { + type = diagnosticsSubmodule; + default = {}; + description = '' + Values that will be passed to `vim.diagnostic.config` after being converted + to a Lua table. Possible values for each key can be found in the help text + for `vim.diagnostics.Opts`. You may find more about the diagnostics API of + Neovim in {command}`:help diagnostic-api`. + + :::{.note} + This option is freeform. You may set values that are not present in nvf + documentation, but those values will not be fully type checked. Please + refer to the help text for `vim.diagnostic.Opts` for appropriate values. + ::: + ''; + }; + }; + }; + + config.vim = mkIf cfg.enable { + luaConfigRC.diagnostics = entryAfter ["basic"] '' + vim.diagnostic.config(${toLuaObject cfg.config}) + ''; + }; +} diff --git a/modules/neovim/init/highlight.nix b/modules/neovim/init/highlight.nix index 7e992fd1..9c6b7214 100644 --- a/modules/neovim/init/highlight.nix +++ b/modules/neovim/init/highlight.nix @@ -5,15 +5,14 @@ }: let inherit (lib.options) mkOption; inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum; - inherit (lib.strings) hasPrefix concatLines; + inherit (lib.strings) concatLines; inherit (lib.attrsets) mapAttrsToList; inherit (lib.nvim.dag) entryBetween; inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.types) hexColor; mkColorOption = target: mkOption { - type = nullOr hexColor; + type = nullOr str; default = null; example = "#ebdbb2"; description = '' diff --git a/modules/neovim/init/lsp.nix b/modules/neovim/init/lsp.nix new file mode 100644 index 00000000..b89c3fde --- /dev/null +++ b/modules/neovim/init/lsp.nix @@ -0,0 +1,93 @@ +{ + config, + lib, + ... +}: let + inherit (builtins) filter; + inherit (lib.modules) mkIf mkMerge mkDefault; + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) attrsOf; + inherit (lib.strings) concatLines; + inherit (lib.attrsets) mapAttrsToList attrNames filterAttrs; + inherit (lib.generators) mkLuaInline; + inherit (lib.nvim.languages) lspOptions; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.lsp; + + lspConfigurations = + mapAttrsToList ( + name: value: '' + vim.lsp.config["${name}"] = ${toLuaObject value} + '' + ) + cfg.servers; + + enabledServers = filterAttrs (_: u: u.enable) cfg.servers; +in { + options = { + vim.lsp = { + enable = mkEnableOption '' + global LSP functionality for Neovim. + + This option controls whether to enable LSP functionality within modules under + {option}`vim.languages`. You do not need to set this to `true` for language + servers defined in {option}`vim.lsp.servers` to take effect, since they are + enabled automatically. + ''; + + servers = mkOption { + type = attrsOf lspOptions; + default = {}; + example = '' + { + "*" = { + root_markers = [".git"]; + capabilities = { + textDocument = { + semanticTokens = { + multilineTokenSupport = true; + }; + }; + }; + }; + + "clangd" = { + filetypes = ["c"]; + }; + } + ''; + description = '' + LSP configurations that will be managed using `vim.lsp.config()` and related + utilities added in Neovim 0.11. LSPs defined here will be added to the + resulting {file}`init.lua` using `vim.lsp.config` and enabled through + `vim.lsp.enable()` API from Neovim below the configuration table. + + You may review the generated configuration by running {command}`nvf-print-config` + in a shell. Please see {command}`:help lsp-config` for more details + on the underlying API. + ''; + }; + }; + }; + + config = mkMerge [ + { + vim.lsp.servers."*" = { + capabilities = mkDefault (mkLuaInline "capabilities"); + on_attach = mkDefault (mkLuaInline "default_on_attach"); + }; + } + + (mkIf (cfg.servers != {}) { + vim.luaConfigRC.lsp-servers = entryAnywhere '' + -- Individual LSP configurations managed by nvf. + ${concatLines lspConfigurations} + + -- Enable configured LSPs explicitly + vim.lsp.enable(${toLuaObject (filter (name: name != "*") (attrNames enabledServers))}) + ''; + }) + ]; +} diff --git a/modules/neovim/init/spellcheck.nix b/modules/neovim/init/spellcheck.nix index fb0f86ea..5c593a65 100644 --- a/modules/neovim/init/spellcheck.nix +++ b/modules/neovim/init/spellcheck.nix @@ -94,6 +94,8 @@ in { Enabling this option will unconditionally set {option}`vim.spellcheck.enable` to true as vim-dirtytalk depends on spellchecking having been set up. + + Run {command}`:DirtytalkUpdate` on first use to download the spellfile. ::: ''; }; diff --git a/modules/neovim/mappings/config.nix b/modules/neovim/mappings/config.nix index 230df030..a62a6ca2 100644 --- a/modules/neovim/mappings/config.nix +++ b/modules/neovim/mappings/config.nix @@ -3,7 +3,7 @@ lib, ... }: let - inherit (lib.modules) mkIf mkMerge; + inherit (lib.modules) mkMerge; inherit (lib.trivial) pipe; inherit (lib.attrsets) mapAttrsToList; inherit (lib.lists) flatten; diff --git a/modules/plugins/assistant/avante/avante-nvim.nix b/modules/plugins/assistant/avante/avante-nvim.nix new file mode 100644 index 00000000..8dfa31fc --- /dev/null +++ b/modules/plugins/assistant/avante/avante-nvim.nix @@ -0,0 +1,341 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption literalMD; + inherit (lib.types) int str enum nullOr attrs bool; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.assistant = { + avante-nvim = { + enable = mkEnableOption "complementary Neovim plugin for avante.nvim"; + setupOpts = mkPluginSetupOption "avante-nvim" { + provider = mkOption { + type = nullOr str; + default = null; + description = "The provider used in Aider mode or in the planning phase of Cursor Planning Mode."; + }; + + providers = mkOption { + type = nullOr attrs; + default = null; + description = "Define settings for builtin and custom providers."; + example = literalMD '' + ```nix + openai = { + endpoint = "https://api.openai.com/v1"; + model = "gpt-4o"; # your desired model (or use gpt-4o, etc.) + timeout = 30000; # Timeout in milliseconds, increase this for reasoning models + extra_request_body = { + temperature = 0; + max_completion_tokens = 8192; # Increase this to include reasoning tokens (for reasoning models) + reasoning_effort = "medium"; # low|medium|high, only used for reasoning models + }; + }; + ollama = { + endpoint = "http://127.0.0.1:11434"; + timeout = 30000; # Timeout in milliseconds + extra_request_body = { + options = { + temperature = 0.75; + num_ctx = 20480; + keep_alive = "5m"; + }; + }; + }; + groq = { + __inherited_from = "openai"; + api_key_name = "GROQ_API_KEY"; + endpoint = "https://api.groq.com/openai/v1/"; + model = "llama-3.3-70b-versatile"; + disable_tools = true; + extra_request_body = { + temperature = 1; + max_tokens = 32768; # remember to increase this value, otherwise it will stop generating halfway + }; + }; + ``` + ''; + }; + + auto_suggestions_provider = mkOption { + type = str; + default = "claude"; + description = '' + Since auto-suggestions are a high-frequency operation and therefore expensive, + currently designating it as `copilot` provider is dangerous because: + https://github.com/yetone/avante.nvim/issues/1048 + Of course, you can reduce the request frequency by increasing `suggestion.debounce`. + ''; + }; + + cursor_applying_provider = mkOption { + type = nullOr str; + default = null; + description = '' + The provider used in the applying phase of Cursor Planning Mode, defaults to `nil`, + Config.provider will be used as the provider for the applying phase when `nil`. + ''; + }; + + dual_boost = { + enabled = mkEnableOption "dual_boost mode."; + + first_provider = mkOption { + type = str; + default = "openai"; + description = "The first provider to generate response."; + }; + + second_provider = mkOption { + type = str; + default = "claude"; + description = "The second provider to generate response."; + }; + + prompt = mkOption { + type = str; + default = '' + Based on the two reference outputs below, generate a response that incorporates + elements from both but reflects your own judgment and unique perspective. + Do not provide any explanation, just give the response directly. Reference Output 1: + [{{provider1_output}}], Reference Output 2: [{{provider2_output}}''; + description = "The prompt to generate response based on the two reference outputs."; + }; + + timeout = mkOption { + type = int; + default = 60000; + description = "Timeout in milliseconds."; + }; + }; + + behaviour = { + auto_suggestions = + mkEnableOption "auto suggestions."; + + auto_set_highlight_group = + mkEnableOption "automatically set the highlight group for the current line." + // { + default = true; + }; + + auto_set_keymaps = + mkEnableOption "automatically set the keymap for the current line." + // { + default = true; + }; + + auto_apply_diff_after_generation = + mkEnableOption "automatically apply diff after LLM response."; + + support_paste_from_clipboard = mkEnableOption '' + pasting image from clipboard. + This will be determined automatically based whether img-clip is available or not. + ''; + + minimize_diff = + mkEnableOption "remove unchanged lines when applying a code block." + // { + default = true; + }; + + enable_token_counting = + mkEnableOption "token counting." + // { + default = true; + }; + + enable_cursor_planning_mode = + mkEnableOption "Cursor Planning Mode."; + + enable_claude_text_editor_tool_mode = + mkEnableOption "Claude Text Editor Tool Mode."; + }; + + mappings = { + diff = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for diff."; + }; + + suggestion = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for suggestion actions."; + }; + + jump = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for jump actions."; + }; + + submit = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for submit actions."; + }; + + cancel = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for cancel actions."; + }; + + sidebar = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps for sidebar actions."; + }; + }; + + hints.enabled = + mkEnableOption "" + // { + default = true; + description = '' + Whether to enable hints. + ''; + }; + + windows = { + position = mkOption { + type = enum ["right" "left" "top" "bottom"]; + default = "right"; + description = "The position of the sidebar."; + }; + + wrap = + mkEnableOption "" + // { + default = true; + description = '' + similar to vim.o.wrap. + ''; + }; + + width = mkOption { + type = int; + default = 30; + description = "Default % based on available width."; + }; + + sidebar_header = { + enabled = mkOption { + type = bool; + default = true; + description = "enable/disable the header."; + }; + + align = mkOption { + type = enum ["right" "center" "left"]; + default = "center"; + description = "Position of the title."; + }; + + rounded = mkOption { + type = bool; + default = true; + description = "Enable rounded sidebar header"; + }; + }; + + input = { + prefix = mkOption { + type = str; + default = "> "; + description = "The prefix used on the user input."; + }; + + height = mkOption { + type = int; + default = 8; + description = '' + Height of the input window in vertical layout. + ''; + }; + }; + + edit = { + border = mkOption { + type = str; + default = "rounded"; + description = "The border type on the edit window."; + }; + + start_insert = mkOption { + type = bool; + default = true; + description = '' + Start insert mode when opening the edit window. + ''; + }; + }; + + ask = { + floating = mkOption { + type = bool; + default = false; + description = '' + Open the 'AvanteAsk' prompt in a floating window. + ''; + }; + + start_insert = mkOption { + type = bool; + default = true; + description = '' + Start insert mode when opening the ask window. + ''; + }; + + border = mkOption { + type = str; + default = "rounded"; + description = "The border type on the ask window."; + }; + + focus_on_apply = mkOption { + type = enum ["ours" "theirs"]; + default = "ours"; + description = "Which diff to focus after applying."; + }; + }; + }; + + diff = { + autojump = + mkEnableOption "" + // { + default = true; + description = "Automatically jumps to the next change."; + }; + + override_timeoutlen = mkOption { + type = int; + default = 500; + example = -1; + description = '' + Override the 'timeoutlen' setting while hovering over a diff (see {command}`:help timeoutlen`). + Helps to avoid entering operator-pending mode with diff mappings starting with `c`. + Disable by setting to -1. + ''; + }; + }; + + suggestion = { + debounce = mkOption { + type = int; + default = 600; + description = "Suggestion debounce in milliseconds."; + }; + + throttle = mkOption { + type = int; + default = 600; + description = "Suggestion throttle in milliseconds."; + }; + }; + }; + }; + }; +} diff --git a/modules/plugins/assistant/avante/config.nix b/modules/plugins/assistant/avante/config.nix new file mode 100644 index 00000000..e140de89 --- /dev/null +++ b/modules/plugins/assistant/avante/config.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.lists) optionals; + + cfg = config.vim.assistant.avante-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = + [ + "nvim-treesitter" + "plenary-nvim" + "dressing-nvim" + "nui-nvim" + ] + ++ (optionals config.vim.mini.pick.enable ["mini-pick"]) + ++ (optionals config.vim.telescope.enable ["telescope"]) + ++ (optionals config.vim.autocomplete.nvim-cmp.enable ["nvim-cmp"]) + ++ (optionals config.vim.fzf-lua.enable ["fzf-lua"]) + ++ (optionals config.vim.visuals.nvim-web-devicons.enable ["nvim-web-devicons"]) + ++ (optionals config.vim.utility.images.img-clip.enable ["img-clip"]); + + lazy.plugins = { + avante-nvim = { + package = "avante-nvim"; + setupModule = "avante"; + inherit (cfg) setupOpts; + event = ["DeferredUIEnter"]; + }; + }; + + treesitter.enable = true; + + languages.markdown.extensions.render-markdown-nvim.setupOpts.file_types = lib.mkAfter ["Avante"]; + }; + }; +} diff --git a/modules/plugins/assistant/avante/default.nix b/modules/plugins/assistant/avante/default.nix new file mode 100644 index 00000000..c8ab1a1c --- /dev/null +++ b/modules/plugins/assistant/avante/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./avante-nvim.nix + ]; +} diff --git a/modules/plugins/assistant/chatgpt/config.nix b/modules/plugins/assistant/chatgpt/config.nix index 95a36acf..b1066e5a 100644 --- a/modules/plugins/assistant/chatgpt/config.nix +++ b/modules/plugins/assistant/chatgpt/config.nix @@ -30,7 +30,16 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["chatgpt-nvim"]; + startPlugins = [ + "chatgpt-nvim" + + # Dependencies + "nui-nvim" + "plenary-nvim" + ]; + + # ChatGPT.nvim explicitly depends on Telescope. + telescope.enable = true; pluginRC.chagpt = entryAnywhere '' require("chatgpt").setup(${toLuaObject cfg.setupOpts}) diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index 9ebe30c0..8e5ed4cc 100644 --- a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -9,7 +9,14 @@ in { setupOpts = mkPluginSetupOption "codecompanion-nvim" { opts = { - send_code = mkEnableOption "code from being sent to the LLM."; + send_code = + mkEnableOption "" + // { + default = true; + description = '' + Whether to enable code being sent to the LLM. + ''; + }; log_level = mkOption { type = enum ["DEBUG" "INFO" "ERROR" "TRACE"]; @@ -30,7 +37,10 @@ in { mkEnableOption "" // { default = true; - description = "a diff view to see the changes made by the LLM."; + description = '' + Whether to enable a diff view + to see the changes made by the LLM. + ''; }; close_chat_at = mkOption { @@ -64,7 +74,12 @@ in { }; chat = { - auto_scroll = mkEnableOption "automatic page scrolling."; + auto_scroll = + mkEnableOption "" + // { + default = true; + description = "Whether to enable automatic page scrolling."; + }; show_settings = mkEnableOption '' LLM settings to appear at the top of the chat buffer. @@ -85,14 +100,18 @@ in { mkEnableOption "" // { default = true; - description = "references in the chat buffer."; + description = '' + Whether to enable references in the chat buffer. + ''; }; show_token_count = mkEnableOption "" // { default = true; - description = "the token count for each response."; + description = '' + Whether to enable the token count for each response. + ''; }; intro_message = mkOption { @@ -155,7 +174,10 @@ in { mkEnableOption "" // { default = true; - description = "showing default actions in the action palette."; + description = '' + Whether to enable showing default + actions in the action palette. + ''; }; show_default_prompt_library = @@ -163,7 +185,8 @@ in { // { default = true; description = '' - showing default prompt library in the action palette. + Whether to enable showing default + prompt library in the action palette. ''; }; }; diff --git a/modules/plugins/assistant/codecompanion/config.nix b/modules/plugins/assistant/codecompanion/config.nix index 6b427d28..fa863b74 100644 --- a/modules/plugins/assistant/codecompanion/config.nix +++ b/modules/plugins/assistant/codecompanion/config.nix @@ -21,7 +21,22 @@ in { }; }; - treesitter.enable = true; + treesitter = { + enable = true; + + # Codecompanion depends on the YAML grammar being added. Below is + # an easy way of adding an user-configurable grammar package exposed + # by the YAML language module *without* enabling the whole YAML language + # module. The package is defined even when the module is disabled. + grammars = [ + config.vim.languages.yaml.treesitter.package + ]; + }; + + autocomplete.nvim-cmp = { + sources = {codecompanion-nvim = "[codecompanion]";}; + sourcePlugins = ["codecompanion-nvim"]; + }; }; }; } diff --git a/modules/plugins/assistant/copilot/config.nix b/modules/plugins/assistant/copilot/config.nix index 525fe3bd..39b0d0ff 100644 --- a/modules/plugins/assistant/copilot/config.nix +++ b/modules/plugins/assistant/copilot/config.nix @@ -5,7 +5,6 @@ }: let inherit (builtins) toJSON; inherit (lib.modules) mkIf; - inherit (lib.strings) optionalString; cfg = config.vim.assistant.copilot; diff --git a/modules/plugins/assistant/default.nix b/modules/plugins/assistant/default.nix index 697d54f6..a4da583a 100644 --- a/modules/plugins/assistant/default.nix +++ b/modules/plugins/assistant/default.nix @@ -3,5 +3,7 @@ ./chatgpt ./copilot ./codecompanion + ./supermaven-nvim + ./avante ]; } diff --git a/modules/plugins/assistant/supermaven-nvim/config.nix b/modules/plugins/assistant/supermaven-nvim/config.nix new file mode 100644 index 00000000..55d401a5 --- /dev/null +++ b/modules/plugins/assistant/supermaven-nvim/config.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + ... +}: let + cfg = config.vim.assistant.supermaven-nvim; +in { + config = lib.mkIf cfg.enable { + vim.lazy.plugins = { + supermaven-nvim = { + package = "supermaven-nvim"; + setupModule = "supermaven-nvim"; + inherit (cfg) setupOpts; + }; + }; + }; +} diff --git a/modules/plugins/assistant/supermaven-nvim/default.nix b/modules/plugins/assistant/supermaven-nvim/default.nix new file mode 100644 index 00000000..0da957cb --- /dev/null +++ b/modules/plugins/assistant/supermaven-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./supermaven-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix b/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix new file mode 100644 index 00000000..0d1efd19 --- /dev/null +++ b/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix @@ -0,0 +1,94 @@ +{lib, ...}: let + inherit + (lib.types) + nullOr + str + bool + attrsOf + ints + enum + ; + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; +in { + options.vim.assistant.supermaven-nvim = { + enable = mkEnableOption "Supermaven AI assistant"; + + setupOpts = mkPluginSetupOption "Supermaven" { + keymaps = { + accept_suggestion = mkOption { + type = nullOr str; + default = null; + example = ""; + description = "The key to accept a suggestion"; + }; + clear_suggestion = mkOption { + type = nullOr str; + default = null; + example = ""; + description = "The key to clear a suggestion"; + }; + accept_word = mkOption { + type = nullOr str; + default = null; + example = ""; + description = "The key to accept a word"; + }; + }; + ignore_file = mkOption { + type = nullOr (attrsOf bool); + default = null; + example = { + markdown = true; + }; + description = "List of fileto ignore"; + }; + color = { + suggestion_color = mkOption { + type = nullOr str; + default = null; + example = "#ffffff"; + description = "The hex color of the suggestion"; + }; + cterm = mkOption { + type = nullOr ints.u8; + default = null; + example = 244; + description = "The cterm color of the suggestion"; + }; + }; + log_level = mkOption { + type = nullOr (enum [ + "off" + "trace" + "debug" + "info" + "warn" + "error" + ]); + default = null; + example = "info"; + description = "The log level. Set to `\"off\"` to disable completely"; + }; + disable_inline_completion = mkOption { + type = nullOr bool; + default = null; + description = "Disable inline completion for use with cmp"; + }; + disable_keymaps = mkOption { + type = nullOr bool; + default = null; + description = "Disable built-in keymaps for more manual control"; + }; + condition = mkOption { + type = nullOr luaInline; + default = null; + description = '' + Condition function to check for stopping supermaven. + + A returned `true` means to stop supermaven + ''; + }; + }; + }; +} diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index 65b88815..d07c777e 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -1,7 +1,6 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalMD; inherit (lib.types) bool listOf str either attrsOf submodule enum anything int nullOr; - inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) mkPluginSetupOption luaInline pluginType; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.config) mkBool; @@ -10,7 +9,7 @@ freeformType = attrsOf (listOf (either str luaInline)); options = { preset = mkOption { - type = enum ["default" "none" "super-tab" "enter"]; + type = enum ["default" "none" "super-tab" "enter" "cmdline"]; default = "none"; description = "keymap presets"; }; @@ -48,7 +47,7 @@ in { cmdline = { sources = mkOption { type = nullOr (listOf str); - default = []; + default = null; description = "List of sources to enable for cmdline. Null means use default source list."; }; diff --git a/modules/plugins/completion/blink-cmp/config.nix b/modules/plugins/completion/blink-cmp/config.nix index 9302332e..2efd8d79 100644 --- a/modules/plugins/completion/blink-cmp/config.nix +++ b/modules/plugins/completion/blink-cmp/config.nix @@ -122,6 +122,21 @@ in { "fallback" ]; }; + + # cmdline is not enabled by default, we're just providing keymaps in + # case the user enables them + cmdline.keymap = { + ${mappings.complete} = ["show" "fallback"]; + ${mappings.close} = ["hide" "fallback"]; + ${mappings.scrollDocsUp} = ["scroll_documentation_up" "fallback"]; + ${mappings.scrollDocsDown} = ["scroll_documentation_down" "fallback"]; + # NOTE: mappings.confirm is skipped because our default, would + # lead to accidental triggers of blink.accept instead of executing + # the cmd + + ${mappings.next} = ["select_next" "show" "fallback"]; + ${mappings.previous} = ["select_prev" "fallback"]; + }; }; }; }; diff --git a/modules/plugins/completion/nvim-cmp/config.nix b/modules/plugins/completion/nvim-cmp/config.nix index 749ebb7c..9cceb0b7 100644 --- a/modules/plugins/completion/nvim-cmp/config.nix +++ b/modules/plugins/completion/nvim-cmp/config.nix @@ -3,11 +3,10 @@ config, ... }: let - inherit (lib.modules) mkIf mkMerge; + inherit (lib.modules) mkIf; inherit (lib.strings) optionalString; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.attrsets) mapListToAttrs; inherit (builtins) attrNames typeOf tryEval concatStringsSep; borders = config.vim.ui.borders.plugins.nvim-cmp; diff --git a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix index 2c8c77d3..4391a144 100644 --- a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix +++ b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix @@ -3,7 +3,7 @@ config, ... }: let - inherit (lib.options) mkEnableOption mkOption literalExpression literalMD; + inherit (lib.options) mkEnableOption mkOption literalMD; inherit (lib.types) str attrsOf nullOr either listOf; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.binds) mkMappingOption; diff --git a/modules/plugins/dashboard/alpha/config.nix b/modules/plugins/dashboard/alpha/config.nix index 804189b9..7a29bd0b 100644 --- a/modules/plugins/dashboard/alpha/config.nix +++ b/modules/plugins/dashboard/alpha/config.nix @@ -4,7 +4,6 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.dashboard.alpha; diff --git a/modules/plugins/dashboard/startify/startify.nix b/modules/plugins/dashboard/startify/startify.nix index c33cfa01..dcc1ce16 100644 --- a/modules/plugins/dashboard/startify/startify.nix +++ b/modules/plugins/dashboard/startify/startify.nix @@ -3,46 +3,47 @@ inherit (lib.types) listOf attrs bool enum str oneOf int; in { options.vim.dashboard.startify = { - enable = mkEnableOption "dashboard via vim-startify"; + enable = mkEnableOption "fancy start screen for Vim [vim-startify]"; bookmarks = mkOption { - default = []; - description = ''List of book marks to disaply on start page''; type = listOf attrs; + default = []; example = {"c" = "~/.vimrc";}; + description = "List of book marks to display on start page"; }; changeToDir = mkOption { - default = true; - description = "Should vim change to the directory of the file you open"; type = bool; + default = true; + description = "Whether Vim should change to the directory of the file you open"; }; changeToVCRoot = mkOption { - default = false; - description = "Should vim change to the version control root when opening a file"; type = bool; + default = false; + description = "Whether Vim should change to the version control root when opening a file"; }; changeDirCmd = mkOption { - default = "lcd"; - description = "Command to change the current window with. Can be cd, lcd or tcd"; type = enum ["cd" "lcd" "tcd"]; + default = "lcd"; + description = "Command to change the current window with."; }; customHeader = mkOption { + type = listOf str; default = []; description = "Text to place in the header"; - type = listOf str; }; customFooter = mkOption { + type = listOf str; default = []; description = "Text to place in the footer"; - type = listOf str; }; lists = mkOption { + type = listOf attrs; default = [ { type = "files"; @@ -66,121 +67,136 @@ in { } ]; description = "Specify the lists and in what order they are displayed on startify."; - type = listOf attrs; }; skipList = mkOption { + type = listOf str; default = []; description = "List of regex patterns to exclude from MRU lists"; - type = listOf str; }; updateOldFiles = mkOption { + type = bool; + default = false; description = "Set if you want startify to always update and not just when neovim closes"; - type = bool; }; sessionAutoload = mkOption { - default = false; - description = "Make startify auto load Session.vim files from the current directory"; type = bool; + + default = false; + description = "Make vim-startify auto load Session.vim files from the current directory"; }; commands = mkOption { + type = listOf (oneOf [str attrs (listOf str)]); default = []; description = "Commands that are presented to the user on startify page"; - type = listOf (oneOf [str attrs (listOf str)]); }; filesNumber = mkOption { + type = int; default = 10; description = "How many files to list"; - type = int; }; customIndices = mkOption { + type = listOf str; default = []; description = "Specify a list of default characters to use instead of numbers"; - type = listOf str; }; disableOnStartup = mkOption { - default = false; - description = "Prevent startify from opening on startup but can be called with :Startify"; type = bool; + default = false; + description = '' + Whether vim-startify should be disabled on startup. + + This will prevent startify from opening on startup, but it can still + be called with `:Startify` + ''; }; unsafe = mkOption { - default = false; - description = "Turns on unsafe mode for Startify. Stops resolving links, checking files are readable and filtering bookmark list"; type = bool; + default = false; + description = '' + Whether to turn on unsafe mode for Startify. + + While enabld, vim-startify will stops resolving links, checking files + are readable and filtering bookmark list + ''; }; paddingLeft = mkOption { + type = int; default = 3; description = "Number of spaces used for left padding."; - type = int; }; useEnv = mkOption { + type = bool; default = false; description = "Show environment variables in path if name is shorter than value"; - type = bool; }; sessionBeforeSave = mkOption { + type = listOf str; default = []; description = "Commands to run before saving a session"; - type = listOf str; }; sessionPersistence = mkOption { + type = bool; default = false; description = "Persist session before leaving vim or switching session"; - type = bool; }; sessionDeleteBuffers = mkOption { + type = bool; default = true; description = "Delete all buffers when loading or closing a session"; - type = bool; }; sessionDir = mkOption { + type = str; default = "~/.vim/session"; description = "Directory to save and load sessions from"; - type = str; }; skipListServer = mkOption { + type = listOf str; default = []; description = "List of vim servers to not load startify for"; - type = listOf str; }; sessionRemoveLines = mkOption { + type = listOf str; default = []; description = "Patterns to remove from session files"; - type = listOf str; }; sessionSavevars = mkOption { + type = listOf str; default = []; description = "List of variables to save into a session file."; - type = listOf str; }; sessionSavecmds = mkOption { + type = listOf str; default = []; description = "List of commands to run when loading a session."; - type = listOf str; }; sessionSort = mkOption { - default = false; - description = "Set if you want items sorted by date rather than alphabetically"; type = bool; + default = false; + example = true; + description = '' + While true, sessions will be sorted by date rather than alphabetically. + + ''; }; }; } diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix index b284270b..488bd70f 100644 --- a/modules/plugins/diagnostics/nvim-lint/config.nix +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -28,6 +28,8 @@ in { end end end + + nvf_lint = ${toLuaObject cfg.lint_function} ''; }; }) @@ -38,8 +40,8 @@ in { { event = ["BufWritePost"]; callback = mkLuaInline '' - function() - require("lint").try_lint() + function(args) + nvf_lint(args.buf) end ''; } diff --git a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix index 20f14f0b..956bd76e 100644 --- a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix +++ b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix @@ -1,7 +1,8 @@ {lib, ...}: let - inherit (lib.options) mkOption mkEnableOption; + inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.types) nullOr attrsOf listOf str either submodule bool enum; inherit (lib.nvim.types) luaInline; + inherit (lib.generators) mkLuaInline; linterType = submodule { options = { @@ -69,6 +70,23 @@ default = null; description = "Parser function"; }; + + required_files = mkOption { + type = nullOr (listOf str); + default = null; + example = ["eslint.config.js"]; + description = '' + Required files to lint. These files must exist relative to the cwd + of the linter or else this linter will be skipped + + ::: {.note} + This option is an nvf extension that only takes effect if you + use the `nvf_lint()` lua function. + + See {option}`vim.diagnostics.nvim-lint.lint_function`. + ::: + ''; + }; }; }; in { @@ -117,5 +135,53 @@ in { }; lint_after_save = mkEnableOption "autocmd to lint after each save" // {default = true;}; + + lint_function = mkOption { + type = luaInline; + default = mkLuaInline '' + function(buf) + local ft = vim.api.nvim_get_option_value("filetype", { buf = buf }) + local linters = require("lint").linters + local linters_from_ft = require("lint").linters_by_ft[ft] + + -- if no linter is configured for this filetype, stops linting + if linters_from_ft == nil then return end + + for _, name in ipairs(linters_from_ft) do + local linter = linters[name] + assert(linter, 'Linter with name `' .. name .. '` not available') + + if type(linter) == "function" then + linter = linter() + end + -- for require("lint").lint() to work, linter.name must be set + linter.name = linter.name or name + local cwd = linter.required_files + + -- if no configuration files are configured, lint + if cwd == nil then + require("lint").lint(linter) + else + -- if configuration files are configured and present in the project, lint + for _, fn in ipairs(cwd) do + local path = vim.fs.joinpath(linter.cwd or vim.fn.getcwd(), fn); + if vim.uv.fs_stat(path) then + require("lint").lint(linter) + break + end + end + end + end + end + ''; + example = literalExpression '' + mkLuaInline ''' + function(buf) + require("lint").try_lint() + end + ''' + ''; + description = "Define the global function nvf_lint which is used by nvf to lint."; + }; }; } diff --git a/modules/plugins/filetree/nvimtree/nvimtree.nix b/modules/plugins/filetree/nvimtree/nvimtree.nix index 9c443a6e..c3beb38f 100644 --- a/modules/plugins/filetree/nvimtree/nvimtree.nix +++ b/modules/plugins/filetree/nvimtree/nvimtree.nix @@ -683,15 +683,48 @@ in { }; git_placement = mkOption { - type = enum ["before" "after" "signcolumn"]; - description = "Place where the git icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled."; + type = enum ["before" "after" "signcolumn" "right_align"]; default = "before"; + description = '' + Place where the git icons will be rendered. + `signcolumn` requires `view.signcolumn` to be enabled. + ''; }; modified_placement = mkOption { - type = enum ["before" "after" "signcolumn"]; - description = "Place where the modified icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled."; + type = enum ["before" "after" "signcolumn" "right_align"]; default = "after"; + description = '' + Place where the modified icons will be rendered. + `signcolumn` requires `view.signcolumn` to be enabled. + ''; + }; + + hidden_placement = mkOption { + type = enum ["before" "after" "signcolumn" "right_align"]; + default = "after"; + description = '' + Place where the hidden icons will be rendered. + `signcolumn` requires `view.signcolumn` to be enabled. + ''; + }; + + diagnostics_placement = mkOption { + type = enum ["before" "after" "signcolumn" "right_align"]; + default = "after"; + description = '' + Place where the diagnostics icons will be rendered. + `signcolumn` requires `view.signcolumn` to be enabled. + ''; + }; + + bookmarks_placement = mkOption { + type = enum ["before" "after" "signcolumn" "right_align"]; + default = "after"; + description = '' + Place where the bookmark icons will be rendered. + `signcolumn` requires `view.signcolumn` to be enabled. + ''; }; padding = mkOption { diff --git a/modules/plugins/formatter/conform-nvim/conform-nvim.nix b/modules/plugins/formatter/conform-nvim/conform-nvim.nix index 727985a3..cfe89bf3 100644 --- a/modules/plugins/formatter/conform-nvim/conform-nvim.nix +++ b/modules/plugins/formatter/conform-nvim/conform-nvim.nix @@ -1,12 +1,9 @@ -{ - pkgs, - lib, - ... -}: let - inherit (lib.options) mkOption mkEnableOption literalExpression; - inherit (lib.types) attrs enum nullOr; - inherit (lib.nvim.types) mkPluginSetupOption; - inherit (lib.nvim.lua) mkLuaInline; +{lib, ...}: let + inherit (lib.generators) mkLuaInline; + inherit (lib.options) mkOption mkEnableOption literalMD; + inherit (lib.types) attrs either nullOr; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.types) luaInline mkPluginSetupOption; in { options.vim.formatter.conform-nvim = { enable = mkEnableOption "lightweight yet powerful formatter plugin for Neovim [conform-nvim]"; @@ -31,26 +28,46 @@ in { }; format_on_save = mkOption { - type = nullOr attrs; - default = { - lsp_format = "fallback"; - timeout_ms = 500; - }; + type = nullOr (either attrs luaInline); + default = mkLuaInline '' + function() + if not vim.g.formatsave or vim.b.disableFormatSave then + return + else + return {lsp_format = "fallback", timeout_ms = 500} + end + end + ''; + defaultText = literalMD '' + enabled by default, and respects {option}`vim.lsp.formatOnSave` and + {option}`vim.lsp.mappings.toggleFormatSave` + ''; description = '' - Table that will be passed to `conform.format()`. If this - is set, Conform will run the formatter on save. + Attribute set or Lua function that will be passed to + `conform.format()`. If this is set, Conform will run the formatter + on save. ''; }; - format_after_save = mkOption { - type = nullOr attrs; - default = {lsp_format = "fallback";}; - description = '' - Table that will be passed to `conform.format()`. If this - is set, Conform will run the formatter asynchronously after - save. - ''; - }; + format_after_save = let + defaultFormatAfterSaveOpts = {lsp_format = "fallback";}; + in + mkOption { + type = nullOr (either attrs luaInline); + default = mkLuaInline '' + function() + if not vim.g.formatsave or vim.b.disableFormatSave then + return + else + return ${toLuaObject defaultFormatAfterSaveOpts} + end + end + ''; + description = '' + Table or function(luainline) that will be passed to `conform.format()`. If this + is set, Conform will run the formatter asynchronously after save. + ''; + }; }; }; } diff --git a/modules/plugins/git/default.nix b/modules/plugins/git/default.nix index 6ed92217..76bb5786 100644 --- a/modules/plugins/git/default.nix +++ b/modules/plugins/git/default.nix @@ -3,8 +3,11 @@ in { imports = [ ./gitsigns + ./hunk-nvim ./vim-fugitive ./git-conflict + ./gitlinker-nvim + ./neogit ]; options.vim.git = { @@ -12,9 +15,12 @@ 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/gitlinker-nvim/config.nix b/modules/plugins/git/gitlinker-nvim/config.nix new file mode 100644 index 00000000..749cf18c --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/config.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.git.gitlinker-nvim; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins = { + "gitlinker-nvim" = { + package = "gitlinker-nvim"; + setupModule = "gitlinker"; + inherit (cfg) setupOpts; + cmd = ["GitLink"]; + }; + }; + }; + }; +} diff --git a/modules/plugins/git/gitlinker-nvim/default.nix b/modules/plugins/git/gitlinker-nvim/default.nix new file mode 100644 index 00000000..389b7a55 --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./gitlinker-nvim.nix + ]; +} diff --git a/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix b/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix new file mode 100644 index 00000000..f315e5f9 --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.git.gitlinker-nvim = { + enable = mkEnableOption "gitlinker-nvim" // {default = config.vim.git.enable;}; + setupOpts = mkPluginSetupOption "gitlinker-nvim" {}; + }; +} diff --git a/modules/plugins/git/gitsigns/config.nix b/modules/plugins/git/gitsigns/config.nix index 99927546..e89eebcf 100644 --- a/modules/plugins/git/gitsigns/config.nix +++ b/modules/plugins/git/gitsigns/config.nix @@ -69,7 +69,7 @@ in { }; binds.whichKey.register = pushDownDefault { - "g" = "+Gitsigns"; + "h" = "+Gitsigns"; }; pluginRC.gitsigns = entryAnywhere '' @@ -81,9 +81,11 @@ in { (mkIf cfg.codeActions.enable { vim.lsp.null-ls = { enable = true; - setupOpts.sources.gitsigns-ca = mkLuaInline '' - require("null-ls").builtins.code_actions.gitsigns - ''; + setupOpts.sources = [ + (mkLuaInline '' + require("null-ls").builtins.code_actions.gitsigns + '') + ]; }; }) ]); diff --git a/modules/plugins/git/hunk-nvim/config.nix b/modules/plugins/git/hunk-nvim/config.nix new file mode 100644 index 00000000..5eb41448 --- /dev/null +++ b/modules/plugins/git/hunk-nvim/config.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.git.hunk-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [ + # dependencies + "nui-nvim" # ui library + "nvim-web-devicons" # glyphs + ]; + + lazy.plugins = { + "hunk-nvim" = { + package = "hunk-nvim"; + setupModule = "hunk"; + 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/git/neogit/config.nix b/modules/plugins/git/neogit/config.nix new file mode 100644 index 00000000..20928857 --- /dev/null +++ b/modules/plugins/git/neogit/config.nix @@ -0,0 +1,39 @@ +{ + options, + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.binds) pushDownDefault mkKeymap; + + cfg = config.vim.git.neogit; + + keys = cfg.mappings; + inherit (options.vim.git.neogit) mappings; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["plenary-nvim"]; + + lazy.plugins.neogit = { + package = "neogit"; + setupModule = "neogit"; + inherit (cfg) setupOpts; + + cmd = ["Neogit"]; + + keys = [ + (mkKeymap "n" keys.open "Neogit" {desc = mappings.open.description;}) + (mkKeymap "n" keys.commit "Neogit commit" {desc = mappings.commit.description;}) + (mkKeymap "n" keys.pull "Neogit pull" {desc = mappings.pull.description;}) + (mkKeymap "n" keys.push "Neogit push" {desc = mappings.push.description;}) + ]; + }; + + binds.whichKey.register = pushDownDefault { + "g" = "+Git"; + }; + }; + }; +} diff --git a/modules/plugins/lsp/lsplines/default.nix b/modules/plugins/git/neogit/default.nix similarity index 67% rename from modules/plugins/lsp/lsplines/default.nix rename to modules/plugins/git/neogit/default.nix index 359cec4f..d3f82759 100644 --- a/modules/plugins/lsp/lsplines/default.nix +++ b/modules/plugins/git/neogit/default.nix @@ -1,6 +1,6 @@ { imports = [ ./config.nix - ./lsplines.nix + ./neogit.nix ]; } diff --git a/modules/plugins/git/neogit/neogit.nix b/modules/plugins/git/neogit/neogit.nix new file mode 100644 index 00000000..fa988a32 --- /dev/null +++ b/modules/plugins/git/neogit/neogit.nix @@ -0,0 +1,17 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.git.neogit = { + enable = mkEnableOption "An Interactive and powerful Git interface [Neogit]"; + setupOpts = mkPluginSetupOption "neogit" {}; + + mappings = { + open = mkMappingOption "Git Status [Neogit]" "gs"; + commit = mkMappingOption "Git Commit [Neogit]" "gc"; + pull = mkMappingOption "Git pull [Neogit]" "gp"; + push = mkMappingOption "Git push [Neogit]" "gP"; + }; + }; +} diff --git a/modules/plugins/languages/asm.nix b/modules/plugins/languages/asm.nix index a0e96cef..9fe58a76 100644 --- a/modules/plugins/languages/asm.nix +++ b/modules/plugins/languages/asm.nix @@ -20,7 +20,7 @@ in { }; lsp = { - enable = mkEnableOption "Assembly LSP support (asm-lsp)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Assembly LSP support (asm-lsp)" // {default = config.vim.lsp.enable;}; package = mkOption { type = package; diff --git a/modules/plugins/languages/astro.nix b/modules/plugins/languages/astro.nix index e1a56172..21b6e5a3 100644 --- a/modules/plugins/languages/astro.nix +++ b/modules/plugins/languages/astro.nix @@ -10,7 +10,6 @@ inherit (lib.lists) isList; inherit (lib.meta) getExe; inherit (lib.types) enum either listOf package str; - inherit (lib.generators) mkLuaInline; inherit (lib.nvim.lua) expToLua; inherit (lib.nvim.types) mkGrammarOption diagnostics; @@ -22,7 +21,7 @@ package = pkgs.astro-language-server; lspConfig = '' lspconfig.astro.setup { - capabilities = capabilities; + capabilities = capabilities, on_attach = attach_keymaps, cmd = ${ if isList cfg.lsp.package @@ -38,7 +37,11 @@ defaultFormat = "prettier"; formats = { prettier = { - package = pkgs.nodePackages.prettier; + package = pkgs.prettier; + }; + + prettierd = { + package = pkgs.prettierd; }; biome = { @@ -49,24 +52,20 @@ # TODO: specify packages defaultDiagnosticsProvider = ["eslint_d"]; diagnosticsProviders = { - eslint_d = { - package = pkgs.eslint_d; + eslint_d = let + pkg = pkgs.eslint_d; + in { + package = pkg; config = { - # HACK: change if nvim-lint gets a dynamic enable thing - parser = mkLuaInline '' - function(output, bufnr, cwd) - local markers = { "eslint.config.js", "eslint.config.mjs", - ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } - for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) - if vim.loop.fs_stat(path) then - return require("lint.linters.eslint_d").parser(output, bufnr, cwd) - end - end - - return {} - end - ''; + cmd = getExe pkg; + required_files = [ + "eslint.config.js" + "eslint.config.mjs" + ".eslintrc" + ".eslintrc.json" + ".eslintrc.js" + ".eslintrc.yml" + ]; }; }; }; @@ -81,19 +80,19 @@ in { }; lsp = { - enable = mkEnableOption "Astro LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Astro LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { - description = "Astro LSP server to use"; type = enum (attrNames servers); default = defaultServer; + description = "Astro LSP server to use"; }; package = mkOption { - description = "Astro LSP server package, or the command to run as a list of strings"; - example = ''[lib.getExe pkgs.astro-language-server "--minify" "--stdio"]''; type = either package (listOf str); default = servers.${cfg.lsp.server}.package; + example = ''[lib.getExe pkgs.astro-language-server "--minify" "--stdio"]''; + description = "Astro LSP server package, or the command to run as a list of strings"; }; }; @@ -149,16 +148,9 @@ in { vim.diagnostics.nvim-lint = { enable = true; linters_by_ft.astro = cfg.extraDiagnostics.types; - linters = mkMerge (map ( - name: { - ${name} = - diagnosticsProviders.${name}.config - // { - cmd = getExe diagnosticsProviders.${name}.package; - }; - } - ) - cfg.extraDiagnostics.types); + linters = + mkMerge (map (name: {${name} = diagnosticsProviders.${name}.config;}) + cfg.extraDiagnostics.types); }; }) ]); diff --git a/modules/plugins/languages/bash.nix b/modules/plugins/languages/bash.nix index bfe01032..9a5e3e13 100644 --- a/modules/plugins/languages/bash.nix +++ b/modules/plugins/languages/bash.nix @@ -56,7 +56,7 @@ in { }; lsp = { - enable = mkEnableOption "Enable Bash LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Enable Bash LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Bash LSP server to use"; @@ -66,7 +66,7 @@ in { package = mkOption { description = "bash-language-server package, or the command to run as a list of strings"; - example = literalExpression ''[lib.getExe pkgs.nodePackages.bash-language-server "start"]''; + example = literalExpression ''[lib.getExe pkgs.bash-language-server "start"]''; type = either package (listOf str); default = pkgs.bash-language-server; }; diff --git a/modules/plugins/languages/clang.nix b/modules/plugins/languages/clang.nix index bb30cc95..2db178e9 100644 --- a/modules/plugins/languages/clang.nix +++ b/modules/plugins/languages/clang.nix @@ -98,7 +98,7 @@ in { }; lsp = { - enable = mkEnableOption "clang LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "clang LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "The clang LSP server to use"; diff --git a/modules/plugins/languages/clojure.nix b/modules/plugins/languages/clojure.nix new file mode 100644 index 00000000..0b932708 --- /dev/null +++ b/modules/plugins/languages/clojure.nix @@ -0,0 +1,56 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.meta) getExe; + inherit (lib.lists) isList; + inherit (lib.types) either listOf package str; + inherit (lib.nvim.types) mkGrammarOption; + inherit (lib.nvim.lua) expToLua; + + cfg = config.vim.languages.clojure; +in { + options.vim.languages.clojure = { + enable = mkEnableOption "Clojure language support"; + + treesitter = { + enable = mkEnableOption "Clojure treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkGrammarOption pkgs "clojure"; + }; + + lsp = { + enable = mkEnableOption "Clojure LSP support" // {default = config.vim.lsp.enable;}; + package = mkOption { + type = either package (listOf str); + default = pkgs.clojure-lsp; + description = "Clojure LSP"; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.lsp.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.clojure-lsp = '' + lspconfig.clojure_lsp.setup { + capabilities = capabilities; + on_attach = default_on_attach; + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else ''{"${getExe cfg.lsp.package}"}'' + }; + } + ''; + }) + + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + ]); +} diff --git a/modules/plugins/languages/csharp.nix b/modules/plugins/languages/csharp.nix index af7f36e0..49ae4985 100644 --- a/modules/plugins/languages/csharp.nix +++ b/modules/plugins/languages/csharp.nix @@ -91,7 +91,7 @@ in { }; lsp = { - enable = mkEnableOption "C# LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "C# LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "C# LSP server to use"; type = enum (attrNames servers); diff --git a/modules/plugins/languages/css.nix b/modules/plugins/languages/css.nix index d103f241..1075bbc7 100644 --- a/modules/plugins/languages/css.nix +++ b/modules/plugins/languages/css.nix @@ -42,7 +42,7 @@ defaultFormat = "prettier"; formats = { prettier = { - package = pkgs.nodePackages.prettier; + package = pkgs.prettier; }; prettierd = { @@ -80,7 +80,7 @@ in { }; lsp = { - enable = mkEnableOption "CSS LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "CSS LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "CSS LSP server to use"; diff --git a/modules/plugins/languages/cue.nix b/modules/plugins/languages/cue.nix index 313e3233..bd446cbf 100644 --- a/modules/plugins/languages/cue.nix +++ b/modules/plugins/languages/cue.nix @@ -21,7 +21,7 @@ in { }; lsp = { - enable = mkEnableOption "CUE LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "CUE LSP support" // {default = config.vim.lsp.enable;}; package = mkOption { type = package; diff --git a/modules/plugins/languages/dart.nix b/modules/plugins/languages/dart.nix index 4f8a7028..c2a1810d 100644 --- a/modules/plugins/languages/dart.nix +++ b/modules/plugins/languages/dart.nix @@ -13,7 +13,7 @@ inherit (lib.strings) optionalString; inherit (lib.nvim.lua) expToLua; inherit (lib.nvim.types) mkGrammarOption; - inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.dag) entryAfter; cfg = config.vim.languages.dart; ftcfg = cfg.flutter-tools; @@ -77,20 +77,29 @@ in { flutter-tools = { enable = mkOption { type = bool; - default = config.vim.languages.enableLSP; + default = config.vim.lsp.enable; description = "Enable flutter-tools for flutter support"; }; + flutterPackage = mkOption { + type = nullOr package; + default = pkgs.flutter; + description = "Flutter package, or null to detect the flutter path at runtime instead."; + }; + enableNoResolvePatch = mkOption { type = bool; - default = true; + default = false; description = '' Whether to patch flutter-tools so that it doesn't resolve symlinks when detecting flutter path. - This is required if you want to use a flutter package built with nix. - If you are using a flutter SDK installed from a different source - and encounter the error "`dart` missing from PATH", disable this option. + ::: {.note} + This is required if `flutterPackage` is set to null and the flutter + package in your `PATH` was built with Nix. If you are using a flutter + SDK installed from a different source and encounter the error "`dart` + missing from `PATH`", leave this option disabled. + ::: ''; }; @@ -122,25 +131,30 @@ in { }; }; - config = mkIf cfg.enable (mkMerge [ + config.vim = mkIf cfg.enable (mkMerge [ (mkIf cfg.treesitter.enable { - vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.package]; + treesitter.enable = true; + treesitter.grammars = [cfg.treesitter.package]; }) (mkIf cfg.lsp.enable { - vim.lsp.lspconfig.enable = true; - vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig; + lsp.lspconfig.enable = true; + lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig; }) (mkIf ftcfg.enable { - vim.startPlugins = - if ftcfg.enableNoResolvePatch - then ["flutter-tools-patched"] - else ["flutter-tools-nvim"]; + startPlugins = [ + ( + if ftcfg.enableNoResolvePatch + then "flutter-tools-patched" + else "flutter-tools-nvim" + ) + "plenary-nvim" + ]; - vim.pluginRC.flutter-tools = entryAnywhere '' + pluginRC.flutter-tools = entryAfter ["lsp-setup"] '' require('flutter-tools').setup { + ${optionalString (ftcfg.flutterPackage != null) "flutter_path = \"${ftcfg.flutterPackage}/bin/flutter\","} lsp = { color = { -- show the derived colours for dart variables enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10 @@ -152,7 +166,6 @@ in { capabilities = capabilities, on_attach = default_on_attach; - flags = lsp_flags, }, ${optionalString cfg.dap.enable '' debugger = { diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index c3312135..961d7cc5 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -1,4 +1,5 @@ {lib, ...}: let + inherit (lib.modules) mkRenamedOptionModule; inherit (lib.nvim.languages) mkEnable; in { imports = [ @@ -8,6 +9,7 @@ in { ./cue.nix ./dart.nix ./clang.nix + ./clojure.nix ./css.nix ./elixir.nix ./fsharp.nix @@ -44,10 +46,13 @@ in { ./wgsl.nix ./yaml.nix ./ruby.nix + + # This is now a hard deprecation. + (mkRenamedOptionModule ["vim" "languages" "enableLSP"] ["vim" "lsp" "enable"]) ]; options.vim.languages = { - enableLSP = mkEnable "LSP"; + # Those are still managed by plugins, and should be enabled here. enableDAP = mkEnable "Debug Adapter"; enableTreesitter = mkEnable "Treesitter"; enableFormat = mkEnable "Formatting"; diff --git a/modules/plugins/languages/elixir.nix b/modules/plugins/languages/elixir.nix index 7b3a0256..241efd8e 100644 --- a/modules/plugins/languages/elixir.nix +++ b/modules/plugins/languages/elixir.nix @@ -53,7 +53,7 @@ in { }; lsp = { - enable = mkEnableOption "Elixir LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Elixir LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Elixir LSP server to use"; diff --git a/modules/plugins/languages/fsharp.nix b/modules/plugins/languages/fsharp.nix index 966b0349..6ed0ccab 100644 --- a/modules/plugins/languages/fsharp.nix +++ b/modules/plugins/languages/fsharp.nix @@ -51,7 +51,7 @@ in { }; lsp = { - enable = mkEnableOption "F# LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "F# LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); default = defaultServer; diff --git a/modules/plugins/languages/gleam.nix b/modules/plugins/languages/gleam.nix index 284d3443..272ef51e 100644 --- a/modules/plugins/languages/gleam.nix +++ b/modules/plugins/languages/gleam.nix @@ -41,7 +41,7 @@ in { }; lsp = { - enable = mkEnableOption "Gleam LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Gleam LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/languages/go.nix b/modules/plugins/languages/go.nix index 9f8bca3c..bab0ff4a 100644 --- a/modules/plugins/languages/go.nix +++ b/modules/plugins/languages/go.nix @@ -5,7 +5,7 @@ ... }: let inherit (builtins) attrNames; - inherit (lib.options) mkEnableOption mkOption; + inherit (lib.options) mkEnableOption mkOption literalMD; inherit (lib.modules) mkIf mkMerge; inherit (lib.meta) getExe; inherit (lib.lists) isList; @@ -67,7 +67,7 @@ in { }; lsp = { - enable = mkEnableOption "Go LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Go LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Go LSP server to use"; @@ -84,7 +84,14 @@ in { }; format = { - enable = mkEnableOption "Go formatting" // {default = config.vim.languages.enableFormat;}; + enable = + mkEnableOption "Go formatting" + // { + default = !cfg.lsp.enable && config.vim.languages.enableFormat; + defaultText = literalMD '' + disabled if Go LSP is enabled, otherwise follows {option}`vim.languages.enableFormat` + ''; + }; type = mkOption { description = "Go formatter to use"; diff --git a/modules/plugins/languages/haskell.nix b/modules/plugins/languages/haskell.nix index ff6c7d78..f50c9f09 100644 --- a/modules/plugins/languages/haskell.nix +++ b/modules/plugins/languages/haskell.nix @@ -25,7 +25,7 @@ in { }; lsp = { - enable = mkEnableOption "LSP support for Haskell" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "LSP support for Haskell" // {default = config.vim.lsp.enable;}; package = mkOption { description = "Haskell LSP package or command to run the Haskell LSP"; example = ''[ (lib.getExe pkgs.haskellPackages.haskell-language-server) "--debug" ]''; diff --git a/modules/plugins/languages/hcl.nix b/modules/plugins/languages/hcl.nix index 3a3db782..e702170c 100644 --- a/modules/plugins/languages/hcl.nix +++ b/modules/plugins/languages/hcl.nix @@ -43,7 +43,7 @@ in { }; lsp = { - enable = mkEnableOption "HCL LSP support (terraform-ls)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "HCL LSP support (terraform-ls)" // {default = config.vim.lsp.enable;}; # TODO: (maybe, is it better?) it would be cooler to use vscode-extensions.hashicorp.hcl probably, shouldn't be too hard package = mkOption { type = package; diff --git a/modules/plugins/languages/helm.nix b/modules/plugins/languages/helm.nix index d3fd636e..ffe115c9 100644 --- a/modules/plugins/languages/helm.nix +++ b/modules/plugins/languages/helm.nix @@ -54,7 +54,7 @@ in { }; lsp = { - enable = mkEnableOption "Helm LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Helm LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Helm LSP server to use"; diff --git a/modules/plugins/languages/java.nix b/modules/plugins/languages/java.nix index dc46fcfe..2e26feea 100644 --- a/modules/plugins/languages/java.nix +++ b/modules/plugins/languages/java.nix @@ -23,7 +23,7 @@ in { }; lsp = { - enable = mkEnableOption "Java LSP support (java-language-server)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Java LSP support (java-language-server)" // {default = config.vim.lsp.enable;}; package = mkOption { description = "java language server package, or the command to run as a list of strings"; example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; diff --git a/modules/plugins/languages/julia.nix b/modules/plugins/languages/julia.nix index aa537df9..8c48b070 100644 --- a/modules/plugins/languages/julia.nix +++ b/modules/plugins/languages/julia.nix @@ -78,7 +78,7 @@ in { lsp = { enable = mkOption { type = bool; - default = config.vim.languages.enableLSP; + default = config.vim.lsp.enable; description = '' Whether to enable Julia LSP support. diff --git a/modules/plugins/languages/kotlin.nix b/modules/plugins/languages/kotlin.nix index 2ddc63e9..1118afdf 100644 --- a/modules/plugins/languages/kotlin.nix +++ b/modules/plugins/languages/kotlin.nix @@ -30,7 +30,7 @@ in { }; lsp = { - enable = mkEnableOption "Kotlin LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Kotlin LSP support" // {default = config.vim.lsp.enable;}; package = mkOption { description = "kotlin_language_server package with Kotlin runtime"; diff --git a/modules/plugins/languages/lua.nix b/modules/plugins/languages/lua.nix index d5be4905..9f56cbea 100644 --- a/modules/plugins/languages/lua.nix +++ b/modules/plugins/languages/lua.nix @@ -43,7 +43,7 @@ in { }; lsp = { - enable = mkEnableOption "Lua LSP support via LuaLS" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Lua LSP support via LuaLS" // {default = config.vim.lsp.enable;}; package = mkOption { description = "LuaLS package, or the command to run as a list of strings"; diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 2447aba0..23848835 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -9,7 +9,7 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.options) mkEnableOption mkOption; inherit (lib.lists) isList; - inherit (lib.types) bool enum either package listOf str; + inherit (lib.types) bool enum either package listOf str nullOr; inherit (lib.nvim.lua) expToLua toLuaObject; inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption; inherit (lib.nvim.dag) entryAnywhere; @@ -67,7 +67,7 @@ in { }; lsp = { - enable = mkEnableOption "Enable Markdown LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Enable Markdown LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); @@ -114,18 +114,34 @@ in { [render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim Inline Markdown rendering with [render-markdown.nvim] - ''; }; setupOpts = mkPluginSetupOption "render-markdown" { - auto_override_publish_diagnostics = mkOption { - description = "Automatically override the publish_diagnostics handler"; - type = bool; - default = true; + file_types = lib.mkOption { + type = nullOr (listOf str); + default = null; + description = '' + List of buffer filetypes to enable this plugin in. + + This will cause the plugin to attach to new buffers who + have any of these filetypes. + ''; }; }; }; + markview-nvim = { + enable = + mkEnableOption "" + // { + description = '' + [markview.nvim]: https://github.com/OXY2DEV/markview.nvim + + [markview.nvim] - a hackable markdown, Typst, latex, html(inline) & YAML previewer + ''; + }; + setupOpts = mkPluginSetupOption "markview-nvim" {}; + }; }; extraDiagnostics = { @@ -171,6 +187,13 @@ in { ''; }) + (mkIf cfg.extensions.markview-nvim.enable { + vim.startPlugins = ["markview-nvim"]; + vim.pluginRC.markview-nvim = entryAnywhere '' + require("markview").setup(${toLuaObject cfg.extensions.markview-nvim.setupOpts}) + ''; + }) + (mkIf cfg.extraDiagnostics.enable { vim.diagnostics.nvim-lint = { enable = true; diff --git a/modules/plugins/languages/nim.nix b/modules/plugins/languages/nim.nix index 69288223..6e5885e2 100644 --- a/modules/plugins/languages/nim.nix +++ b/modules/plugins/languages/nim.nix @@ -6,7 +6,6 @@ }: let inherit (builtins) attrNames; inherit (lib.options) mkEnableOption mkOption; - inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.types) enum either listOf package str; @@ -54,7 +53,7 @@ in { }; lsp = { - enable = mkEnableOption "Nim LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Nim LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Nim LSP server to use"; type = str; diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index ad16a34e..83022adf 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -143,7 +143,7 @@ in { }; lsp = { - enable = mkEnableOption "Nix LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Nix LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Nix LSP server to use"; type = enum (attrNames servers); diff --git a/modules/plugins/languages/nu.nix b/modules/plugins/languages/nu.nix index eab0385c..bd007fc8 100644 --- a/modules/plugins/languages/nu.nix +++ b/modules/plugins/languages/nu.nix @@ -40,7 +40,7 @@ in { }; lsp = { - enable = mkEnableOption "Nu LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Nu LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = str; default = defaultServer; diff --git a/modules/plugins/languages/ocaml.nix b/modules/plugins/languages/ocaml.nix index 568b846e..995ca04d 100644 --- a/modules/plugins/languages/ocaml.nix +++ b/modules/plugins/languages/ocaml.nix @@ -49,7 +49,7 @@ in { }; lsp = { - enable = mkEnableOption "OCaml LSP support (ocaml-lsp)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "OCaml LSP support (ocaml-lsp)" // {default = config.vim.lsp.enable;}; server = mkOption { description = "OCaml LSP server to user"; type = enum (attrNames servers); diff --git a/modules/plugins/languages/odin.nix b/modules/plugins/languages/odin.nix index 7a32db93..6d20351c 100644 --- a/modules/plugins/languages/odin.nix +++ b/modules/plugins/languages/odin.nix @@ -41,7 +41,7 @@ in { }; lsp = { - enable = mkEnableOption "Odin LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Odin LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index 4dccc8cd..61ff0425 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -95,7 +95,7 @@ in { }; lsp = { - enable = mkEnableOption "PHP LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "PHP LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "PHP LSP server to use"; diff --git a/modules/plugins/languages/python.nix b/modules/plugins/languages/python.nix index ccb15f7c..bec7ec8b 100644 --- a/modules/plugins/languages/python.nix +++ b/modules/plugins/languages/python.nix @@ -47,7 +47,7 @@ }; python-lsp-server = { - package = pkgs.python-lsp-server; + package = pkgs.python3Packages.python-lsp-server; lspConfig = '' lspconfig.pylsp.setup{ capabilities = capabilities; @@ -99,7 +99,7 @@ # idk if this is the best way to install/run debugpy package = pkgs.python3.withPackages (ps: with ps; [debugpy]); dapConfig = '' - dap.adapters.python = function(cb, config) + dap.adapters.debugpy = function(cb, config) if config.request == 'attach' then ---@diagnostic disable-next-line: undefined-field local port = (config.connect or config).port @@ -128,7 +128,7 @@ dap.configurations.python = { { -- The first three options are required by nvim-dap - type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + type = 'debugpy'; -- the type here established the link to the adapter definition: `dap.adapters.debugpy` request = 'launch'; name = "Launch file"; @@ -169,7 +169,7 @@ in { }; lsp = { - enable = mkEnableOption "Python LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Python LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Python LSP server to use"; diff --git a/modules/plugins/languages/r.nix b/modules/plugins/languages/r.nix index fcadcc37..894c63f6 100644 --- a/modules/plugins/languages/r.nix +++ b/modules/plugins/languages/r.nix @@ -79,7 +79,7 @@ in { }; lsp = { - enable = mkEnableOption "R LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "R LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "R LSP server to use"; diff --git a/modules/plugins/languages/ruby.nix b/modules/plugins/languages/ruby.nix index 2f42aa4f..1f3ce82f 100644 --- a/modules/plugins/languages/ruby.nix +++ b/modules/plugins/languages/ruby.nix @@ -9,6 +9,8 @@ inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; inherit (lib.nvim.types) mkGrammarOption diagnostics; + inherit (lib.nvim.lua) expToLua; + inherit (lib.lists) isList; inherit (lib.types) either listOf package str enum; cfg = config.vim.languages.ruby; @@ -24,7 +26,25 @@ flags = { debounce_text_changes = 150, }, - cmd = { "${pkgs.solargraph}/bin/solargraph", "stdio" } + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else ''{ "${cfg.lsp.package}/bin/solargraph", "stdio" }'' + } + } + ''; + }; + rubylsp = { + package = pkgs.ruby-lsp; + lspConfig = '' + lspconfig.ruby_lsp.setup { + capabilities = capabilities, + on_attach = default_on_attach, + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else ''{ "${cfg.lsp.package}/bin/ruby-lsp" }'' + } } ''; }; @@ -57,7 +77,7 @@ in { }; lsp = { - enable = mkEnableOption "Ruby LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Ruby LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/languages/rust.nix b/modules/plugins/languages/rust.nix index 2181623a..09c54ae6 100644 --- a/modules/plugins/languages/rust.nix +++ b/modules/plugins/languages/rust.nix @@ -7,7 +7,7 @@ inherit (builtins) attrNames; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; - inherit (lib.options) mkOption mkEnableOption; + inherit (lib.options) mkOption mkEnableOption literalMD; inherit (lib.strings) optionalString; inherit (lib.trivial) boolToString; inherit (lib.lists) isList; @@ -43,7 +43,7 @@ in { }; lsp = { - enable = mkEnableOption "Rust LSP support (rust-analyzer with extra tools)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Rust LSP support (rust-analyzer with extra tools)" // {default = config.vim.lsp.enable;}; package = mkOption { description = "rust-analyzer package, or the command to run as a list of strings"; example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; @@ -68,7 +68,14 @@ in { }; format = { - enable = mkEnableOption "Rust formatting" // {default = config.vim.languages.enableFormat;}; + enable = + mkEnableOption "Rust formatting" + // { + default = !cfg.lsp.enable && config.vim.languages.enableFormat; + defaultText = literalMD '' + Disabled if Rust LSP is enabled, otherwise follows {option}`vim.languages.enableFormat` + ''; + }; type = mkOption { description = "Rust formatter to use"; diff --git a/modules/plugins/languages/scala.nix b/modules/plugins/languages/scala.nix index f769d092..b5382415 100644 --- a/modules/plugins/languages/scala.nix +++ b/modules/plugins/languages/scala.nix @@ -33,7 +33,7 @@ in { }; lsp = { - enable = mkEnableOption "Scala LSP support (metals)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Scala LSP support (metals)" // {default = config.vim.lsp.enable;}; package = mkPackageOption pkgs "metals" { default = ["metals"]; }; diff --git a/modules/plugins/languages/sql.nix b/modules/plugins/languages/sql.nix index 277dbeef..add46c15 100644 --- a/modules/plugins/languages/sql.nix +++ b/modules/plugins/languages/sql.nix @@ -79,7 +79,7 @@ in { }; lsp = { - enable = mkEnableOption "SQL LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "SQL LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "SQL LSP server to use"; diff --git a/modules/plugins/languages/svelte.nix b/modules/plugins/languages/svelte.nix index 67f11bc2..4cc9ffe9 100644 --- a/modules/plugins/languages/svelte.nix +++ b/modules/plugins/languages/svelte.nix @@ -9,7 +9,6 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.meta) getExe; - inherit (lib.generators) mkLuaInline; inherit (lib.types) enum either listOf package str; inherit (lib.nvim.lua) expToLua; inherit (lib.nvim.types) mkGrammarOption diagnostics; @@ -19,7 +18,7 @@ defaultServer = "svelte"; servers = { svelte = { - package = pkgs.nodePackages.svelte-language-server; + package = pkgs.svelte-language-server; lspConfig = '' lspconfig.svelte.setup { capabilities = capabilities; @@ -38,7 +37,7 @@ defaultFormat = "prettier"; formats = { prettier = { - package = pkgs.nodePackages.prettier; + package = pkgs.prettier; }; biome = { @@ -55,21 +54,14 @@ package = pkg; config = { cmd = getExe pkg; - # HACK: change if nvim-lint gets a dynamic enable thing - parser = mkLuaInline '' - function(output, bufnr, cwd) - local markers = { "eslint.config.js", "eslint.config.mjs", - ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } - for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) - if vim.loop.fs_stat(path) then - return require("lint.linters.eslint_d").parser(output, bufnr, cwd) - end - end - - return {} - end - ''; + required_files = [ + "eslint.config.js" + "eslint.config.mjs" + ".eslintrc" + ".eslintrc.json" + ".eslintrc.js" + ".eslintrc.yml" + ]; }; }; }; @@ -84,7 +76,7 @@ in { }; lsp = { - enable = mkEnableOption "Svelte LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Svelte LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Svelte LSP server to use"; diff --git a/modules/plugins/languages/tailwind.nix b/modules/plugins/languages/tailwind.nix index 594f6d9d..fbe707ba 100644 --- a/modules/plugins/languages/tailwind.nix +++ b/modules/plugins/languages/tailwind.nix @@ -35,7 +35,7 @@ in { enable = mkEnableOption "Tailwindcss language support"; lsp = { - enable = mkEnableOption "Tailwindcss LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Tailwindcss LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Tailwindcss LSP server to use"; diff --git a/modules/plugins/languages/terraform.nix b/modules/plugins/languages/terraform.nix index 33bb9357..095da072 100644 --- a/modules/plugins/languages/terraform.nix +++ b/modules/plugins/languages/terraform.nix @@ -20,7 +20,7 @@ in { }; lsp = { - enable = mkEnableOption "Terraform LSP support (terraform-ls)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Terraform LSP support (terraform-ls)" // {default = config.vim.lsp.enable;}; package = mkOption { description = "terraform-ls package"; diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index 8589d7ec..6064da98 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -9,7 +9,6 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.meta) getExe; - inherit (lib.generators) mkLuaInline; inherit (lib.types) enum either listOf package str bool; inherit (lib.nvim.lua) expToLua toLuaObject; inherit (lib.nvim.types) mkGrammarOption diagnostics mkPluginSetupOption; @@ -76,7 +75,7 @@ defaultFormat = "prettier"; formats = { prettier = { - package = pkgs.nodePackages.prettier; + package = pkgs.prettier; }; prettierd = { @@ -91,27 +90,21 @@ # TODO: specify packages defaultDiagnosticsProvider = ["eslint_d"]; diagnosticsProviders = { - eslint_d = { - package = pkgs.eslint_d; - config = let - pkg = pkgs.eslint_d; - in { + eslint_d = let + pkg = pkgs.eslint_d; + in { + package = pkg; + config = { cmd = getExe pkg; - # HACK: change if nvim-lint gets a dynamic enable thing - parser = mkLuaInline '' - function(output, bufnr, cwd) - local markers = { "eslint.config.js", "eslint.config.mjs", - ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } - for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) - if vim.loop.fs_stat(path) then - return require("lint.linters.eslint_d").parser(output, bufnr, cwd) - end - end - - return {} - end - ''; + required_files = [ + "eslint.config.js" + "eslint.config.mjs" + ".eslintrc" + ".eslintrc.cjs" + ".eslintrc.json" + ".eslintrc.js" + ".eslintrc.yml" + ]; }; }; }; @@ -127,7 +120,7 @@ in { }; lsp = { - enable = mkEnableOption "Typescript/Javascript LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Typescript/Javascript LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Typescript/Javascript LSP server to use"; @@ -204,9 +197,13 @@ in { (mkIf cfg.format.enable { vim.formatter.conform-nvim = { enable = true; - setupOpts.formatters_by_ft.typescript = [cfg.format.type]; - setupOpts.formatters.${cfg.format.type} = { - command = getExe cfg.format.package; + setupOpts = { + formatters_by_ft.typescript = [cfg.format.type]; + # .tsx files + formatters_by_ft.typescriptreact = [cfg.format.type]; + formatters.${cfg.format.type} = { + command = getExe cfg.format.package; + }; }; }; }) @@ -215,11 +212,11 @@ in { vim.diagnostics.nvim-lint = { enable = true; linters_by_ft.typescript = cfg.extraDiagnostics.types; + linters_by_ft.typescriptreact = cfg.extraDiagnostics.types; - linters = mkMerge (map (name: { - ${name}.cmd = getExe diagnosticsProviders.${name}.package; - }) - cfg.extraDiagnostics.types); + linters = + mkMerge (map (name: {${name} = diagnosticsProviders.${name}.config;}) + cfg.extraDiagnostics.types); }; }) diff --git a/modules/plugins/languages/typst.nix b/modules/plugins/languages/typst.nix index 8c65ae2c..08a2252b 100644 --- a/modules/plugins/languages/typst.nix +++ b/modules/plugins/languages/typst.nix @@ -76,7 +76,7 @@ in { }; lsp = { - enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Typst LSP server to use"; diff --git a/modules/plugins/languages/vala.nix b/modules/plugins/languages/vala.nix index da65a372..220926d0 100644 --- a/modules/plugins/languages/vala.nix +++ b/modules/plugins/languages/vala.nix @@ -50,7 +50,7 @@ in { }; lsp = { - enable = mkEnableOption "Vala LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Vala LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { description = "Vala LSP server to use"; type = enum (attrNames servers); diff --git a/modules/plugins/languages/wgsl.nix b/modules/plugins/languages/wgsl.nix index 7c8a1016..44323092 100644 --- a/modules/plugins/languages/wgsl.nix +++ b/modules/plugins/languages/wgsl.nix @@ -26,7 +26,7 @@ cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package - else "{'${cfg.lsp.package}/bin/wgsl_analyzer'}" + else "{'${cfg.lsp.package}/bin/wgsl-analyzer'}" } } ''; @@ -42,7 +42,7 @@ in { }; lsp = { - enable = mkEnableOption "WGSL LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "WGSL LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix index c84b17cd..a75a921f 100644 --- a/modules/plugins/languages/yaml.nix +++ b/modules/plugins/languages/yaml.nix @@ -28,7 +28,7 @@ defaultServer = "yaml-language-server"; servers = { yaml-language-server = { - package = pkgs.nodePackages.yaml-language-server; + package = pkgs.yaml-language-server; lspConfig = '' @@ -55,7 +55,7 @@ in { }; lsp = { - enable = mkEnableOption "YAML LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "YAML LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/languages/zig.nix b/modules/plugins/languages/zig.nix index 2aa0e2b6..89307eab 100644 --- a/modules/plugins/languages/zig.nix +++ b/modules/plugins/languages/zig.nix @@ -72,7 +72,7 @@ in { }; lsp = { - enable = mkEnableOption "Zig LSP support" // {default = config.vim.languages.enableLSP;}; + enable = mkEnableOption "Zig LSP support" // {default = config.vim.lsp.enable;}; server = mkOption { type = enum (attrNames servers); diff --git a/modules/plugins/lsp/config.nix b/modules/plugins/lsp/config.nix index 0fa16e47..e7b67c8e 100644 --- a/modules/plugins/lsp/config.nix +++ b/modules/plugins/lsp/config.nix @@ -4,7 +4,9 @@ pkgs, ... }: let + inherit (lib.generators) mkLuaInline; inherit (lib.modules) mkIf; + inherit (lib.lists) optional; inherit (lib.strings) optionalString; inherit (lib.trivial) boolToString; inherit (lib.nvim.binds) addDescriptionsToMappings; @@ -13,7 +15,10 @@ usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable; usingBlinkCmp = config.vim.autocomplete.blink-cmp.enable; self = import ./module.nix {inherit config lib pkgs;}; + conformCfg = config.vim.formatter.conform-nvim; + conformFormatOnSave = conformCfg.enable && conformCfg.setupOpts.format_on_save != null; + augroup = "nvf_lsp"; mappingDefinitions = self.options.vim.lsp.mappings; mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; mkBinding = binding: action: @@ -28,6 +33,60 @@ in { sourcePlugins = ["cmp-nvim-lsp"]; }; + augroups = [{name = augroup;}]; + autocmds = + (optional cfg.inlayHints.enable { + group = augroup; + event = ["LspAttach"]; + desc = "LSP on-attach enable inlay hints autocmd"; + callback = mkLuaInline '' + function(event) + local bufnr = event.buf + local client = vim.lsp.get_client_by_id(event.data.client_id) + if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) + end + end + ''; + }) + ++ (optional (!conformFormatOnSave) { + group = augroup; + event = ["BufWritePre"]; + desc = "LSP on-attach create format on save autocmd"; + callback = mkLuaInline '' + function(ev) + if vim.b.disableFormatSave or not vim.g.formatsave then + return + end + + local bufnr = ev.buf + + ${optionalString cfg.null-ls.enable '' + -- prefer null_ls formatter + do + local clients = vim.lsp.get_clients({ + bufnr = bufnr, + name = "null-ls", + method = "textDocument/formatting", + }) + if clients[1] then + vim.lsp.buf.format({ bufnr = bufnr, id = clients[1].id }) + return + end + end + ''} + + local clients = vim.lsp.get_clients({ + bufnr = bufnr, + method = "textDocument/formatting", + }) + if clients[1] then + vim.lsp.buf.format({ bufnr = bufnr, id = clients[1].id }) + end + end + ''; + }); + pluginRC.lsp-setup = '' vim.g.formatsave = ${boolToString cfg.formatOnSave}; @@ -54,60 +113,9 @@ in { ${mkBinding mappings.toggleFormatOnSave "function() vim.b.disableFormatSave = not vim.b.disableFormatSave end"} end - -- Enable formatting - local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) - - format_callback = function(client, bufnr) - if vim.g.formatsave then - vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) - vim.api.nvim_create_autocmd("BufWritePre", { - group = augroup, - buffer = bufnr, - callback = function() - ${ - if config.vim.lsp.null-ls.enable - then '' - if vim.b.disableFormatSave then - return - end - - local function is_null_ls_formatting_enabled(bufnr) - local file_type = vim.api.nvim_buf_get_option(bufnr, "filetype") - local generators = require("null-ls.generators").get_available( - file_type, - require("null-ls.methods").internal.FORMATTING - ) - return #generators > 0 - end - - if is_null_ls_formatting_enabled(bufnr) then - vim.lsp.buf.format({ - bufnr = bufnr, - filter = function(client) - return client.name == "null-ls" - end - }) - else - vim.lsp.buf.format({ - bufnr = bufnr, - }) - end - '' - else " - vim.lsp.buf.format({ - bufnr = bufnr, - }) - " - } - end, - }) - end - end - ${optionalString config.vim.ui.breadcrumbs.enable ''local navic = require("nvim-navic")''} default_on_attach = function(client, bufnr) attach_keymaps(client, bufnr) - format_callback(client, bufnr) ${optionalString config.vim.ui.breadcrumbs.enable '' -- let navic attach to buffers if client.server_capabilities.documentSymbolProvider then @@ -118,6 +126,7 @@ in { local capabilities = vim.lsp.protocol.make_client_capabilities() ${optionalString usingNvimCmp '' + -- TODO(horriblename): migrate to vim.lsp.config['*'] -- HACK: copied from cmp-nvim-lsp. If we ever lazy load lspconfig we -- should re-evaluate whether we can just use `default_capabilities` capabilities = { diff --git a/modules/plugins/lsp/default.nix b/modules/plugins/lsp/default.nix index 421f5fda..eb694583 100644 --- a/modules/plugins/lsp/default.nix +++ b/modules/plugins/lsp/default.nix @@ -15,7 +15,6 @@ ./lightbulb ./otter ./lspkind - ./lsplines ./nvim-docs-view ]; } diff --git a/modules/plugins/lsp/lspconfig/config.nix b/modules/plugins/lsp/lspconfig/config.nix index 1c1f0a0a..16cba488 100644 --- a/modules/plugins/lsp/lspconfig/config.nix +++ b/modules/plugins/lsp/lspconfig/config.nix @@ -14,8 +14,6 @@ in { config = mkIf cfg.lspconfig.enable (mkMerge [ { vim = { - lsp.enable = true; - startPlugins = ["nvim-lspconfig"]; pluginRC.lspconfig = entryAfter ["lsp-setup"] '' diff --git a/modules/plugins/lsp/lsplines/config.nix b/modules/plugins/lsp/lsplines/config.nix deleted file mode 100644 index bb07edc9..00000000 --- a/modules/plugins/lsp/lsplines/config.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib.modules) mkIf; - inherit (lib.nvim.dag) entryAfter; - - cfg = config.vim.lsp; -in { - config = mkIf (cfg.enable && cfg.lsplines.enable) { - vim.startPlugins = ["lsp-lines"]; - vim.pluginRC.lsplines = entryAfter ["lspconfig"] '' - require("lsp_lines").setup() - - vim.diagnostic.config({ - virtual_text = false, - }) - ''; - }; -} diff --git a/modules/plugins/lsp/lsplines/lsplines.nix b/modules/plugins/lsp/lsplines/lsplines.nix deleted file mode 100644 index aac4cbbc..00000000 --- a/modules/plugins/lsp/lsplines/lsplines.nix +++ /dev/null @@ -1,11 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkEnableOption; -in { - options.vim.lsp = { - lsplines = { - enable = mkEnableOption '' - diagnostics using virtual lines on top of the real line of code. [lsp_lines] - ''; - }; - }; -} diff --git a/modules/plugins/lsp/lspsaga/lspsaga.nix b/modules/plugins/lsp/lspsaga/lspsaga.nix index 39ce6298..570cee1a 100644 --- a/modules/plugins/lsp/lspsaga/lspsaga.nix +++ b/modules/plugins/lsp/lspsaga/lspsaga.nix @@ -6,6 +6,19 @@ inherit (lib.modules) mkRemovedOptionModule; inherit (lib.options) mkOption mkEnableOption; inherit (lib.nvim.types) borderType mkPluginSetupOption; + inherit (lib.nvim.lua) mkLuaInline; + + uiKindSetupOpts = + if config.vim.theme.enable && config.vim.theme.name == "catppuccin" + then { + ui.kind = + mkLuaInline + # lua + '' + require("catppuccin.groups.integrations.lsp_saga").custom_kind() + ''; + } + else {}; in { imports = [ (mkRemovedOptionModule ["vim" "lsp" "lspsaga" "mappings"] '' @@ -21,12 +34,14 @@ in { options.vim.lsp.lspsaga = { enable = mkEnableOption "LSP Saga"; - setupOpts = mkPluginSetupOption "lspsaga" { - border_style = mkOption { - type = borderType; - default = config.vim.ui.borders.globalStyle; - description = "Border type, see {command}`:help nvim_open_win`"; - }; - }; + setupOpts = + mkPluginSetupOption "lspsaga" { + border_style = mkOption { + type = borderType; + default = config.vim.ui.borders.globalStyle; + description = "Border type, see {command}`:help nvim_open_win`"; + }; + } + // uiKindSetupOpts; }; } diff --git a/modules/plugins/lsp/module.nix b/modules/plugins/lsp/module.nix index b16f9c13..6b63d725 100644 --- a/modules/plugins/lsp/module.nix +++ b/modules/plugins/lsp/module.nix @@ -3,8 +3,12 @@ inherit (lib.nvim.binds) mkMappingOption; in { options.vim.lsp = { - enable = mkEnableOption "LSP, also enabled automatically through null-ls and lspconfig options"; formatOnSave = mkEnableOption "format on save"; + + inlayHints = { + enable = mkEnableOption "inlay hints"; + }; + mappings = { goToDefinition = mkMappingOption "Go to definition" diff --git a/modules/plugins/lsp/null-ls/null-ls.nix b/modules/plugins/lsp/null-ls/null-ls.nix index 3a10bac7..ba02df9c 100644 --- a/modules/plugins/lsp/null-ls/null-ls.nix +++ b/modules/plugins/lsp/null-ls/null-ls.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) attrsOf str int nullOr; + inherit (lib.types) listOf str int nullOr; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) luaInline mkPluginSetupOption; inherit (lib.nvim.config) batchRenameOptions; @@ -70,7 +70,7 @@ in { }; sources = mkOption { - type = nullOr (attrsOf luaInline); + type = nullOr (listOf luaInline); default = null; description = "Sources for null-ls to register"; }; diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix index b1b045d8..85f24c70 100644 --- a/modules/plugins/lsp/otter/config.nix +++ b/modules/plugins/lsp/otter/config.nix @@ -15,13 +15,6 @@ mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions; in { config = mkIf (cfg.enable && cfg.otter-nvim.enable) { - warnings = [ - # TODO: remove warning when we update to nvim 0.11 - (mkIf config.vim.utility.ccc.enable '' - ccc and otter occasionally have small conflicts that will disappear with nvim 0.11. - In the meantime, otter handles it by throwing a warning, but both plugins will work. - '') - ]; vim = { startPlugins = ["otter-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/mini/ai/ai.nix b/modules/plugins/mini/ai/ai.nix index d0da31d7..d4c43941 100644 --- a/modules/plugins/mini/ai/ai.nix +++ b/modules/plugins/mini/ai/ai.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/align/align.nix b/modules/plugins/mini/align/align.nix index 96c82947..56a68c1f 100644 --- a/modules/plugins/mini/align/align.nix +++ b/modules/plugins/mini/align/align.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/animate/animate.nix b/modules/plugins/mini/animate/animate.nix index fb17c0bd..d35f7461 100644 --- a/modules/plugins/mini/animate/animate.nix +++ b/modules/plugins/mini/animate/animate.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/basics/basics.nix b/modules/plugins/mini/basics/basics.nix index e855caa6..9bac3b1c 100644 --- a/modules/plugins/mini/basics/basics.nix +++ b/modules/plugins/mini/basics/basics.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/bracketed/bracketed.nix b/modules/plugins/mini/bracketed/bracketed.nix index 3152f046..454328e9 100644 --- a/modules/plugins/mini/bracketed/bracketed.nix +++ b/modules/plugins/mini/bracketed/bracketed.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/bufremove/bufremove.nix b/modules/plugins/mini/bufremove/bufremove.nix index 5e04609d..82819df9 100644 --- a/modules/plugins/mini/bufremove/bufremove.nix +++ b/modules/plugins/mini/bufremove/bufremove.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/clue/clue.nix b/modules/plugins/mini/clue/clue.nix index 50d33c65..825aa697 100644 --- a/modules/plugins/mini/clue/clue.nix +++ b/modules/plugins/mini/clue/clue.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/colors/colors.nix b/modules/plugins/mini/colors/colors.nix index 7d56cd49..b65c86aa 100644 --- a/modules/plugins/mini/colors/colors.nix +++ b/modules/plugins/mini/colors/colors.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; in { options.vim.mini.colors = { diff --git a/modules/plugins/mini/comment/comment.nix b/modules/plugins/mini/comment/comment.nix index c46c0a58..e3e03833 100644 --- a/modules/plugins/mini/comment/comment.nix +++ b/modules/plugins/mini/comment/comment.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/completion/completion.nix b/modules/plugins/mini/completion/completion.nix index fc36ed84..7c70e5e2 100644 --- a/modules/plugins/mini/completion/completion.nix +++ b/modules/plugins/mini/completion/completion.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/cursorword/config.nix b/modules/plugins/mini/cursorword/config.nix new file mode 100644 index 00000000..bc5ab2cb --- /dev/null +++ b/modules/plugins/mini/cursorword/config.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.mini.cursorword; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-cursorword"]; + + pluginRC.mini-ai = entryAnywhere '' + require("mini.cursorword").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/cursorword/cursorword.nix b/modules/plugins/mini/cursorword/cursorword.nix new file mode 100644 index 00000000..f2b8903a --- /dev/null +++ b/modules/plugins/mini/cursorword/cursorword.nix @@ -0,0 +1,9 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.cursorword = { + enable = mkEnableOption "mini.cursorword"; + setupOpts = mkPluginSetupOption "mini.cursorword" {}; + }; +} diff --git a/modules/plugins/mini/cursorword/default.nix b/modules/plugins/mini/cursorword/default.nix new file mode 100644 index 00000000..f0aae6c8 --- /dev/null +++ b/modules/plugins/mini/cursorword/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cursorword.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 8f035285..f066b172 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -11,6 +11,7 @@ ./colors ./comment ./completion + ./cursorword ./diff ./doc ./extra diff --git a/modules/plugins/mini/diff/diff.nix b/modules/plugins/mini/diff/diff.nix index 4a72fda2..9df564a4 100644 --- a/modules/plugins/mini/diff/diff.nix +++ b/modules/plugins/mini/diff/diff.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/doc/doc.nix b/modules/plugins/mini/doc/doc.nix index 8699fa11..2b302475 100644 --- a/modules/plugins/mini/doc/doc.nix +++ b/modules/plugins/mini/doc/doc.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/extra/extra.nix b/modules/plugins/mini/extra/extra.nix index c697fdd6..f0c4133e 100644 --- a/modules/plugins/mini/extra/extra.nix +++ b/modules/plugins/mini/extra/extra.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; in { options.vim.mini.extra = { diff --git a/modules/plugins/mini/files/files.nix b/modules/plugins/mini/files/files.nix index 4ba5fcc4..80d68589 100644 --- a/modules/plugins/mini/files/files.nix +++ b/modules/plugins/mini/files/files.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/fuzzy/fuzzy.nix b/modules/plugins/mini/fuzzy/fuzzy.nix index 977a1763..64a3f42f 100644 --- a/modules/plugins/mini/fuzzy/fuzzy.nix +++ b/modules/plugins/mini/fuzzy/fuzzy.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/git/git.nix b/modules/plugins/mini/git/git.nix index ebbf4282..6c64bbf7 100644 --- a/modules/plugins/mini/git/git.nix +++ b/modules/plugins/mini/git/git.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/hipatterns/hipatterns.nix b/modules/plugins/mini/hipatterns/hipatterns.nix index 019626cf..943ad9e5 100644 --- a/modules/plugins/mini/hipatterns/hipatterns.nix +++ b/modules/plugins/mini/hipatterns/hipatterns.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/hues/hues.nix b/modules/plugins/mini/hues/hues.nix index 13de5116..060d0eca 100644 --- a/modules/plugins/mini/hues/hues.nix +++ b/modules/plugins/mini/hues/hues.nix @@ -1,10 +1,5 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption mkOption; - inherit (lib.strings) hasPrefix; inherit (lib.nvim.types) mkPluginSetupOption; inherit (lib.nvim.types) hexColor; in { diff --git a/modules/plugins/mini/icons/icons.nix b/modules/plugins/mini/icons/icons.nix index 27928a93..4f201cc1 100644 --- a/modules/plugins/mini/icons/icons.nix +++ b/modules/plugins/mini/icons/icons.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/indentscope/config.nix b/modules/plugins/mini/indentscope/config.nix index 2e6ec03d..a6fd16d7 100644 --- a/modules/plugins/mini/indentscope/config.nix +++ b/modules/plugins/mini/indentscope/config.nix @@ -3,6 +3,7 @@ lib, ... }: let + inherit (lib.generators) mkLuaInline; inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.lua) toLuaObject; @@ -10,6 +11,21 @@ cfg = config.vim.mini.indentscope; in { vim = mkIf cfg.enable { + autocmds = [ + { + callback = mkLuaInline '' + function() + local ignore_filetypes = ${toLuaObject cfg.setupOpts.ignore_filetypes} + if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then + vim.b.miniindentscope_disable = true + end + end + ''; + desc = "Disable indentscope for certain filetypes"; + event = ["FileType"]; + } + ]; + startPlugins = ["mini-indentscope"]; pluginRC.mini-indentscope = entryAnywhere '' diff --git a/modules/plugins/mini/indentscope/indentscope.nix b/modules/plugins/mini/indentscope/indentscope.nix index 6feffaee..6a2224c8 100644 --- a/modules/plugins/mini/indentscope/indentscope.nix +++ b/modules/plugins/mini/indentscope/indentscope.nix @@ -1,13 +1,16 @@ -{ - config, - lib, - ... -}: let - inherit (lib.options) mkEnableOption; +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.types) str listOf; in { options.vim.mini.indentscope = { enable = mkEnableOption "mini.indentscope"; - setupOpts = mkPluginSetupOption "mini.indentscope" {}; + setupOpts = mkPluginSetupOption "mini.indentscope" { + ignore_filetypes = mkOption { + type = listOf str; + default = ["help" "neo-tree" "notify" "NvimTree" "TelescopePrompt"]; + description = "File types to ignore for illuminate"; + }; + }; }; } diff --git a/modules/plugins/mini/jump/jump.nix b/modules/plugins/mini/jump/jump.nix index 1e16ae7a..5a6b0d08 100644 --- a/modules/plugins/mini/jump/jump.nix +++ b/modules/plugins/mini/jump/jump.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/jump2d/jump2d.nix b/modules/plugins/mini/jump2d/jump2d.nix index 59f7c2ba..f1e76570 100644 --- a/modules/plugins/mini/jump2d/jump2d.nix +++ b/modules/plugins/mini/jump2d/jump2d.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/map/map.nix b/modules/plugins/mini/map/map.nix index 2d42fe70..31735d08 100644 --- a/modules/plugins/mini/map/map.nix +++ b/modules/plugins/mini/map/map.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/misc/misc.nix b/modules/plugins/mini/misc/misc.nix index 1f4dcf55..4e82dd6f 100644 --- a/modules/plugins/mini/misc/misc.nix +++ b/modules/plugins/mini/misc/misc.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/move/move.nix b/modules/plugins/mini/move/move.nix index ec9eccac..4e598126 100644 --- a/modules/plugins/mini/move/move.nix +++ b/modules/plugins/mini/move/move.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/operators/operators.nix b/modules/plugins/mini/operators/operators.nix index 639229bf..1401e939 100644 --- a/modules/plugins/mini/operators/operators.nix +++ b/modules/plugins/mini/operators/operators.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/pairs/pairs.nix b/modules/plugins/mini/pairs/pairs.nix index 926c93d3..da599cc5 100644 --- a/modules/plugins/mini/pairs/pairs.nix +++ b/modules/plugins/mini/pairs/pairs.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/pick/pick.nix b/modules/plugins/mini/pick/pick.nix index d8ccbfd5..159d007b 100644 --- a/modules/plugins/mini/pick/pick.nix +++ b/modules/plugins/mini/pick/pick.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/sessions/sessions.nix b/modules/plugins/mini/sessions/sessions.nix index 0ceba595..61f235a8 100644 --- a/modules/plugins/mini/sessions/sessions.nix +++ b/modules/plugins/mini/sessions/sessions.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/snippets/snippets.nix b/modules/plugins/mini/snippets/snippets.nix index d7f0355c..05109e87 100644 --- a/modules/plugins/mini/snippets/snippets.nix +++ b/modules/plugins/mini/snippets/snippets.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/splitjoin/splitjoin.nix b/modules/plugins/mini/splitjoin/splitjoin.nix index 44b2f23f..b553bbb3 100644 --- a/modules/plugins/mini/splitjoin/splitjoin.nix +++ b/modules/plugins/mini/splitjoin/splitjoin.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/starter/starter.nix b/modules/plugins/mini/starter/starter.nix index df550857..d0041382 100644 --- a/modules/plugins/mini/starter/starter.nix +++ b/modules/plugins/mini/starter/starter.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/statusline/statusline.nix b/modules/plugins/mini/statusline/statusline.nix index 2c850ae1..23f43af1 100644 --- a/modules/plugins/mini/statusline/statusline.nix +++ b/modules/plugins/mini/statusline/statusline.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/surround/surround.nix b/modules/plugins/mini/surround/surround.nix index 726bf3f9..537293a8 100644 --- a/modules/plugins/mini/surround/surround.nix +++ b/modules/plugins/mini/surround/surround.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/tabline/tabline.nix b/modules/plugins/mini/tabline/tabline.nix index 936273db..ae924e27 100644 --- a/modules/plugins/mini/tabline/tabline.nix +++ b/modules/plugins/mini/tabline/tabline.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/test/test.nix b/modules/plugins/mini/test/test.nix index 28135a26..f6ca5f51 100644 --- a/modules/plugins/mini/test/test.nix +++ b/modules/plugins/mini/test/test.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/trailspace/trailspace.nix b/modules/plugins/mini/trailspace/trailspace.nix index 19757bfb..5d540d41 100644 --- a/modules/plugins/mini/trailspace/trailspace.nix +++ b/modules/plugins/mini/trailspace/trailspace.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/mini/visits/visits.nix b/modules/plugins/mini/visits/visits.nix index c01e8ebf..5f9c6c1f 100644 --- a/modules/plugins/mini/visits/visits.nix +++ b/modules/plugins/mini/visits/visits.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index fab5079d..f8c18ea9 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -35,7 +35,7 @@ in { (mkIf cfg.treesitter.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.norgPackage]; + vim.treesitter.grammars = [cfg.treesitter.norgPackage cfg.treesitter.norgMetaPackage]; }) ]); } diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index 6b5cf18e..684519c9 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -4,9 +4,9 @@ pkgs, ... }: let - inherit (lib.options) mkEnableOption mkOption; + inherit (lib.options) mkPackageOption mkEnableOption mkOption; inherit (lib.types) submodule listOf str; - inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; + inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.notes.neorg = { enable = mkEnableOption '' @@ -44,7 +44,12 @@ in { treesitter = { enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;}; - norgPackage = mkGrammarOption pkgs "norg"; + norgPackage = mkPackageOption pkgs ["norg-meta treesitter"] { + default = ["tree-sitter-grammars" "tree-sitter-norg"]; + }; + norgMetaPackage = mkPackageOption pkgs ["norg-meta treesitter"] { + default = ["tree-sitter-grammars" "tree-sitter-norg-meta"]; + }; }; }; } diff --git a/modules/plugins/repl/conjure/conjure.nix b/modules/plugins/repl/conjure/conjure.nix new file mode 100644 index 00000000..83481af2 --- /dev/null +++ b/modules/plugins/repl/conjure/conjure.nix @@ -0,0 +1,19 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.modules) mkIf; + + cfg = config.vim.repl.conjure; +in { + options.vim.repl.conjure = { + enable = mkEnableOption "Conjure"; + }; + + config = mkIf cfg.enable { + vim.startPlugins = [pkgs.vimPlugins.conjure]; + }; +} diff --git a/modules/plugins/repl/conjure/default.nix b/modules/plugins/repl/conjure/default.nix new file mode 100644 index 00000000..de8c3190 --- /dev/null +++ b/modules/plugins/repl/conjure/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./conjure.nix + ]; +} diff --git a/modules/plugins/repl/default.nix b/modules/plugins/repl/default.nix new file mode 100644 index 00000000..ba03a390 --- /dev/null +++ b/modules/plugins/repl/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./conjure + ]; +} diff --git a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix index e60a4a5d..8390d1ce 100644 --- a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix +++ b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix @@ -77,7 +77,7 @@ in { }; autoload_mode = mkOption { - type = either (enum ["Disabled" "CurrentDir" "LastSession"]) luaInline; + type = either (enum ["Disabled" "CurrentDir" "LastSession" "GitSession"]) luaInline; # Variable 'sm' is defined in the pluginRC of nvim-session-manager. The # definition is as follows: `local sm = require('session_manager.config')` apply = val: @@ -88,7 +88,7 @@ in { description = '' Define what to do when Neovim is started without arguments. - Takes either one of `"Disabled"`, `"CurrentDir"`, `"LastSession` in which case the value + Takes either one of `"Disabled"`, `"CurrentDir"`, `"LastSession"`, `"GitSession"` in which case the value will be inserted into `sm.AutoloadMode.`, or an inline Lua value. ''; }; diff --git a/modules/plugins/snippets/luasnip/config.nix b/modules/plugins/snippets/luasnip/config.nix index 11be37c1..48b1f40d 100644 --- a/modules/plugins/snippets/luasnip/config.nix +++ b/modules/plugins/snippets/luasnip/config.nix @@ -1,11 +1,48 @@ { config, lib, + pkgs, ... }: let inherit (lib.modules) mkIf; + inherit (lib.lists) replicate; + inherit + (lib.strings) + optionalString + removeSuffix + concatStrings + stringAsChars + concatMapStringsSep + ; + inherit (lib.attrsets) mapAttrsToList; + inherit (pkgs) writeTextFile; cfg = config.vim.snippets.luasnip; + # LuaSnip freaks out if the indentation is wrong in snippets + indent = n: s: let + indentString = concatStrings (replicate n " "); + sep = "\n" + indentString; + in + indentString + + stringAsChars (c: + if c == "\n" + then sep + else c) (removeSuffix "\n" s); + customSnipmateSnippetFiles = + mapAttrsToList ( + name: value: + writeTextFile { + name = "${name}.snippets"; + text = + concatMapStringsSep "\n" (x: '' + snippet ${x.trigger} ${x.description} + ${indent 2 x.body} + '') + value; + destination = "/snippets/${name}.snippets"; + } + ) + cfg.customSnippets.snipmate; in { config = mkIf cfg.enable { vim = { @@ -19,11 +56,19 @@ in { after = cfg.loaders; }; - startPlugins = cfg.providers; + startPlugins = cfg.providers ++ customSnipmateSnippetFiles; autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { sources = {luasnip = "[LuaSnip]";}; sourcePlugins = ["cmp-luasnip"]; }; + snippets.luasnip.loaders = '' + ${optionalString ( + cfg.customSnippets.snipmate != {} + ) "require('luasnip.loaders.from_snipmate').lazy_load()"} + ${optionalString ( + config.vim.autocomplete.nvim-cmp.enable || config.vim.autocomplete.blink-cmp.friendly-snippets.enable + ) "require('luasnip.loaders.from_vscode').lazy_load()"} + ''; }; }; } diff --git a/modules/plugins/snippets/luasnip/luasnip.nix b/modules/plugins/snippets/luasnip/luasnip.nix index 6b189b61..601dc109 100644 --- a/modules/plugins/snippets/luasnip/luasnip.nix +++ b/modules/plugins/snippets/luasnip/luasnip.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalExpression literalMD; - inherit (lib.types) listOf lines; + inherit (lib.types) listOf lines submodule str attrsOf; inherit (lib.nvim.types) pluginType mkPluginSetupOption; in { options.vim.snippets.luasnip = { @@ -36,5 +36,61 @@ in { setupOpts = mkPluginSetupOption "LuaSnip" { enable_autosnippets = mkEnableOption "autosnippets"; }; + + customSnippets.snipmate = mkOption { + type = attrsOf ( + listOf (submodule { + options = { + trigger = mkOption { + type = str; + description = '' + The trigger used to activate this snippet. + ''; + }; + description = mkOption { + type = str; + default = ""; + description = '' + The description shown for this snippet. + ''; + }; + body = mkOption { + type = str; + description = '' + [LuaSnip Documentation]: https://github.com/L3MON4D3/LuaSnip#add-snippets + The body of the snippet in SnipMate format (see [LuaSnip Documentation]). + ''; + }; + }; + }) + ); + default = {}; + example = '' + { + all = [ + { + trigger = "if"; + body = "if $1 else $2"; + } + ]; + nix = [ + { + trigger = "mkOption"; + body = ''' + mkOption { + type = $1; + default = $2; + description = $3; + example = $4; + } + '''; + } + ]; + } + ''; + description = '' + A list containing custom snippets in the SnipMate format to be loaded by LuaSnip. + ''; + }; }; } diff --git a/modules/plugins/spellcheck/vim-dirtytalk/config.nix b/modules/plugins/spellcheck/vim-dirtytalk/config.nix index 51ccfb81..7fd32d61 100644 --- a/modules/plugins/spellcheck/vim-dirtytalk/config.nix +++ b/modules/plugins/spellcheck/vim-dirtytalk/config.nix @@ -17,7 +17,7 @@ in { # like to append programming to spelllangs as soon as # possible while the plugin is enabled and the state # directory can be found. - pluginRC.vim-dirtytalk = entryAfter ["spellcheck"] '' + luaConfigRC.vim-dirtytalk = entryAfter ["spellcheck"] '' -- If Neovim can find (or access) the state directory -- then append "programming" wordlist from vim-dirtytalk -- to spelllang table. If path cannot be found, display diff --git a/modules/plugins/statusline/lualine/config.nix b/modules/plugins/statusline/lualine/config.nix index facfcebb..010b6cd2 100644 --- a/modules/plugins/statusline/lualine/config.nix +++ b/modules/plugins/statusline/lualine/config.nix @@ -14,12 +14,28 @@ bCfg = config.vim.ui.breadcrumbs; in { config = mkMerge [ - # TODO: move into nvim-tree file - (mkIf config.vim.filetree.nvimTree.enable { - vim.statusline.lualine.setupOpts = { - extensions = ["nvim-tree"]; - }; - }) + { + vim.statusline.lualine.setupOpts.extensions = + (lib.optionals config.vim.filetree.nvimTree.enable ["nvim-tree"]) + ++ (lib.optionals config.vim.filetree.neo-tree.enable ["neo-tree"]) + ++ (lib.optionals config.vim.utility.snacks-nvim.enable [ + { + # same extensions as nerdtree / neo-tree + # https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/nerdtree.lua + # https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/neo-tree.lua + sections = { + lualine_a = mkLuaInline '' + { + function() + return vim.fn.fnamemodify(vim.fn.getcwd(), ":~") + end, + } + ''; + }; + filetypes = ["snacks_picker_list" "snacks_picker_input"]; + } + ]); + } (mkIf (bCfg.enable && bCfg.lualine.winbar.enable && bCfg.source == "nvim-navic") { vim.statusline.lualine.setupOpts = { @@ -47,8 +63,8 @@ in { options = { icons_enabled = mkDefault cfg.icons.enable; theme = mkDefault cfg.theme; - component_separators = mkDefault [cfg.componentSeparator.left cfg.componentSeparator.right]; - section_separators = mkDefault [cfg.sectionSeparator.left cfg.sectionSeparator.right]; + component_separators = mkDefault cfg.componentSeparator; + section_separators = mkDefault cfg.sectionSeparator; globalstatus = mkDefault cfg.globalStatus; refresh = mkDefault cfg.refresh; always_divide_middle = mkDefault cfg.alwaysDivideMiddle; diff --git a/modules/plugins/tabline/nvim-bufferline/config.nix b/modules/plugins/tabline/nvim-bufferline/config.nix index 4989e991..965f81f0 100644 --- a/modules/plugins/tabline/nvim-bufferline/config.nix +++ b/modules/plugins/tabline/nvim-bufferline/config.nix @@ -9,7 +9,7 @@ inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.tabline.nvimBufferline; - self = import ./nvim-bufferline.nix {inherit lib;}; + self = import ./nvim-bufferline.nix {inherit config lib;}; inherit (self.options.vim.tabline.nvimBufferline) mappings; in { config = mkIf cfg.enable { diff --git a/modules/plugins/tabline/nvim-bufferline/nvim-bufferline.nix b/modules/plugins/tabline/nvim-bufferline/nvim-bufferline.nix index dc32226e..ff255c6c 100644 --- a/modules/plugins/tabline/nvim-bufferline/nvim-bufferline.nix +++ b/modules/plugins/tabline/nvim-bufferline/nvim-bufferline.nix @@ -1,4 +1,8 @@ -{lib, ...}: let +{ + config, + lib, + ... +}: let inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.types) enum bool either nullOr str int listOf attrs; inherit (lib.generators) mkLuaInline; @@ -23,7 +27,14 @@ in { setupOpts = mkPluginSetupOption "Bufferline-nvim" { highlights = mkOption { type = either attrs luaInline; - default = {}; + default = + if config.vim.theme.enable && config.vim.theme.name == "catppuccin" + then + mkLuaInline + '' + require("catppuccin.groups.integrations.bufferline").get() + '' + else {}; description = '' Overrides the highlight groups of bufferline. @@ -98,7 +109,7 @@ in { type = nullOr str; default = null; description = '' - The indicatotor icon to use for the current buffer. + The indicator icon to use for the current buffer. ::: {.warning} This **must** be omitted while style is not `icon` @@ -261,14 +272,12 @@ in { offsets = mkOption { type = listOf attrs; - default = [ - { - filetype = "NvimTree"; - text = "File Explorer"; - highlight = "Directory"; - separator = true; - } - ]; + default = map (filetype: { + inherit filetype; + text = "File Explorer"; + highlight = "Directory"; + separator = true; + }) ["NvimTree" "neo-tree" "snacks_layout_box"]; description = "The windows to offset bufferline above, see `:help bufferline-offset`"; }; diff --git a/modules/plugins/theme/supported-themes.nix b/modules/plugins/theme/supported-themes.nix index 0b5cb90b..ea858cae 100644 --- a/modules/plugins/theme/supported-themes.nix +++ b/modules/plugins/theme/supported-themes.nix @@ -2,7 +2,9 @@ config, lib, }: let - inherit (lib.strings) optionalString; + inherit (lib.strings) optionalString splitString; + inherit (lib.attrsets) mapCartesianProduct; + inherit (lib.lists) intersectLists; inherit (lib.trivial) boolToString warnIf; inherit (lib.nvim.lua) toLuaObject; in { @@ -21,9 +23,14 @@ in { ''; }; onedark = { - setup = {style ? "dark", ...}: '' + setup = { + style ? "dark", + transparent, + ... + }: '' -- OneDark theme require('onedark').setup { + transparent = ${boolToString transparent}, style = "${style}" } require('onedark').load() @@ -66,21 +73,22 @@ in { transparent_background = ${boolToString transparent}, term_colors = true, integrations = { - nvimtree = { - enabled = true, - transparent_panel = ${boolToString transparent}, - show_root = true, - }, + nvimtree = { + enabled = true, + transparent_panel = ${boolToString transparent}, + show_root = true, + }, hop = true, - gitsigns = true, - telescope = true, - treesitter = true, + gitsigns = true, + telescope = true, + treesitter = true, treesitter_context = true, - ts_rainbow = true, + ts_rainbow = true, fidget = true, alpha = true, leap = true, + lsp_saga = true, markdown = true, noice = true, notify = true, -- nvim-notify @@ -94,7 +102,7 @@ in { -- setup must be called before loading vim.cmd.colorscheme "catppuccin" ''; - styles = ["latte" "frappe" "macchiato" "mocha"]; + styles = ["auto" "latte" "frappe" "macchiato" "mocha"]; }; oxocarbon = { @@ -106,9 +114,9 @@ in { style' = warnIf (style == "light") "oxocarbon: light theme is not well-supported" style; in '' - require('oxocarbon') - vim.opt.background = "${style'}" - vim.cmd.colorscheme = "oxocarbon" + require('oxocarbon') + vim.opt.background = "${style'}" + vim.cmd.colorscheme = "oxocarbon" ${optionalString transparent '' vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) @@ -211,4 +219,85 @@ in { ''; styles = ["dark" "light" "dark_dimmed" "dark_default" "light_default" "dark_high_contrast" "light_high_contrast" "dark_colorblind" "light_colorblind" "dark_tritanopia" "light_tritanopia"]; }; + + solarized = let + backgrounds = ["light" "dark"]; + palettes = ["solarized" "selenized"]; + variants = ["spring" "summer" "autumn" "winter"]; + in { + setup = { + style ? "", # use plugin defaults + transparent ? false, + ... + }: let + parts = splitString "-" style; + detect = list: let + intersection = intersectLists parts list; + in + if intersection == [] + then null + else builtins.head intersection; + background = detect backgrounds; + palette = detect palettes; + variant = detect variants; + in '' + -- Solarized theme + require('solarized').setup { + transparent = { + enabled = ${boolToString transparent}, + }, + ${optionalString (palette != null) ''palette = "${palette}",''} + ${optionalString (variant != null) ''variant = "${variant}",''} + } + ${optionalString (background != null) ''vim.opt.background = "${background}"''} + vim.cmd.colorscheme "solarized" + ''; + styles = let + joinWithDashes = parts: lib.concatStringsSep "-" (lib.filter (s: s != "") parts); + combinations = mapCartesianProduct ({ + bg, + pal, + var, + }: + joinWithDashes [bg pal var]) { + bg = [""] ++ backgrounds; + pal = [""] ++ palettes; + var = [""] ++ variants; + }; + in + lib.filter (s: s != "") combinations; + }; + + solarized-osaka = { + setup = {transparent ? false, ...}: '' + require("solarized-osaka").setup({ + transparent = ${boolToString transparent}, + styles = { + comments = { italic = false }, + keywords = { italic = false }, + } + }) + + 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/treesitter/default.nix b/modules/plugins/treesitter/default.nix index a859f3af..ea8ac9cd 100644 --- a/modules/plugins/treesitter/default.nix +++ b/modules/plugins/treesitter/default.nix @@ -2,6 +2,7 @@ imports = [ # treesitter extras ./ts-context + ./ts-textobjects ./treesitter.nix ./config.nix diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index 322d2eb0..d761d6b3 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -24,12 +24,20 @@ in { grammars = mkOption { type = listOf package; default = []; + example = literalExpression '' + with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + regex + kdl + ]; + ''; description = '' - List of treesitter grammars to install. + List of treesitter grammars to install. For grammars to be installed properly, + you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`. + You can use `pkgs.vimPlugins.nvim-treesitter.allGrammars` to install all grammars. - For languages already supported by nvf, you may - use the {option}`vim.language..treesitter` options, which - will automatically add the required grammars to this. + For languages already supported by nvf, you may use + {option}`vim.language..treesitter` options, which will automatically add + the required grammars to this. ''; }; @@ -99,7 +107,7 @@ in { -- Disable slow treesitter highlight for large files function(lang, buf) local max_filesize = 1000 * 1024 -- 1MB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf)) if ok and stats and stats.size > max_filesize then return true end diff --git a/modules/plugins/treesitter/ts-textobjects/config.nix b/modules/plugins/treesitter/ts-textobjects/config.nix new file mode 100644 index 00000000..7a9239d1 --- /dev/null +++ b/modules/plugins/treesitter/ts-textobjects/config.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAfter; + + inherit (config.vim) treesitter; + cfg = treesitter.textobjects; +in { + config = mkIf (treesitter.enable && cfg.enable) { + vim = { + startPlugins = ["nvim-treesitter-textobjects"]; + + # set up treesitter-textobjects after Treesitter, whose config we're adding to. + pluginRC.treesitter-textobjects = entryAfter ["treesitter"] '' + require("nvim-treesitter.configs").setup({textobjects = ${toLuaObject cfg.setupOpts}}) + ''; + }; + }; +} diff --git a/modules/plugins/treesitter/ts-textobjects/default.nix b/modules/plugins/treesitter/ts-textobjects/default.nix new file mode 100644 index 00000000..d0ae48a3 --- /dev/null +++ b/modules/plugins/treesitter/ts-textobjects/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./textobjects.nix + ./config.nix + ]; +} diff --git a/modules/plugins/treesitter/ts-textobjects/textobjects.nix b/modules/plugins/treesitter/ts-textobjects/textobjects.nix new file mode 100644 index 00000000..07e72135 --- /dev/null +++ b/modules/plugins/treesitter/ts-textobjects/textobjects.nix @@ -0,0 +1,21 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.treesitter.textobjects = { + enable = mkEnableOption "Treesitter textobjects"; + setupOpts = + mkPluginSetupOption "treesitter-textobjects" {} + // { + example = { + select = { + enable = true; + lookahead = true; + keymaps = { + af = "@function.outer"; + }; + }; + }; + }; + }; +} diff --git a/modules/plugins/ui/breadcrumbs/breadcrumbs.nix b/modules/plugins/ui/breadcrumbs/breadcrumbs.nix index 2faee6c8..72351ecc 100644 --- a/modules/plugins/ui/breadcrumbs/breadcrumbs.nix +++ b/modules/plugins/ui/breadcrumbs/breadcrumbs.nix @@ -4,7 +4,7 @@ ... }: let inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) nullOr listOf enum bool str int either; + inherit (lib.types) nullOr listOf enum bool str int; inherit (lib.modules) mkRenamedOptionModule; inherit (lib.nvim.types) mkPluginSetupOption borderType; mkSimpleIconOption = default: @@ -74,7 +74,7 @@ in { ::: {.note} This will pass `draw_empty` to the `nvim_navic` winbar component, which causes the component to be drawn even - if it's empty + if it's empty. ::: ''; }; @@ -86,145 +86,163 @@ in { close = mkOption { type = str; default = ""; - description = "keybinding to close Navbuddy UI"; + description = "Close and return the cursor to its original location."; }; nextSibling = mkOption { type = str; default = "j"; - description = "keybinding to navigate to the next sibling node"; + description = "Navigate to the next sibling node."; }; previousSibling = mkOption { type = str; default = "k"; - description = "keybinding to navigate to the previous sibling node"; + description = "Navigate to the previous sibling node."; }; parent = mkOption { type = str; default = "h"; - description = "keybinding to navigate to the parent node"; + description = "Navigate to the parent node."; }; children = mkOption { type = str; default = "l"; - description = "keybinding to navigate to the child node"; + description = "Navigate to the child node."; }; root = mkOption { type = str; default = "0"; - description = "keybinding to navigate to the root node"; + description = "Navigate to the root node."; }; visualName = mkOption { type = str; default = "v"; - description = "visual selection of name"; + description = "Select the name visually."; }; visualScope = mkOption { type = str; default = "V"; - description = "visual selection of scope"; + description = "Select the scope visually."; }; yankName = mkOption { type = str; default = "y"; - description = "yank the name to system clipboard"; + description = "Yank the name to system clipboard."; }; yankScope = mkOption { type = str; default = "Y"; - description = "yank the scope to system clipboard"; + description = "Yank the scope to system clipboard."; }; insertName = mkOption { type = str; default = "i"; - description = "insert at start of name"; + description = "Insert at the start of name."; }; insertScope = mkOption { type = str; default = "I"; - description = "insert at start of scope"; + description = "Insert at the start of scope."; }; appendName = mkOption { type = str; default = "a"; - description = "insert at end of name"; + description = "Insert at the end of name."; }; appendScope = mkOption { type = str; default = "A"; - description = "insert at end of scope"; + description = "Insert at the end of scope."; }; rename = mkOption { type = str; default = "r"; - description = "rename the node"; + description = "Rename the node."; }; delete = mkOption { type = str; default = "d"; - description = "delete the node"; + description = "Delete the node."; }; foldCreate = mkOption { type = str; default = "f"; - description = "create a new fold"; + description = "Create a new fold of the node."; }; foldDelete = mkOption { type = str; default = "F"; - description = "delete the current fold"; + description = "Delete the current fold of the node."; }; comment = mkOption { type = str; default = "c"; - description = "comment the node"; + description = "Comment the node."; }; select = mkOption { type = str; default = ""; - description = "goto selected symbol"; + description = "Goto the node."; }; moveDown = mkOption { type = str; default = "J"; - description = "move focused node down"; + description = "Move the node down."; }; moveUp = mkOption { type = str; default = "K"; - description = "move focused node up"; + description = "Move the node up."; + }; + + togglePreview = mkOption { + type = str; + default = "s"; + description = "Toggle the preview."; + }; + + vsplit = mkOption { + type = str; + default = ""; + description = "Open the node in a vertical split."; + }; + + hsplit = mkOption { + type = str; + default = ""; + description = "Open the node in a horizontal split."; }; telescope = mkOption { type = str; default = "t"; - description = "fuzzy finder at current level"; + description = "Start fuzzy finder at the current level."; }; help = mkOption { type = str; default = "g?"; - description = "open mapping help window"; + description = "Open the mappings help window."; }; }; @@ -232,7 +250,7 @@ in { useDefaultMappings = mkOption { type = bool; default = true; - description = "use default Navbuddy keybindings (disables user-specified keybinds)"; + description = "Add the default Navbuddy keybindings in addition to the keybinding added by this module."; }; window = { @@ -242,13 +260,13 @@ in { border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; - description = "border style to use"; + description = "The border style to use."; }; scrolloff = mkOption { type = nullOr int; default = null; - description = "Scrolloff value within navbuddy window"; + description = "The scrolloff value within a navbuddy window."; }; sections = { @@ -265,7 +283,7 @@ in { border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; - description = "border style to use for the left section of Navbuddy UI"; + description = "The border style to use for the left section of the Navbuddy UI."; }; }; @@ -282,7 +300,7 @@ in { border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; - description = "border style to use for the middle section of Navbuddy UI"; + description = "The border style to use for the middle section of the Navbuddy UI."; }; }; @@ -292,13 +310,13 @@ in { border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; - description = "border style to use for the right section of Navbuddy UI"; + description = "The border style to use for the right section of the Navbuddy UI."; }; preview = mkOption { type = enum ["leaf" "always" "never"]; default = "leaf"; - description = "display mode of the preview on the right section"; + description = "The display mode of the preview on the right section."; }; }; }; @@ -317,13 +335,13 @@ in { auto_attach = mkOption { type = bool; default = true; - description = "Whether to attach to LSP server manually"; + description = "Whether to attach to LSP server manually."; }; preference = mkOption { type = nullOr (listOf str); default = null; - description = "list of lsp server names in order of preference"; + description = "The preference list ranking LSP servers."; }; }; @@ -331,25 +349,25 @@ in { followNode = mkOption { type = bool; default = true; - description = "keep the current node in focus on the source buffer"; + description = "Whether to keep the current node in focus in the source buffer."; }; highlight = mkOption { type = bool; default = true; - description = "highlight the currently focused node"; + description = "Whether to highlight the currently focused node in the source buffer."; }; reorient = mkOption { type = enum ["smart" "top" "mid" "none"]; default = "smart"; - description = "reorient buffer after changing nodes"; + description = "The mode for reorienting the source buffer after moving nodes."; }; scrolloff = mkOption { type = nullOr int; default = null; - description = "scrolloff value when navbuddy is open"; + description = "The scrolloff value in the source buffer when Navbuddy is open."; }; }; diff --git a/modules/plugins/ui/breadcrumbs/config.nix b/modules/plugins/ui/breadcrumbs/config.nix index 747a7773..324501a5 100644 --- a/modules/plugins/ui/breadcrumbs/config.nix +++ b/modules/plugins/ui/breadcrumbs/config.nix @@ -64,6 +64,11 @@ in { ${cfg.navbuddy.mappings.moveDown} = mkLuaInline "actions.move_down()"; ${cfg.navbuddy.mappings.moveUp} = mkLuaInline "actions.move_up()"; + ${cfg.navbuddy.mappings.togglePreview} = mkLuaInline "actions.toggle_preview()"; + + ${cfg.navbuddy.mappings.vsplit} = mkLuaInline "actions.vsplit()"; + ${cfg.navbuddy.mappings.hsplit} = mkLuaInline "actions.hsplit()"; + ${cfg.navbuddy.mappings.telescope} = mkLuaInline '' actions.telescope({ layout_strategy = "horizontal", diff --git a/modules/plugins/ui/illuminate/illuminate.nix b/modules/plugins/ui/illuminate/illuminate.nix index b910101f..4096e73c 100644 --- a/modules/plugins/ui/illuminate/illuminate.nix +++ b/modules/plugins/ui/illuminate/illuminate.nix @@ -11,7 +11,7 @@ in { setupOpts = mkPluginSetupOption "vim-illuminate" { filetypes_denylist = mkOption { type = listOf str; - default = ["dirvish" "fugitive" "NvimTree" "TelescopePrompt"]; + default = ["dirvish" "fugitive" "help" "neo-tree" "notify" "NvimTree" "TelescopePrompt"]; description = "Filetypes to not illuminate, this overrides `filetypes_allowlist`"; }; }; diff --git a/modules/plugins/utility/binds/default.nix b/modules/plugins/utility/binds/default.nix index 229423b8..43666cc9 100644 --- a/modules/plugins/utility/binds/default.nix +++ b/modules/plugins/utility/binds/default.nix @@ -2,5 +2,6 @@ _: { imports = [ ./which-key ./cheatsheet + ./hardtime ]; } diff --git a/modules/plugins/utility/binds/hardtime/config.nix b/modules/plugins/utility/binds/hardtime/config.nix new file mode 100644 index 00000000..66b1f063 --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/config.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.binds.hardtime-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["hardtime-nvim"]; + + pluginRC.hardtime = entryAnywhere '' + require("hardtime").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/utility/binds/hardtime/default.nix b/modules/plugins/utility/binds/hardtime/default.nix new file mode 100644 index 00000000..89aa11d3 --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hardtime.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/binds/hardtime/hardtime.nix b/modules/plugins/utility/binds/hardtime/hardtime.nix new file mode 100644 index 00000000..b671ddcd --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/hardtime.nix @@ -0,0 +1,10 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.binds.hardtime-nvim = { + enable = mkEnableOption "hardtime helper for no repeat keybinds"; + + setupOpts = mkPluginSetupOption "hardtime-nvim" {}; + }; +} diff --git a/modules/plugins/utility/binds/which-key/config.nix b/modules/plugins/utility/binds/which-key/config.nix index 68dbbfbf..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: 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/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index cbe776cc..349fb47a 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -15,13 +15,18 @@ ./multicursors ./new-file-template ./nix-develop + ./nvim-biscuits + ./oil-nvim ./outline ./preview + ./sleuth + ./smart-splits ./snacks-nvim ./surround ./telescope ./wakatime ./yanky-nvim ./yazi-nvim + ./undotree ]; } diff --git a/modules/plugins/utility/fzf-lua/fzf-lua.nix b/modules/plugins/utility/fzf-lua/fzf-lua.nix index c700add7..0b242864 100644 --- a/modules/plugins/utility/fzf-lua/fzf-lua.nix +++ b/modules/plugins/utility/fzf-lua/fzf-lua.nix @@ -1,15 +1,21 @@ { config, lib, + pkgs, ... }: let - inherit (lib.types) nullOr enum; + inherit (lib.types) enum str; inherit (lib.options) mkEnableOption mkOption; inherit (lib.nvim.types) mkPluginSetupOption borderType; in { options.vim.fzf-lua = { enable = mkEnableOption "fzf-lua"; setupOpts = mkPluginSetupOption "fzf-lua" { + fzf_bin = mkOption { + type = str; + default = "${lib.getExe pkgs.fzf}"; + description = "Path to fzf executable"; + }; winopts.border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; diff --git a/modules/plugins/utility/harpoon/harpoon.nix b/modules/plugins/utility/harpoon/harpoon.nix index 4478c938..6f5b8d0a 100644 --- a/modules/plugins/utility/harpoon/harpoon.nix +++ b/modules/plugins/utility/harpoon/harpoon.nix @@ -39,7 +39,7 @@ in { type = luaInline; default = mkLuaInline '' function() - return vim.loop.cwd() + return vim.uv.cwd() end ''; description = '' diff --git a/modules/plugins/utility/images/default.nix b/modules/plugins/utility/images/default.nix index 5b876e0a..1f398aa8 100644 --- a/modules/plugins/utility/images/default.nix +++ b/modules/plugins/utility/images/default.nix @@ -1,5 +1,6 @@ { imports = [ ./image-nvim + ./img-clip ]; } diff --git a/modules/plugins/utility/images/img-clip/config.nix b/modules/plugins/utility/images/img-clip/config.nix new file mode 100644 index 00000000..cadd815f --- /dev/null +++ b/modules/plugins/utility/images/img-clip/config.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.utility.images.img-clip; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [ + "img-clip" + ]; + + pluginRC.image-nvim = entryAnywhere '' + require("img-clip").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/utility/images/img-clip/default.nix b/modules/plugins/utility/images/img-clip/default.nix new file mode 100644 index 00000000..70c15604 --- /dev/null +++ b/modules/plugins/utility/images/img-clip/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./img-clip.nix + ]; +} diff --git a/modules/plugins/utility/images/img-clip/img-clip.nix b/modules/plugins/utility/images/img-clip/img-clip.nix new file mode 100644 index 00000000..ce07feae --- /dev/null +++ b/modules/plugins/utility/images/img-clip/img-clip.nix @@ -0,0 +1,11 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.images.img-clip = { + enable = mkEnableOption "img-clip to paste images into any markup language"; + + setupOpts = mkPluginSetupOption "img-clip" {}; + }; +} diff --git a/modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix b/modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix index f71da02a..feb61570 100644 --- a/modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix +++ b/modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) enum str bool; + inherit (lib.types) enum str; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) mkPluginSetupOption luaInline; in { diff --git a/modules/plugins/utility/motion/default.nix b/modules/plugins/utility/motion/default.nix index 838fec78..10074939 100644 --- a/modules/plugins/utility/motion/default.nix +++ b/modules/plugins/utility/motion/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./flash ./hop ./leap ./precognition diff --git a/modules/plugins/utility/motion/flash/config.nix b/modules/plugins/utility/motion/flash/config.nix new file mode 100644 index 00000000..83ddd0b9 --- /dev/null +++ b/modules/plugins/utility/motion/flash/config.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.binds) mkKeymap; + + cfg = config.vim.utility.motion.flash-nvim; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins = { + "flash-nvim" = { + package = "flash-nvim"; + setupModule = "flash"; + setupOpts = cfg.setupOpts; + + lazy = true; + + keys = [ + (mkKeymap ["n" "o" "x"] cfg.mappings.jump "lua require(\"flash\").jump()" {desc = "Flash";}) + (mkKeymap ["n" "o" "x"] cfg.mappings.treesitter "lua require(\"flash\").treesitter()" {desc = "Flash Treesitter";}) + (mkKeymap "o" cfg.mappings.remote "lua require(\"flash\").remote()" {desc = "Remote Flash";}) + (mkKeymap ["o" "x"] cfg.mappings.treesitter_search "lua require(\"flash\").treesitter_search()" {desc = "Treesitter Search";}) + (mkKeymap "c" cfg.mappings.toggle "lua require(\"flash\").toggle()" {desc = "Toggle Flash Search";}) + ]; + }; + }; + }; + }; +} diff --git a/modules/plugins/utility/motion/flash/default.nix b/modules/plugins/utility/motion/flash/default.nix new file mode 100644 index 00000000..5978df25 --- /dev/null +++ b/modules/plugins/utility/motion/flash/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./flash.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/motion/flash/flash.nix b/modules/plugins/utility/motion/flash/flash.nix new file mode 100644 index 00000000..825b86a0 --- /dev/null +++ b/modules/plugins/utility/motion/flash/flash.nix @@ -0,0 +1,38 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) nullOr str; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.motion.flash-nvim = { + enable = mkEnableOption "enhanced code navigation with flash.nvim"; + setupOpts = mkPluginSetupOption "flash-nvim" {}; + + mappings = { + jump = mkOption { + type = nullOr str; + default = "s"; + description = "Jump"; + }; + treesitter = mkOption { + type = nullOr str; + default = "S"; + description = "Treesitter"; + }; + remote = mkOption { + type = nullOr str; + default = "r"; + description = "Remote Flash"; + }; + treesitter_search = mkOption { + type = nullOr str; + default = "R"; + description = "Treesitter Search"; + }; + toggle = mkOption { + type = nullOr str; + default = ""; + description = "Toggle Flash Search"; + }; + }; + }; +} diff --git a/modules/plugins/utility/nvim-biscuits/config.nix b/modules/plugins/utility/nvim-biscuits/config.nix new file mode 100644 index 00000000..a0574aa6 --- /dev/null +++ b/modules/plugins/utility/nvim-biscuits/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + cfg = config.vim.utility.nvim-biscuits; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["nvim-biscuits"]; + + pluginRC.nvim-biscuits = entryAnywhere '' + require('nvim-biscuits').setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/utility/nvim-biscuits/default.nix b/modules/plugins/utility/nvim-biscuits/default.nix new file mode 100644 index 00000000..07ccecb4 --- /dev/null +++ b/modules/plugins/utility/nvim-biscuits/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./nvim-biscuits.nix + ]; +} diff --git a/modules/plugins/utility/nvim-biscuits/nvim-biscuits.nix b/modules/plugins/utility/nvim-biscuits/nvim-biscuits.nix new file mode 100644 index 00000000..3db7acea --- /dev/null +++ b/modules/plugins/utility/nvim-biscuits/nvim-biscuits.nix @@ -0,0 +1,10 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.nvim-biscuits = { + enable = mkEnableOption "a Neovim port of Assorted Biscuits [nvim-biscuits]"; + + setupOpts = mkPluginSetupOption "nvim-biscuits" {}; + }; +} diff --git a/modules/plugins/utility/oil-nvim/config.nix b/modules/plugins/utility/oil-nvim/config.nix new file mode 100644 index 00000000..dca4de60 --- /dev/null +++ b/modules/plugins/utility/oil-nvim/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.utility.oil-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["oil-nvim"]; + pluginRC.oil-nvim = entryAnywhere '' + require("oil").setup(${toLuaObject cfg.setupOpts}); + ''; + }; + }; +} diff --git a/modules/plugins/utility/oil-nvim/default.nix b/modules/plugins/utility/oil-nvim/default.nix new file mode 100644 index 00000000..1b771b07 --- /dev/null +++ b/modules/plugins/utility/oil-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./oil-nvim.nix + ]; +} diff --git a/modules/plugins/utility/oil-nvim/oil-nvim.nix b/modules/plugins/utility/oil-nvim/oil-nvim.nix new file mode 100644 index 00000000..557f3db6 --- /dev/null +++ b/modules/plugins/utility/oil-nvim/oil-nvim.nix @@ -0,0 +1,12 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.oil-nvim = { + enable = mkEnableOption '' + Neovim file explorer: edit your filesystem like a buffer [oil-nvim] + ''; + + setupOpts = mkPluginSetupOption "oil-nvim" {}; + }; +} diff --git a/modules/plugins/utility/sleuth/config.nix b/modules/plugins/utility/sleuth/config.nix new file mode 100644 index 00000000..d25cc140 --- /dev/null +++ b/modules/plugins/utility/sleuth/config.nix @@ -0,0 +1,10 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + cfg = config.vim.utility.sleuth; +in { + vim.startPlugins = mkIf cfg.enable ["vim-sleuth"]; +} diff --git a/modules/plugins/utility/sleuth/default.nix b/modules/plugins/utility/sleuth/default.nix new file mode 100644 index 00000000..04cb4158 --- /dev/null +++ b/modules/plugins/utility/sleuth/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./sleuth.nix + ]; +} diff --git a/modules/plugins/utility/sleuth/sleuth.nix b/modules/plugins/utility/sleuth/sleuth.nix new file mode 100644 index 00000000..a86d414d --- /dev/null +++ b/modules/plugins/utility/sleuth/sleuth.nix @@ -0,0 +1,7 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.sleuth.enable = mkEnableOption '' + automatically adjusting options such as `shiftwidth` or `expandtab`, using `vim-sleuth` + ''; +} diff --git a/modules/plugins/utility/smart-splits/config.nix b/modules/plugins/utility/smart-splits/config.nix new file mode 100644 index 00000000..82c43bac --- /dev/null +++ b/modules/plugins/utility/smart-splits/config.nix @@ -0,0 +1,50 @@ +{ + config, + options, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.utility.smart-splits; + inherit (options.vim.utility.smart-splits) keymaps; + mkSmartSplitKey = act: let + key = cfg.keymaps.${act}; + in + lib.optional (key != null) { + inherit key; + desc = keymaps.${act}.description; + action = ''function() require('smart-splits').${act}() end''; + mode = "n"; + lua = true; + }; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins.smart-splits = { + package = "smart-splits"; + setupModule = "smart-splits"; + inherit (cfg) setupOpts; + + # plugin needs to be loaded right after startup so that the multiplexer detects vim running in the pane + event = ["DeferredUIEnter"]; + + keys = lib.flatten [ + (mkSmartSplitKey "resize_left") + (mkSmartSplitKey "resize_down") + (mkSmartSplitKey "resize_up") + (mkSmartSplitKey "resize_right") + (mkSmartSplitKey "move_cursor_left") + (mkSmartSplitKey "move_cursor_down") + (mkSmartSplitKey "move_cursor_up") + (mkSmartSplitKey "move_cursor_right") + (mkSmartSplitKey "move_cursor_previous") + (mkSmartSplitKey "swap_buf_left") + (mkSmartSplitKey "swap_buf_down") + (mkSmartSplitKey "swap_buf_up") + (mkSmartSplitKey "swap_buf_right") + ]; + }; + }; + }; +} diff --git a/modules/plugins/utility/smart-splits/default.nix b/modules/plugins/utility/smart-splits/default.nix new file mode 100644 index 00000000..2b38462e --- /dev/null +++ b/modules/plugins/utility/smart-splits/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./smart-splits.nix + ]; +} diff --git a/modules/plugins/utility/smart-splits/smart-splits.nix b/modules/plugins/utility/smart-splits/smart-splits.nix new file mode 100644 index 00000000..dd5c55a3 --- /dev/null +++ b/modules/plugins/utility/smart-splits/smart-splits.nix @@ -0,0 +1,37 @@ +{lib, ...}: let + inherit (lib.options) mkOption; + inherit (lib.types) bool; + inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.nvim.binds) mkMappingOption; +in { + options.vim.utility.smart-splits = { + enable = mkOption { + type = bool; + default = false; + description = '' + Whether to enable smart-splits.nvim, a Neovim plugin for smart, + seamless, directional navigation and resizing of splits. + + Supports tmux, Wezterm, Kitty, and Zellij multiplexer integrations. + ''; + }; + + setupOpts = mkPluginSetupOption "smart-splits" {}; + + keymaps = { + resize_left = mkMappingOption "Resize Window/Pane Left" ""; + resize_down = mkMappingOption "Resize Window/Pane Down" ""; + resize_up = mkMappingOption "Resize Window/Pane Up" ""; + resize_right = mkMappingOption "Resize Window/Pane Right" ""; + move_cursor_left = mkMappingOption "Focus Window/Pane on the Left" ""; + move_cursor_down = mkMappingOption "Focus Window/Pane Below" ""; + move_cursor_up = mkMappingOption "Focus Window/Pane Above" ""; + move_cursor_right = mkMappingOption "Focus Window/Pane on the Right" ""; + move_cursor_previous = mkMappingOption "Focus Previous Window/Pane" ""; + swap_buf_left = mkMappingOption "Swap Buffer Left" "h"; + swap_buf_down = mkMappingOption "Swap Buffer Down" "j"; + swap_buf_up = mkMappingOption "Swap Buffer Up" "k"; + swap_buf_right = mkMappingOption "Swap Buffer Right" "l"; + }; + }; +} diff --git a/modules/plugins/utility/telescope/config.nix b/modules/plugins/utility/telescope/config.nix index 95f81327..73d5e517 100644 --- a/modules/plugins/utility/telescope/config.nix +++ b/modules/plugins/utility/telescope/config.nix @@ -5,8 +5,8 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.strings) optionalString; - inherit (lib.lists) optionals; + inherit (lib.strings) optionalString concatMapStringsSep; + inherit (lib.lists) optionals concatLists; inherit (lib.nvim.binds) pushDownDefault mkKeymap; cfg = config.vim.telescope; @@ -16,7 +16,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["plenary-nvim"]; + startPlugins = ["plenary-nvim"] ++ concatLists (map (x: x.packages) cfg.extensions); lazy.plugins.telescope = { package = "telescope"; @@ -28,11 +28,14 @@ in { vim.g.loaded_telescope = nil ''; - after = '' + after = let + enabledExtensions = map (x: x.name) cfg.extensions; + in '' local telescope = require("telescope") ${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"} ${optionalString config.vim.notify.nvim-notify.enable "telescope.load_extension('notify')"} ${optionalString config.vim.projects.project-nvim.enable "telescope.load_extension('projects')"} + ${concatMapStringsSep "\n" (x: "telescope.load_extension('${x}')") enabledExtensions} ''; cmd = ["Telescope"]; diff --git a/modules/plugins/utility/telescope/telescope.nix b/modules/plugins/utility/telescope/telescope.nix index beacc990..9ed6f263 100644 --- a/modules/plugins/utility/telescope/telescope.nix +++ b/modules/plugins/utility/telescope/telescope.nix @@ -1,12 +1,15 @@ { + config, pkgs, lib, ... }: let - inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) int str listOf float bool either enum submodule attrsOf; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) int str listOf float bool either enum submodule attrsOf anything package; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.types) mkPluginSetupOption luaInline; + + cfg = config.vim.telescope; setupOptions = { pickers.find_files.find_command = mkOption { description = "cmd to use for finding files"; @@ -16,10 +19,6 @@ defaults = { vimgrep_arguments = mkOption { - description = '' - Defines the command that will be used for `live_grep` and `grep_string` pickers. - Make sure that color is set to `never` because telescope does not yet interpret color codes. - ''; type = listOf str; default = [ "${pkgs.ripgrep}/bin/rg" @@ -32,114 +31,169 @@ "--hidden" "--no-ignore" ]; + + description = '' + Defines the command that will be used for `live_grep` and `grep_string` pickers. + Make sure that color is set to `never` because telescope does not yet interpret color codes. + ''; }; + + pickers.find_command = mkOption { + type = either (listOf str) luaInline; + default = ["${pkgs.fd}/bin/fd"]; + description = '' + Command to use for finding files. If using an executable from {env}`PATH` then you must + make sure that the package is available in [](#opt-vim.extraPackages). + ''; + }; + prompt_prefix = mkOption { - description = "Shown in front of Telescope's prompt"; type = str; default = "  "; + description = "Shown in front of Telescope's prompt"; }; + selection_caret = mkOption { + type = str; + default = " "; description = "Character(s) to show in front of the current selection"; - type = str; - default = " "; }; + entry_prefix = mkOption { - description = "Prefix in front of each result entry. Current selection not included."; type = str; default = " "; + description = "Prefix in front of each result entry. Current selection not included."; }; + initial_mode = mkOption { - description = "Determines in which mode telescope starts."; type = enum ["insert" "normal"]; default = "insert"; + description = "Determines in which mode telescope starts."; }; + selection_strategy = mkOption { - description = "Determines how the cursor acts after each sort iteration."; type = enum ["reset" "follow" "row" "closest" "none"]; default = "reset"; + description = "Determines how the cursor acts after each sort iteration."; }; + sorting_strategy = mkOption { - description = ''Determines the direction "better" results are sorted towards.''; type = enum ["descending" "ascending"]; default = "ascending"; + description = ''Determines the direction "better" results are sorted towards.''; }; + layout_strategy = mkOption { - description = "Determines the default layout of Telescope pickers. See `:help telescope.layout`."; type = str; default = "horizontal"; + description = "Determines the default layout of Telescope pickers. See `:help telescope.layout`."; }; + layout_config = mkOption { - description = '' - Determines the default configuration values for layout strategies. - See telescope.layout for details of the configurations options for - each strategy. - ''; default = {}; type = submodule { options = { horizontal = { prompt_position = mkOption { - description = ""; - type = str; + type = enum ["top" "bottom"]; default = "top"; + description = "Where to place prompt window"; }; + preview_width = mkOption { - description = ""; type = float; default = 0.55; + description = "Change the width of Telescope's preview window"; }; }; + vertical = { mirror = mkOption { - description = ""; type = bool; default = false; + description = "Flip the location of the results/prompt and preview windows"; }; }; + width = mkOption { - description = ""; type = float; default = 0.8; + description = "How wide to make Telescope's entire layout"; }; + height = mkOption { - description = ""; type = float; default = 0.8; + description = "How tall to make Telescope's entire layout"; }; + preview_cutoff = mkOption { - description = ""; type = int; default = 120; + description = "When lines are less than this value, the preview will be disabled"; }; }; }; + + description = '' + Determines the default configuration values for layout strategies. + See `telescope.layout` for details of the configurations options for + each strategy. + ''; }; + file_ignore_patterns = mkOption { - description = "A table of lua regex that define the files that should be ignored."; type = listOf str; - default = ["node_modules" ".git/" "dist/" "build/" "target/" "result/"]; - }; - color_devicons = mkOption { - description = "Boolean if devicons should be enabled or not."; - type = bool; - default = true; + default = ["node_modules" "%.git/" "dist/" "build/" "target/" "result/"]; + description = "File patterns to omit from Telescope results"; }; + + color_devicons = mkEnableOption "colored devicons"; + path_display = mkOption { - description = "Determines how file paths are displayed."; type = listOf (enum ["hidden" "tail" "absolute" "smart" "shorten" "truncate"]); default = ["absolute"]; + description = "Determines how file paths are displayed."; }; + set_env = mkOption { - description = "Set an environment for term_previewer"; type = attrsOf str; - default = { - COLORTERM = "truecolor"; - }; + default = {COLORTERM = "truecolor";}; + description = "Set an environment for term_previewer"; }; + winblend = mkOption { - description = "pseudo-transparency of keymap hints floating window"; type = int; default = 0; + description = "Pseudo-transparency of keymap hints floating window"; + }; + + extensions = mkOption { + type = attrsOf anything; + default = builtins.foldl' (acc: x: acc // (x.setup or {})) {} cfg.extensions; + description = "Attribute set containing per-extension settings for Telescope"; + }; + }; + }; + + extensionOpts = { + options = { + name = mkOption { + type = str; + description = "Name of the extension, will be used to load it with a `require`"; + }; + + packages = mkOption { + type = listOf (either str package); + default = []; + description = "Package or packages providing the Telescope extension to be loaded."; + }; + + setup = mkOption { + type = attrsOf anything; + default = {}; + example = {fzf = {fuzzy = true;};}; + description = "Named attribute set to be inserted into Telescope's extensions table."; }; }; }; @@ -174,5 +228,24 @@ in { enable = mkEnableOption "telescope.nvim: multi-purpose search and picker utility"; setupOpts = mkPluginSetupOption "Telescope" setupOptions; + + extensions = mkOption { + type = listOf (submodule extensionOpts); + default = []; + example = literalExpression '' + [ + { + name = "fzf"; + packages = [pkgs.vimPlugins.telescope-fzf-native-nvim]; + setup = {fzf = {fuzzy = true;};}; + } + ] + ''; + description = '' + Individual extension configurations containing **name**, **packages** and **setup** + fields to resolve dependencies, handle `load_extension` calls and add the `setup` + table into the `extensions` portion of Telescope's setup table. + ''; + }; }; } diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix new file mode 100644 index 00000000..06343e6a --- /dev/null +++ b/modules/plugins/utility/undotree/config.nix @@ -0,0 +1,22 @@ +{ + lib, + config, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.utility.undotree; +in { + config = mkIf cfg.enable { + vim.lazy.plugins.undotree = { + package = "undotree"; + cmd = [ + "UndotreeToggle" + "UndotreeShow" + "UndotreeHide" + "UndotreePersistUndo" + "UndotreeFocus" + ]; + }; + }; +} diff --git a/modules/plugins/utility/undotree/default.nix b/modules/plugins/utility/undotree/default.nix new file mode 100644 index 00000000..012d8454 --- /dev/null +++ b/modules/plugins/utility/undotree/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./undotree.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/undotree/undotree.nix b/modules/plugins/utility/undotree/undotree.nix new file mode 100644 index 00000000..70846737 --- /dev/null +++ b/modules/plugins/utility/undotree/undotree.nix @@ -0,0 +1,7 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.undotree = { + enable = mkEnableOption "undo history visualizer for Vim [undotree]"; + }; +} diff --git a/modules/plugins/utility/yanky-nvim/config.nix b/modules/plugins/utility/yanky-nvim/config.nix index 4a74fa75..c5e89477 100644 --- a/modules/plugins/utility/yanky-nvim/config.nix +++ b/modules/plugins/utility/yanky-nvim/config.nix @@ -32,7 +32,7 @@ in { assertions = [ { - assertion = usingShada && ((config.vim.options.shada or "") == ""); + assertion = usingShada -> (config.vim.options.shada or "") != ""; message = '' Yanky.nvim is configured to use 'shada' for the storage backend, but shada is disabled in 'vim.options'. Please re-enable shada, or switch to a different backend. diff --git a/modules/plugins/visuals/cinnamon-nvim/cinnamon-nvim.nix b/modules/plugins/visuals/cinnamon-nvim/cinnamon-nvim.nix index 109b06f0..2173e3be 100644 --- a/modules/plugins/visuals/cinnamon-nvim/cinnamon-nvim.nix +++ b/modules/plugins/visuals/cinnamon-nvim/cinnamon-nvim.nix @@ -1,7 +1,7 @@ {lib, ...}: let inherit (lib.modules) mkRemovedOptionModule; inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) submodule attrs attrsOf; + inherit (lib.types) attrs; inherit (lib.nvim.types) mkPluginSetupOption; in { imports = [ diff --git a/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix b/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix index 2796a5e6..6ff22614 100644 --- a/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix +++ b/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.modules) mkRenamedOptionModule; inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.types) nullOr attrsOf attrs enum; diff --git a/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix b/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix index 3fed4a64..4f316cf3 100644 --- a/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix +++ b/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 3b147571..a1807388 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -7,23 +7,20 @@ }: let inherit (pkgs) vimPlugins; inherit (lib.trivial) flip; - inherit (builtins) path filter isString; + inherit (builtins) filter isString hasAttr getAttr; - getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; + getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {}); noBuildPlug = pname: let pin = getPin pname; - version = pin.revision or "dirty"; - in { - # vim.lazy.plugins relies on pname, so we only set that here - # version isn't needed for anything, but inherit it anyway for correctness - inherit pname version; - outPath = path { - name = "${pname}-0-unstable-${version}"; - path = pin.outPath; + version = builtins.substring 0 8 pin.revision; + in + pin.outPath.overrideAttrs { + inherit pname version; + name = "${pname}-${version}"; + + passthru.vimPlugin = false; }; - passthru.vimPlugin = false; - }; # build a vim plugin with the given name and arguments # if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug @@ -51,28 +48,34 @@ doCheck = false; }; - inherit (inputs.self.legacyPackages.${pkgs.stdenv.system}) blink-cmp; + inherit (inputs.self.packages.${pkgs.stdenv.system}) blink-cmp avante-nvim; }; buildConfigPlugins = plugins: map (plug: if (isString plug) - then pluginBuilders.${plug} or (noBuildPlug plug) + then + if hasAttr plug config.vim.pluginOverrides + then + (let + plugin = config.vim.pluginOverrides.${plug}; + in + if (lib.isType "flake" plugin) + then plugin // {name = plug;} + else plugin) + else pluginBuilders.${plug} or (noBuildPlug plug) else plug) ( filter (f: f != null) plugins ); - # built (or "normalized") plugins that are modified - builtStartPlugins = buildConfigPlugins config.vim.startPlugins; - builtOptPlugins = map (package: package // {optional = true;}) ( - buildConfigPlugins config.vim.optPlugins - ); - # Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to # generate a wrapped Neovim package. - neovim-wrapped = inputs.mnw.lib.wrap pkgs { + neovim-wrapped = inputs.mnw.lib.wrap {inherit pkgs;} { neovim = config.vim.package; - plugins = builtStartPlugins ++ builtOptPlugins; + plugins = { + start = buildConfigPlugins config.vim.startPlugins; + opt = buildConfigPlugins config.vim.optPlugins; + }; appName = "nvf"; extraBinPath = config.vim.extraPackages; initLua = config.vim.builtLuaConfigRC; diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index ff8a4585..77a62d58 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -5,7 +5,7 @@ }: let inherit (builtins) map mapAttrs filter; inherit (lib.attrsets) mapAttrsToList; - inherit (lib.strings) concatLines concatMapStringsSep; + inherit (lib.strings) concatLines concatMapStringsSep optionalString; inherit (lib.trivial) showWarnings; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere; @@ -72,6 +72,14 @@ in { dag = cfg.luaConfigRC; mapResult = result: concatLines [ + (optionalString (cfg.additionalRuntimePaths != []) '' + vim.opt.runtimepath:append(${toLuaObject cfg.additionalRuntimePaths}) + '') + (optionalString cfg.enableLuaLoader '' + if vim.loader then + vim.loader.enable() + end + '') cfg.luaConfigPre (concatMapStringsSep "\n" mkLuarcSection result) cfg.luaConfigPost diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 4cd3026f..c0bb6915 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -1,15 +1,7 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkOption literalMD literalExpression; - inherit (lib.strings) optionalString; inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything; inherit (lib.nvim.types) dagOf; - inherit (lib.nvim.lua) listToLuaTable; - - cfg = config.vim; in { options.vim = { enableLuaLoader = mkOption { @@ -19,13 +11,14 @@ in { description = '' [official documentation]: https://neovim.io/doc/user/lua.html#vim.loader.enable() - the experimental Lua module loader to speed up the start up process + Whether to enable the experimental Lua module loader to speed up the start + up process. If `true`, this will enable the experimental Lua module loader + which: - If `true`, this will enable the experimental Lua module loader which: - - overrides loadfile - - adds the lua loader using the byte-compilation cache - - adds the libs loader - - removes the default Neovim loader + * overrides loadfile + * adds the lua loader using the byte-compilation cache + * adds the libs loader + * removes the default Neovim loader ::: {.note} The Lua module loader is *disabled* by default. Before setting this option, please @@ -40,32 +33,33 @@ in { default = []; example = literalExpression '' [ - # absolute path, as a string - impure + # Absolute path, as a string. This is the impure option. "$HOME/.config/nvim-extra" - # relative path, as a path - pure + # Relative path inside your configuration. If your config + # is version controlled, then this is pure and reproducible. ./nvim - # source type path - pure and reproducible - (builtins.source { - path = ./runtime; - name = "nvim-runtime"; + # Source type path. This pure and reproducible. + # See `:doc builtins.path` inside a Nix repl for more options. + (builtins.path { + path = ./runtime; # this must be a relative path + name = "nvim-runtime"; # name is arbitrary }) ] ''; description = '' - Additional runtime paths that will be appended to the - active runtimepath of the Neovim. This can be used to - add additional lookup paths for configs, plugins, spell - languages and other things you would generally place in - your {file}`$HOME/.config/nvim`. + Additional runtime paths that will be appended to the active + runtimepath of the Neovim. This can be used to add additional + lookup paths for configs, plugins, spell languages and other + things you would generally place in your {file}`$HOME/.config/nvim`. - This is meant as a declarative alternative to throwing - files into {file}`~/.config/nvim` and having the Neovim - wrapper pick them up. For more details on - `vim.o.runtimepath`, and what paths to use; please see - [the official documentation](https://neovim.io/doc/user/options.html#'runtimepath') + This is meant as a declarative alternative to throwing files into + {file}`~/.config/nvim` and having the Neovim wrapper pick them up. + + For more details on `vim.o.runtimepath`, and what paths to use, please see + [the official documentation](https://neovim.io/doc/user/options.html#'runtimepath'). ''; }; @@ -74,13 +68,13 @@ in { default = []; example = literalExpression '' [ - # absolute path, as a string - impure + # Absolute path, as a string - impure "$HOME/.config/nvim/my-lua-file.lua" - # relative path, as a path - pure + # Relative path, as a path - pure ./nvim/my-lua-file.lua - # source type path - pure and reproducible + # Source type path - pure and reproducible (builtins.path { path = ./nvim/my-lua-file.lua; name = "my-lua-file"; @@ -89,9 +83,10 @@ in { ''; description = '' - Additional lua files that will be sourced by Neovim. - Takes both absolute and relative paths, all of which - will be called via the `luafile` command in Neovim. + Additional Lua files that will be sourced by Neovim. + + Takes both absolute and relative paths, all of which will be called + via the `luafile` command in Neovim. See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands) on the Neovim documentation for more details. @@ -286,21 +281,7 @@ in { luaConfigPre = mkOption { type = str; - default = '' - ${optionalString (cfg.additionalRuntimePaths != []) '' - -- The following list is generated from `vim.additionalRuntimePaths` - -- and is used to append additional runtime paths to the - -- `runtimepath` option. - vim.opt.runtimepath:append(${listToLuaTable cfg.additionalRuntimePaths}) - ''} - - ${optionalString cfg.enableLuaLoader '' - if vim.loader then - vim.loader.enable() - end - ''} - ''; - + default = ""; defaultText = literalMD '' By default, this option will **append** paths in [](#opt-vim.additionalRuntimePaths) diff --git a/npins/sources.json b/npins/sources.json index 77f5a460..010dd3ce 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -9,9 +9,9 @@ }, "branch": "master", "submodules": false, - "revision": "9ebc13583cff447f5493a63e99dfca526b3c3088", - "url": "https://github.com/stevearc/aerial.nvim/archive/9ebc13583cff447f5493a63e99dfca526b3c3088.tar.gz", - "hash": "17mjs95jnnvsg1ihwbsa3z6hr88rvfh36pv1x4cad7hsaal3dcrg" + "revision": "5c0df1679bf7c814c924dc6646cc5291daca8363", + "url": "https://github.com/stevearc/aerial.nvim/archive/5c0df1679bf7c814c924dc6646cc5291daca8363.tar.gz", + "hash": "1dhsg3bli32d0p36c9f1i95p7h9hn5czr1zwlcd3v926qzj9wp1j" }, "alpha-nvim": { "type": "Git", @@ -22,9 +22,22 @@ }, "branch": "main", "submodules": false, - "revision": "de72250e054e5e691b9736ee30db72c65d560771", - "url": "https://github.com/goolord/alpha-nvim/archive/de72250e054e5e691b9736ee30db72c65d560771.tar.gz", - "hash": "0c1jkhxamfn2md7m1r5b2wpxa26y90b98yzjwf68m3fymalvkn5h" + "revision": "2b3cbcdd980cae1e022409289245053f62fb50f6", + "url": "https://github.com/goolord/alpha-nvim/archive/2b3cbcdd980cae1e022409289245053f62fb50f6.tar.gz", + "hash": "1ngim3ia9qbv1sxkscryvbn8xkw95rna5iy724yxgnq5sqxxg1jc" + }, + "avante-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "yetone", + "repo": "avante.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "5e4eb8652b4776f139282a343f04a3a8c7f23cb0", + "url": "https://github.com/yetone/avante.nvim/archive/5e4eb8652b4776f139282a343f04a3a8c7f23cb0.tar.gz", + "hash": "09wjj3akgw19p3j4zck4npj5xyc5rjvjn8w5nhwhbkzvd0il2smf" }, "base16": { "type": "Git", @@ -35,25 +48,9 @@ }, "branch": "master", "submodules": false, - "revision": "3f13e15c53ea2aaf79c24ceab725309d87f0619c", - "url": "https://github.com/rrethy/base16-nvim/archive/3f13e15c53ea2aaf79c24ceab725309d87f0619c.tar.gz", - "hash": "1z6pdf707r2rpmzi057dhcmd045695v03215asn1hdn8r294zcmg" - }, - "blink-cmp": { - "type": "GitRelease", - "repository": { - "type": "GitHub", - "owner": "saghen", - "repo": "blink.cmp" - }, - "pre_releases": false, - "version_upper_bound": null, - "release_prefix": null, - "submodules": false, - "version": "v1.0.0", - "revision": "47be01b7424d386fc3294de7838fb9134f74b228", - "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v1.0.0", - "hash": "04mjgyfcin134g9w3ag3gy6vppmh8cqq0g9whyq407fx6rjmgvfi" + "revision": "aa923daec4e778cd31ccfb0dcf083aff3c442159", + "url": "https://github.com/rrethy/base16-nvim/archive/aa923daec4e778cd31ccfb0dcf083aff3c442159.tar.gz", + "hash": "11aprmrby37gfkvk568j44d2pz4p2ppll4jlbx4ysfyshwg1zzb0" }, "blink-cmp-spell": { "type": "Git", @@ -64,9 +61,9 @@ }, "branch": "master", "submodules": false, - "revision": "782bc76be09c0c5dd08e3edd04e4ec1054c3158e", - "url": "https://github.com/ribru17/blink-cmp-spell/archive/782bc76be09c0c5dd08e3edd04e4ec1054c3158e.tar.gz", - "hash": "13adgj9qxfmbwzvx348kpkm70h0jli9qv3bqhkwh8p6zkfajm607" + "revision": "2bd0e0d5e7735c047e72b6918a0458f3e8fadaba", + "url": "https://github.com/ribru17/blink-cmp-spell/archive/2bd0e0d5e7735c047e72b6918a0458f3e8fadaba.tar.gz", + "hash": "1h84kmyxnyq9nrv3z6rvsfiabx2cdl54h86r5xxs5zacaygpha67" }, "blink-compat": { "type": "Git", @@ -77,9 +74,9 @@ }, "branch": "main", "submodules": false, - "revision": "2ed6d9a28b07fa6f3bface818470605f8896408c", - "url": "https://github.com/saghen/blink.compat/archive/2ed6d9a28b07fa6f3bface818470605f8896408c.tar.gz", - "hash": "009475xy41l4dpayswhx65q6a7djzw7rz2ycbrbpyg041y0qynqs" + "revision": "1454f14a8d855a578ceeba77c62538fa1459a67c", + "url": "https://github.com/saghen/blink.compat/archive/1454f14a8d855a578ceeba77c62538fa1459a67c.tar.gz", + "hash": "132w0z919fvj5wmjyfkpr59f6pidg522l4hsf2c03033d3xh5i0h" }, "blink-emoji-nvim": { "type": "Git", @@ -90,9 +87,9 @@ }, "branch": "master", "submodules": false, - "revision": "a77aebc092ebece1eed108f301452ae774d6b67a", - "url": "https://github.com/moyiz/blink-emoji.nvim/archive/a77aebc092ebece1eed108f301452ae774d6b67a.tar.gz", - "hash": "0n4qv2mk7zx910gnwf9ri2w5qxwx8szx99nqqzik4yyvl4axm41d" + "revision": "f22ce8cac02a6ece05368220f1e38bd34fe376f9", + "url": "https://github.com/moyiz/blink-emoji.nvim/archive/f22ce8cac02a6ece05368220f1e38bd34fe376f9.tar.gz", + "hash": "1vnx779arsm4n1sjjwhraczp07am0i2n4m13jqv7ij01vd4c9wd4" }, "blink-ripgrep-nvim": { "type": "Git", @@ -103,9 +100,9 @@ }, "branch": "main", "submodules": false, - "revision": "d4af981745ea67b2c29bcd25f9843dbeedc580ed", - "url": "https://github.com/mikavilpas/blink-ripgrep.nvim/archive/d4af981745ea67b2c29bcd25f9843dbeedc580ed.tar.gz", - "hash": "1xjhpp9118bgpp2x3pxv0llngkm69fzxhdqp92civ19s5pxb5h5y" + "revision": "1d467aa090044b65781f81dee7564fb5d3cfd96b", + "url": "https://github.com/mikavilpas/blink-ripgrep.nvim/archive/1d467aa090044b65781f81dee7564fb5d3cfd96b.tar.gz", + "hash": "1jvr80b7m5v2bybzypq1r4nfxp6nxakld10qx50gzrbs29rfhi82" }, "bufdelete-nvim": { "type": "Git", @@ -129,9 +126,9 @@ }, "branch": "main", "submodules": false, - "revision": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429", - "url": "https://github.com/catppuccin/nvim/archive/5b5e3aef9ad7af84f463d17b5479f06b87d5c429.tar.gz", - "hash": "0jmrwag2dx4b1g9x32xwxcr8y0l159hqks09z5miy99wav6dy7z2" + "revision": "702d15f269777b8261f3b8904fb0db35f37a1cd9", + "url": "https://github.com/catppuccin/nvim/archive/702d15f269777b8261f3b8904fb0db35f37a1cd9.tar.gz", + "hash": "0lq4y8kvp0zavjb9yk25nkw2ldx4dzraa96cn87392zzs67hl75l" }, "ccc-nvim": { "type": "Git", @@ -142,9 +139,9 @@ }, "branch": "main", "submodules": false, - "revision": "b57cbaf8db3ac43c56c9e2c7f3812944638260ed", - "url": "https://github.com/uga-rosa/ccc.nvim/archive/b57cbaf8db3ac43c56c9e2c7f3812944638260ed.tar.gz", - "hash": "0ixqbsag43pyrvj0i9dkn28j7b2v0c75rljnw57bjl6nwz2aqxg7" + "revision": "9d1a256e006decc574789dfc7d628ca11644d4c2", + "url": "https://github.com/uga-rosa/ccc.nvim/archive/9d1a256e006decc574789dfc7d628ca11644d4c2.tar.gz", + "hash": "0a2fc4bw88kf1dpp0k07aj8i9qp0xcnz1fvrxdkhz0fxddb7qdnx" }, "cellular-automaton-nvim": { "type": "Git", @@ -207,8 +204,8 @@ }, "branch": "main", "submodules": false, - "revision": "3022dbc9166796b644a841a02de8dd1cc1d311fa", - "url": "https://github.com/hrsh7th/cmp-buffer/archive/3022dbc9166796b644a841a02de8dd1cc1d311fa.tar.gz", + "revision": "b74fab3656eea9de20a9b8116afa3cfc4ec09657", + "url": "https://github.com/hrsh7th/cmp-buffer/archive/b74fab3656eea9de20a9b8116afa3cfc4ec09657.tar.gz", "hash": "1cwx8ky74633y0bmqmvq1lqzmphadnhzmhzkddl3hpb7rgn18vkl" }, "cmp-luasnip": { @@ -233,8 +230,8 @@ }, "branch": "main", "submodules": false, - "revision": "99290b3ec1322070bcfb9e846450a46f6efa50f0", - "url": "https://github.com/hrsh7th/cmp-nvim-lsp/archive/99290b3ec1322070bcfb9e846450a46f6efa50f0.tar.gz", + "revision": "a8912b88ce488f411177fc8aed358b04dc246d7b", + "url": "https://github.com/hrsh7th/cmp-nvim-lsp/archive/a8912b88ce488f411177fc8aed358b04dc246d7b.tar.gz", "hash": "08q5mf5jrqjjcl1s4h9zj2vd1kcizz0a5a6p65wv1rc5s1fa3a49" }, "cmp-path": { @@ -246,9 +243,9 @@ }, "branch": "main", "submodules": false, - "revision": "91ff86cd9c29299a64f968ebb45846c485725f23", - "url": "https://github.com/hrsh7th/cmp-path/archive/91ff86cd9c29299a64f968ebb45846c485725f23.tar.gz", - "hash": "18ixx14ibc7qrv32nj0ylxrx8w4ggg49l5vhcqd35hkp4n56j6mn" + "revision": "e52e640b7befd8113b3350f46e8cfcfe98fcf730", + "url": "https://github.com/hrsh7th/cmp-path/archive/e52e640b7befd8113b3350f46e8cfcfe98fcf730.tar.gz", + "hash": "1d3l62jvrdxqwiyi4ffyc871bh643n43bgi2n2lib9mx593qsli9" }, "cmp-treesitter": { "type": "Git", @@ -272,9 +269,9 @@ }, "branch": "main", "submodules": false, - "revision": "51fe5a782dbbd5cad8189420cb8d38fd7c245684", - "url": "https://github.com/olimorris/codecompanion.nvim/archive/51fe5a782dbbd5cad8189420cb8d38fd7c245684.tar.gz", - "hash": "09vjvbf5rxmj2fax0ddcinbvx6mhjdy58fw9d1nf8ll7x8dj5j2s" + "revision": "0a5c13c97d93307c05652ea182a4b4dcea54d4a0", + "url": "https://github.com/olimorris/codecompanion.nvim/archive/0a5c13c97d93307c05652ea182a4b4dcea54d4a0.tar.gz", + "hash": "1y8f7xc015a4ix2m6f62f087lhk3qc0dj4qjhr6q4ki13qhsnjsz" }, "codewindow-nvim": { "type": "Git", @@ -285,9 +282,9 @@ }, "branch": "master", "submodules": false, - "revision": "dd7017617962943eb1d152fc58940f11c6775a4a", - "url": "https://github.com/gorbit99/codewindow.nvim/archive/dd7017617962943eb1d152fc58940f11c6775a4a.tar.gz", - "hash": "1kxkf50rkqrzqz03jvygbwxb1yfmqh0gskr00vpmyrq51569a2hw" + "revision": "a8e175043ce3baaa89e0a6b5171bcd920aab3dad", + "url": "https://github.com/gorbit99/codewindow.nvim/archive/a8e175043ce3baaa89e0a6b5171bcd920aab3dad.tar.gz", + "hash": "12nsdynpym15fl9qwjzlzhxr2mbpa0l6sp2r1rrc300jr59q0gkr" }, "colorful-menu-nvim": { "type": "Git", @@ -324,9 +321,9 @@ }, "branch": "master", "submodules": false, - "revision": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5", - "url": "https://github.com/stevearc/conform.nvim/archive/f9ef25a7ef00267b7d13bfc00b0dea22d78702d5.tar.gz", - "hash": "1942dsg83skxnm3jrqyxx9mvzgiq1v68i9z43hpar4bmqvggviif" + "revision": "973f3cb73887d510321653044791d7937c7ec0fa", + "url": "https://github.com/stevearc/conform.nvim/archive/973f3cb73887d510321653044791d7937c7ec0fa.tar.gz", + "hash": "1yx6chdrkvwalgp8641ljdxhlcfww6l5c3z374fadb3lm3mvcvkf" }, "copilot-cmp": { "type": "Git", @@ -350,9 +347,9 @@ }, "branch": "master", "submodules": false, - "revision": "6c65c53a849c8ac4278ad07a4bac150f449da3c4", - "url": "https://github.com/zbirenbaum/copilot.lua/archive/6c65c53a849c8ac4278ad07a4bac150f449da3c4.tar.gz", - "hash": "0psmi1pknc8cpckj9iqk4yx79xjkvmrjlwcnl0x1a5lbahdzifhv" + "revision": "4958fb9390f624cb389be2772e3c5e718e94d8b6", + "url": "https://github.com/zbirenbaum/copilot.lua/archive/4958fb9390f624cb389be2772e3c5e718e94d8b6.tar.gz", + "hash": "1yhkv4wc6nrc84ny9riw0rz48pm34kj4243qjdi35rmhd2dcygjz" }, "crates-nvim": { "type": "Git", @@ -363,9 +360,9 @@ }, "branch": "main", "submodules": false, - "revision": "fd2bbca7aa588f24ffc3517831934b4c4a9588e9", - "url": "https://github.com/Saecki/crates.nvim/archive/fd2bbca7aa588f24ffc3517831934b4c4a9588e9.tar.gz", - "hash": "1l2z447svf1ldpnsb9sn5b4q1a22g3wx126yw9hj7rcqrv50xw6i" + "revision": "c915ab5334a46178f64ce17ab606a79454bcd14f", + "url": "https://github.com/Saecki/crates.nvim/archive/c915ab5334a46178f64ce17ab606a79454bcd14f.tar.gz", + "hash": "0plvlgk5r4k7nz94mjphirrg7izn2ans3aipmdlm8vw0drabfnz5" }, "csharpls-extended-lsp-nvim": { "type": "Git", @@ -376,9 +373,9 @@ }, "branch": "master", "submodules": false, - "revision": "8420ee6a9fe0bfc9a37920fd572b0ae5a2348967", - "url": "https://github.com/Decodetalkers/csharpls-extended-lsp.nvim/archive/8420ee6a9fe0bfc9a37920fd572b0ae5a2348967.tar.gz", - "hash": "19k5iayhji76q031mzm1vw0n2irh2417mn0gdhf4cmadkrj4ygmg" + "revision": "0dfdad289419e414a6d49d25cb97b8908e6fbe97", + "url": "https://github.com/Decodetalkers/csharpls-extended-lsp.nvim/archive/0dfdad289419e414a6d49d25cb97b8908e6fbe97.tar.gz", + "hash": "1v067g50sd314bhgw21wfbpbxni9q1srkbf5mgv1fww4kx5cpcj1" }, "dashboard-nvim": { "type": "Git", @@ -389,9 +386,9 @@ }, "branch": "master", "submodules": false, - "revision": "000448d837f6e7a47f8f342f29526c4d7e49e9ce", - "url": "https://github.com/glepnir/dashboard-nvim/archive/000448d837f6e7a47f8f342f29526c4d7e49e9ce.tar.gz", - "hash": "11kh15qp819dhr2r3q78dv9pzxrswzzpjqmdpa5nlba9mvgjzzy3" + "revision": "c42fcfbd96dfcaa486c0a0ab52494316f1c31350", + "url": "https://github.com/glepnir/dashboard-nvim/archive/c42fcfbd96dfcaa486c0a0ab52494316f1c31350.tar.gz", + "hash": "1lydgxs3j1jbyrn1ybpm43l7wfbix9mlvymb2frg93dlg0gw4zd3" }, "diffview-nvim": { "type": "Git", @@ -454,9 +451,25 @@ }, "branch": "main", "submodules": false, - "revision": "6beae8194152e2d8b4a59de19a3e60c1f7ffcff5", - "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/6beae8194152e2d8b4a59de19a3e60c1f7ffcff5.tar.gz", - "hash": "0kncq60x3kvy4plszq4zygrsy6cyzf43g2xgzqwif88i85ki7zq6" + "revision": "b13c67398ee62531e1a4a53b95347a80eacefe6b", + "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/b13c67398ee62531e1a4a53b95347a80eacefe6b.tar.gz", + "hash": "0hbz7yjspynba3vn9pxxfahk3ygnx1b46g8z40jakc1ivmhqg0c6" + }, + "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", @@ -467,9 +480,9 @@ }, "branch": "main", "submodules": false, - "revision": "c43684448470e732387beccaff12e6667a534800", - "url": "https://github.com/Chaitanyabsprip/fastaction.nvim/archive/c43684448470e732387beccaff12e6667a534800.tar.gz", - "hash": "1ihh07j9q4089m4iw7sb33zg106g1m84bd2nk81gixfl76vg3vbi" + "revision": "9bf0c368565023914c120562473dc5a5c179ee8c", + "url": "https://github.com/Chaitanyabsprip/fastaction.nvim/archive/9bf0c368565023914c120562473dc5a5c179ee8c.tar.gz", + "hash": "12fb8av6q0y2ii23lx7rqln15syqhdxjrf9459jbm9dqjqrm6m9n" }, "fidget-nvim": { "type": "Git", @@ -480,9 +493,22 @@ }, "branch": "main", "submodules": false, - "revision": "d9ba6b7bfe29b3119a610892af67602641da778e", - "url": "https://github.com/j-hui/fidget.nvim/archive/d9ba6b7bfe29b3119a610892af67602641da778e.tar.gz", - "hash": "070jadci8x6zgxnsqaldjah1gm1p78wscsb9wpn5wn8mjkyk2m80" + "revision": "17ce5ac3b4e5ef590d4f4fd7d91e8fc233114074", + "url": "https://github.com/j-hui/fidget.nvim/archive/17ce5ac3b4e5ef590d4f4fd7d91e8fc233114074.tar.gz", + "hash": "1b1qhphdagjc1724sdy2dxkp7s7vyxi1b030kh01782mbgzpq0b6" + }, + "flash-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "flash.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "3c942666f115e2811e959eabbdd361a025db8b63", + "url": "https://github.com/folke/flash.nvim/archive/3c942666f115e2811e959eabbdd361a025db8b63.tar.gz", + "hash": "1xil2lkyr404zni1qmkwrl9hvbwjjk52fmncg59vqmvdybwsnqni" }, "flutter-tools-nvim": { "type": "Git", @@ -493,9 +519,9 @@ }, "branch": "main", "submodules": false, - "revision": "2d91a86a43a1ae1303e48aac55542f57b5731990", - "url": "https://github.com/akinsho/flutter-tools.nvim/archive/2d91a86a43a1ae1303e48aac55542f57b5731990.tar.gz", - "hash": "1ijwhwmf6f2rrixdpbr0aigjjy7jwl20bi4v5y7rz8cg0lhsmy5x" + "revision": "65b7399804315a1160933b64292d3c5330aa4e9f", + "url": "https://github.com/akinsho/flutter-tools.nvim/archive/65b7399804315a1160933b64292d3c5330aa4e9f.tar.gz", + "hash": "1wbw5k5a7iw6dqznv8z1xpg6yyx6sqb1cmspl18pa23cayvcsf12" }, "friendly-snippets": { "type": "Git", @@ -506,9 +532,9 @@ }, "branch": "main", "submodules": false, - "revision": "efff286dd74c22f731cdec26a70b46e5b203c619", - "url": "https://github.com/rafamadriz/friendly-snippets/archive/efff286dd74c22f731cdec26a70b46e5b203c619.tar.gz", - "hash": "1vb5l8ipfjwsrqffbq8v2z5p1cpg035b3gk57692wd7835kr3i13" + "revision": "572f5660cf05f8cd8834e096d7b4c921ba18e175", + "url": "https://github.com/rafamadriz/friendly-snippets/archive/572f5660cf05f8cd8834e096d7b4c921ba18e175.tar.gz", + "hash": "08q7vs7p4grav819b6hl5y9zla8bbb461b6m1w0mjz6n6rqjjc0p" }, "fzf-lua": { "type": "Git", @@ -519,9 +545,9 @@ }, "branch": "main", "submodules": false, - "revision": "89ff12300e9a768f4890a8e02bb6a3f5d97f9a65", - "url": "https://github.com/ibhagwan/fzf-lua/archive/89ff12300e9a768f4890a8e02bb6a3f5d97f9a65.tar.gz", - "hash": "13bpzf0nb5sqf80fhly3zpfh94kkbr934qbn588668kjpplp1rqn" + "revision": "c9a2deb7bf2d8deaf56a229ff9c7bfeffa8d7d53", + "url": "https://github.com/ibhagwan/fzf-lua/archive/c9a2deb7bf2d8deaf56a229ff9c7bfeffa8d7d53.tar.gz", + "hash": "1b4mqfx47cxnvbd32alb5z3sh2lpsh2lmprc288zv4zjyrjh9l8i" }, "gesture-nvim": { "type": "Git", @@ -532,9 +558,9 @@ }, "branch": "master", "submodules": false, - "revision": "eee4a4c9f108b40cb63766e96e0fe28fe5968127", - "url": "https://github.com/notomo/gesture.nvim/archive/eee4a4c9f108b40cb63766e96e0fe28fe5968127.tar.gz", - "hash": "0h6f4s39q1kzsgc3wx6kanmhada00av1nj1ngzmgbafsxl2ax0bw" + "revision": "8f2e786a4b31d28797c6999efbae9c0215ab6181", + "url": "https://github.com/notomo/gesture.nvim/archive/8f2e786a4b31d28797c6999efbae9c0215ab6181.tar.gz", + "hash": "09z196vpdyj0n1h5d1c7yn90iayxnxvjz6fajzylxpa33x8y26qn" }, "git-conflict-nvim": { "type": "Git", @@ -562,6 +588,19 @@ "url": "https://github.com/projekt0n/github-nvim-theme/archive/c106c9472154d6b2c74b74565616b877ae8ed31d.tar.gz", "hash": "1w7lz4bgfm8hq1mir4hcr8ik585d4l4w7bjl8yl3g3zklj8223pw" }, + "gitlinker-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "linrongbin16", + "repo": "gitlinker.nvim" + }, + "branch": "master", + "submodules": false, + "revision": "23982c86f50a9c3f4bc531d41b7a4a68ddd12355", + "url": "https://github.com/linrongbin16/gitlinker.nvim/archive/23982c86f50a9c3f4bc531d41b7a4a68ddd12355.tar.gz", + "hash": "1kz3gpdysxzpb27izhq0jgk59xw01mmnfvg5yrqvxnfhyjblxvqh" + }, "gitsigns-nvim": { "type": "Git", "repository": { @@ -571,9 +610,9 @@ }, "branch": "main", "submodules": false, - "revision": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9", - "url": "https://github.com/lewis6991/gitsigns.nvim/archive/7010000889bfb6c26065e0b0f7f1e6aa9163edd9.tar.gz", - "hash": "0hl572j5l1bqg51rg545bavxs8kxya02ss3fj5fxvp9ylrnaqsx9" + "revision": "b01433169be710d6c69f7b4ee264d9670698b831", + "url": "https://github.com/lewis6991/gitsigns.nvim/archive/b01433169be710d6c69f7b4ee264d9670698b831.tar.gz", + "hash": "1q12lpnxh6py5jh4jla6ibnbwfzb87j2fgvgmalnfn05gb2b04pc" }, "glow-nvim": { "type": "Git", @@ -597,9 +636,22 @@ }, "branch": "main", "submodules": false, - "revision": "c6f42890551b4827253387e93b035568826a9cb7", - "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/c6f42890551b4827253387e93b035568826a9cb7.tar.gz", - "hash": "1ac056i9hs5wbb9qzdijmhjcaz4h67v2c8q0361d17gdm8pdrvnj" + "revision": "58a2cda2e953a99e2f87c12b7fb4602da4e0709c", + "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/58a2cda2e953a99e2f87c12b7fb4602da4e0709c.tar.gz", + "hash": "1hdhlpvxql42h3jdr85rbkaxb7a84q1l5km3w1qs4vxd60jixsmn" + }, + "hardtime-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "m4xshen", + "repo": "hardtime.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "3541ad24faff78274669eceaf130502eb7f1261a", + "url": "https://github.com/m4xshen/hardtime.nvim/archive/3541ad24faff78274669eceaf130502eb7f1261a.tar.gz", + "hash": "0bys7azr33s2hkj02x85hf0yhj4pp7c28qdvsyfa93ri8pgqd4c5" }, "harpoon": { "type": "Git", @@ -623,9 +675,9 @@ }, "branch": "master", "submodules": false, - "revision": "0a1d1119e69cdf9b89e509a8bea025e21d5a41c5", - "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/0a1d1119e69cdf9b89e509a8bea025e21d5a41c5.tar.gz", - "hash": "1i0m53ri2c5l4yzwjkbwwa73c8k5yh8yz6ddcljz1b9q5vs9dazk" + "revision": "4f8eb35363a9bb85faf702b220c14facf6de14a4", + "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/4f8eb35363a9bb85faf702b220c14facf6de14a4.tar.gz", + "hash": "1lyp4crqfqg8njz79xcha5ji6fj22ifgd821ck4zjr5zmv4z8l24" }, "highlight-undo-nvim": { "type": "Git", @@ -636,9 +688,9 @@ }, "branch": "main", "submodules": false, - "revision": "a5e2e2d43f6d131bf526619baeeeec32397b0789", - "url": "https://github.com/tzachar/highlight-undo.nvim/archive/a5e2e2d43f6d131bf526619baeeeec32397b0789.tar.gz", - "hash": "0gvd45mpkhd7hj8hvm20z036vr178hzzwhknj0l5bfnnnwl8xnjc" + "revision": "ee32e12693d70e66f954d09a504a7371d110fc27", + "url": "https://github.com/tzachar/highlight-undo.nvim/archive/ee32e12693d70e66f954d09a504a7371d110fc27.tar.gz", + "hash": "09byybwyl61jxlfii9vsi4i21vy6ngm3mbypqlhsivn8wgg24kn9" }, "hop-nvim": { "type": "Git", @@ -653,6 +705,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": { @@ -664,10 +732,10 @@ "version_upper_bound": null, "release_prefix": null, "submodules": false, - "version": "v1.0.2", - "revision": "8578056a2226ed49fc608167edc143a87f75d809", - "url": "https://api.github.com/repos/nvimtools/hydra.nvim/tarball/v1.0.2", - "hash": "13f04pmqrfl65xx9bfkdak6ll57s94anaw7nqd0fm5hp50b7c6j3" + "version": "v1.0.3", + "revision": "f3d4822060376cb253d4cc0d5af2c272c28de2a7", + "url": "https://api.github.com/repos/nvimtools/hydra.nvim/tarball/v1.0.3", + "hash": "13dd1q951pbwi36r4s1zfs02mk5pyfvwlj1pmv4l8bnc4fs242qv" }, "icon-picker-nvim": { "type": "Git", @@ -691,9 +759,22 @@ }, "branch": "master", "submodules": false, - "revision": "2e2d28b7734b5efdfc1219f4da8a46c761587bc2", - "url": "https://github.com/3rd/image.nvim/archive/2e2d28b7734b5efdfc1219f4da8a46c761587bc2.tar.gz", - "hash": "1k2bch2l9bvy4ian6l3jymddcy7p4mvblpmbq0qvn8rzxdi65fy1" + "revision": "4c51d6202628b3b51e368152c053c3fb5c5f76f2", + "url": "https://github.com/3rd/image.nvim/archive/4c51d6202628b3b51e368152c053c3fb5c5f76f2.tar.gz", + "hash": "16s1wsy9k72qiqzvwij67j2jzwgi6ggl6lhx9p6lfw8dpps3ayxg" + }, + "img-clip": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hakonharnes", + "repo": "img-clip.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "d8b6b030672f9f551a0e3526347699985a779d93", + "url": "https://github.com/hakonharnes/img-clip.nvim/archive/d8b6b030672f9f551a0e3526347699985a779d93.tar.gz", + "hash": "1kah8n88jzlp52nz0l2kncws9sjxy6silr556lwpq4n9p8jm46pa" }, "indent-blankline-nvim": { "type": "Git", @@ -730,9 +811,9 @@ }, "branch": "main", "submodules": false, - "revision": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe", - "url": "https://github.com/ggandor/leap.nvim/archive/346a16ef942635a8ca5ff92e603d07e7e8be6cbe.tar.gz", - "hash": "0rq73f7sw1sf8dn6angwgns8jd811aiixmvrndgqz2939dlqaw2l" + "revision": "ebaf38f7fd7193cc918c10eb955afed63301cd76", + "url": "https://github.com/ggandor/leap.nvim/archive/ebaf38f7fd7193cc918c10eb955afed63301cd76.tar.gz", + "hash": "116iij1wksp1sz7z7wf3izi6s8vljqdbc28g08sy71pjxs8fx2v4" }, "leetcode-nvim": { "type": "Git", @@ -743,21 +824,9 @@ }, "branch": "master", "submodules": false, - "revision": "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951", - "url": "https://github.com/kawre/leetcode.nvim/archive/db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951.tar.gz", - "hash": "1d3lb7625b2qdzqm74mzrac66rxqc0qgjd3mb37l4v8wqyiyv6pp" - }, - "lsp-lines": { - "type": "Git", - "repository": { - "type": "Git", - "url": "https://git.sr.ht/~whynothugo/lsp_lines.nvim" - }, - "branch": "main", - "submodules": false, - "revision": "a92c755f182b89ea91bd8a6a2227208026f27b4d", - "url": null, - "hash": "14ym4d8vgvw2vhsaxik8612wyvszd895q69n9h100yd7x5jqhy4c" + "revision": "422b6beb4a64eca0524fbff94edd9550c156afc5", + "url": "https://github.com/kawre/leetcode.nvim/archive/422b6beb4a64eca0524fbff94edd9550c156afc5.tar.gz", + "hash": "0by4graq6bwnipssxrdrp9d22jf5g93srv10ghd8y35f370q9nlv" }, "lsp-signature-nvim": { "type": "Git", @@ -768,9 +837,9 @@ }, "branch": "master", "submodules": false, - "revision": "b58cca003d1d3311213d6db0352f58d8e57bfff0", - "url": "https://github.com/ray-x/lsp_signature.nvim/archive/b58cca003d1d3311213d6db0352f58d8e57bfff0.tar.gz", - "hash": "1jqpjb7xgdm5ikay8hdjz04bdkirhns6zpa68cblsyslpkvk4hk0" + "revision": "d9c39937e4e0977357530e988aa8940078bb231f", + "url": "https://github.com/ray-x/lsp_signature.nvim/archive/d9c39937e4e0977357530e988aa8940078bb231f.tar.gz", + "hash": "0m5a5bshycvr9cnb60xx1s0722i1dhpbcpxh6c79h2zrhi15h61n" }, "lspkind-nvim": { "type": "Git", @@ -794,9 +863,9 @@ }, "branch": "main", "submodules": false, - "revision": "778d56ff9b387dacd14ae648ed5604394b486f51", - "url": "https://github.com/nvimdev/lspsaga.nvim/archive/778d56ff9b387dacd14ae648ed5604394b486f51.tar.gz", - "hash": "1rm8ww8krxliwli9m2j6j37xgwgjsrgapvgrcdr6nd4mi6hgmczm" + "revision": "8efe00d6aed9db6449969f889170f1a7e43101a1", + "url": "https://github.com/nvimdev/lspsaga.nvim/archive/8efe00d6aed9db6449969f889170f1a7e43101a1.tar.gz", + "hash": "03lyjm7raak0hahy9vijg0s5g2wxciqnzrhjqp691hnd3n1gzrvj" }, "lua-utils-nvim": { "type": "Git", @@ -820,9 +889,9 @@ }, "branch": "master", "submodules": false, - "revision": "1517caa8fff05e4b4999857319d3b0609a7f57fa", - "url": "https://github.com/hoob3rt/lualine.nvim/archive/1517caa8fff05e4b4999857319d3b0609a7f57fa.tar.gz", - "hash": "0mzclk1rb03ln0my8pqq8p4sn84zkwn0amy2xyb2xds8q9zi21hc" + "revision": "a94fc68960665e54408fe37dcf573193c4ce82c9", + "url": "https://github.com/hoob3rt/lualine.nvim/archive/a94fc68960665e54408fe37dcf573193c4ce82c9.tar.gz", + "hash": "0x6q640xkp6if0p5ks0bkwwppa9c66mr4lqadmpg20z2p81y18yr" }, "luasnip": { "type": "Git", @@ -833,9 +902,9 @@ }, "branch": "master", "submodules": false, - "revision": "c9b9a22904c97d0eb69ccb9bab76037838326817", - "url": "https://github.com/L3MON4D3/LuaSnip/archive/c9b9a22904c97d0eb69ccb9bab76037838326817.tar.gz", - "hash": "03anxdspqz7ylq4239jyr9y51mw5qw1lkccyvfhj6wfk43jjdryx" + "revision": "3d5bced1b9ae69fa3f9b1942e28af5dbc537f946", + "url": "https://github.com/L3MON4D3/LuaSnip/archive/3d5bced1b9ae69fa3f9b1942e28af5dbc537f946.tar.gz", + "hash": "0y29pqdbsj90h3kq2h86jzlfbjz1025c075n113c930x0r5jpgf3" }, "lz-n": { "type": "Git", @@ -846,9 +915,9 @@ }, "branch": "master", "submodules": false, - "revision": "136e315e0c1e2ac116cc0953dd41adfebfb4a695", - "url": "https://github.com/nvim-neorocks/lz.n/archive/136e315e0c1e2ac116cc0953dd41adfebfb4a695.tar.gz", - "hash": "0fdgr21cj5nis4vicvws635w9c8bcls59yj64d3xwfj7nr40mzws" + "revision": "dbf512563eef47b04c24684a6d934a429a7706fc", + "url": "https://github.com/nvim-neorocks/lz.n/archive/dbf512563eef47b04c24684a6d934a429a7706fc.tar.gz", + "hash": "0pr84cjywhbhvxkjk1d1qsv70ps7x3z73hdhnxpd2zdqgwbs2fyv" }, "lzn-auto-require": { "type": "Git", @@ -863,6 +932,19 @@ "url": "https://github.com/horriblename/lzn-auto-require/archive/ef746afb55467984ef3200d9709c8059ee0257d0.tar.gz", "hash": "1mgka1mmvpd2gfya898qdbbwrp5rpqds8manjs1s7g5x63xp6b98" }, + "markview-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "OXY2DEV", + "repo": "markview.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "ec33f2aa333ca1d76f51847922578434d7aeadf7", + "url": "https://github.com/OXY2DEV/markview.nvim/archive/ec33f2aa333ca1d76f51847922578434d7aeadf7.tar.gz", + "hash": "03c58dccq2qxfmv5wya64j18rqydnrd664awc0pxgy41bs11yfls" + }, "mind-nvim": { "type": "Git", "repository": { @@ -885,9 +967,9 @@ }, "branch": "main", "submodules": false, - "revision": "978ffc65c6b513fde9ef075326d34d89197f1ea5", - "url": "https://github.com/echasnovski/mini.ai/archive/978ffc65c6b513fde9ef075326d34d89197f1ea5.tar.gz", - "hash": "1kgar55azqq9g6m9y98kr96cldhzipdfp2cjhszvnzw9ad28p3nb" + "revision": "1cd4f021a05c29acd4ab511c0981da14217daf38", + "url": "https://github.com/echasnovski/mini.ai/archive/1cd4f021a05c29acd4ab511c0981da14217daf38.tar.gz", + "hash": "045f24n8b3f1ilhhanm1m0sfr0yjprxp5a8ykyjrqc4lwh3v1jwv" }, "mini-align": { "type": "Git", @@ -898,9 +980,9 @@ }, "branch": "main", "submodules": false, - "revision": "0ce67804b0343409c93eb14275b98d53a7b209cc", - "url": "https://github.com/echasnovski/mini.align/archive/0ce67804b0343409c93eb14275b98d53a7b209cc.tar.gz", - "hash": "1lq5pzi24ahwfp1jipwl7a1mynnz1ja7c70bs2kilafpa314ymnp" + "revision": "0202e1662a7a03a95cefd6851795ceae5e87b9b3", + "url": "https://github.com/echasnovski/mini.align/archive/0202e1662a7a03a95cefd6851795ceae5e87b9b3.tar.gz", + "hash": "0yzwryx5y4v3838b1g2b6xnj6cg824iww4dxvlr0jmbqd3m23lf5" }, "mini-animate": { "type": "Git", @@ -911,9 +993,9 @@ }, "branch": "main", "submodules": false, - "revision": "33235a02c7dbaf2a5abdb9c584f9bdb6a6fef247", - "url": "https://github.com/echasnovski/mini.animate/archive/33235a02c7dbaf2a5abdb9c584f9bdb6a6fef247.tar.gz", - "hash": "1v4xlphp9h1vc48dxwf9hmm2mfr1z1s708knsbyx6gkd282zmzkg" + "revision": "8a3f27183b38d2f255e3f5fc0df42c072f8339df", + "url": "https://github.com/echasnovski/mini.animate/archive/8a3f27183b38d2f255e3f5fc0df42c072f8339df.tar.gz", + "hash": "0zq5m24192hpkv03w65cw9famfc48n4dcqmsj1n2xhd4lynjhbrb" }, "mini-base16": { "type": "Git", @@ -924,9 +1006,9 @@ }, "branch": "main", "submodules": false, - "revision": "492b34f496fd1a53126feb1e47ebf55ce9d61e25", - "url": "https://github.com/echasnovski/mini.base16/archive/492b34f496fd1a53126feb1e47ebf55ce9d61e25.tar.gz", - "hash": "0srxnxkpi03282zdcbrq13b2m259pchnfvp94awn286zwsc9x23l" + "revision": "ecd277e6204fc0411f070150081f40529dcf280c", + "url": "https://github.com/echasnovski/mini.base16/archive/ecd277e6204fc0411f070150081f40529dcf280c.tar.gz", + "hash": "08v2rlb2jzbza30n66rb19bgh9y6a8vk7jfq6mzi9dxb4f7a85sl" }, "mini-basics": { "type": "Git", @@ -937,9 +1019,9 @@ }, "branch": "main", "submodules": false, - "revision": "307ba95901099f44cff557da040ee8862093e410", - "url": "https://github.com/echasnovski/mini.basics/archive/307ba95901099f44cff557da040ee8862093e410.tar.gz", - "hash": "130y4b372n3gckg1in5mgdssxg55cswa0dwxrs4icq2nb7rxnbia" + "revision": "540c80d579e366a7c11d2b5cf3ecde009dbd125f", + "url": "https://github.com/echasnovski/mini.basics/archive/540c80d579e366a7c11d2b5cf3ecde009dbd125f.tar.gz", + "hash": "1zcysmzywibn8hsd098jj31hn2xdjisfchdd9ywmmhaxzg48djsm" }, "mini-bracketed": { "type": "Git", @@ -950,9 +1032,9 @@ }, "branch": "main", "submodules": false, - "revision": "0ec65567ffde0ad4d94d794d55f3b627203b496a", - "url": "https://github.com/echasnovski/mini.bracketed/archive/0ec65567ffde0ad4d94d794d55f3b627203b496a.tar.gz", - "hash": "05xg63hw83n99al5sylysbq1xpschlj547s3j484jjs7wsbzzp6c" + "revision": "4a005a6e5aad58230b69f0f59df2cbb8b1c2e643", + "url": "https://github.com/echasnovski/mini.bracketed/archive/4a005a6e5aad58230b69f0f59df2cbb8b1c2e643.tar.gz", + "hash": "0wg24cq6064c45p3sf022d54gmwwvi8354k2sbp09h19s797bpbx" }, "mini-bufremove": { "type": "Git", @@ -963,9 +1045,9 @@ }, "branch": "main", "submodules": false, - "revision": "c635c40d06a45450d34695d70c3fb3efe432728f", - "url": "https://github.com/echasnovski/mini.bufremove/archive/c635c40d06a45450d34695d70c3fb3efe432728f.tar.gz", - "hash": "0d5zmn1rldcl37i6v6m2b2ql3nvkdfqjzf3zhdkqfd7pxvvwp12j" + "revision": "a1bbb2af40f7773c8cee9e364aac4a724b5c10de", + "url": "https://github.com/echasnovski/mini.bufremove/archive/a1bbb2af40f7773c8cee9e364aac4a724b5c10de.tar.gz", + "hash": "1xz9x5bd72cg4f56ngb6lr00cb468q84nm383fyzvwyxj99nw2b9" }, "mini-clue": { "type": "Git", @@ -976,9 +1058,9 @@ }, "branch": "main", "submodules": false, - "revision": "9bfd8ce71ae31460837fcec82a03946008929777", - "url": "https://github.com/echasnovski/mini.clue/archive/9bfd8ce71ae31460837fcec82a03946008929777.tar.gz", - "hash": "1rx2952li3zby1v24asrp9avy6l9f7f6v954a6xf1rl8ijz2aa5j" + "revision": "edf3016944b5f2c7932d39af83af7c885ca0f019", + "url": "https://github.com/echasnovski/mini.clue/archive/edf3016944b5f2c7932d39af83af7c885ca0f019.tar.gz", + "hash": "09mvqd93nfqpfm1k78l41cbpqazfx852c2l5rkdrgpmjq6mxay4f" }, "mini-colors": { "type": "Git", @@ -989,9 +1071,9 @@ }, "branch": "main", "submodules": false, - "revision": "0b13a3f8c7279d31833203b1c15d456047321f28", - "url": "https://github.com/echasnovski/mini.colors/archive/0b13a3f8c7279d31833203b1c15d456047321f28.tar.gz", - "hash": "00037f03cmx01y6hd7cdk4bibbzfqmygf851alhnvd2fs7flvxcw" + "revision": "dd4209469024b249cf9dfed851fd85ad3467ccd3", + "url": "https://github.com/echasnovski/mini.colors/archive/dd4209469024b249cf9dfed851fd85ad3467ccd3.tar.gz", + "hash": "0zppf2j94v19bvlkhaixx9vj4w3c574v0nycha9y2zy48ac1x6dy" }, "mini-comment": { "type": "Git", @@ -1002,9 +1084,9 @@ }, "branch": "main", "submodules": false, - "revision": "264b8a63edd5a9a41d5361a1d52c13131c3c51a2", - "url": "https://github.com/echasnovski/mini.comment/archive/264b8a63edd5a9a41d5361a1d52c13131c3c51a2.tar.gz", - "hash": "1s4jl8sa7l6kibgsz0d6w2h4xnbpbf3k4rqq90x4l4dmx8if9vkb" + "revision": "871746069a28e35d04a66f88bc0e6831779ccc40", + "url": "https://github.com/echasnovski/mini.comment/archive/871746069a28e35d04a66f88bc0e6831779ccc40.tar.gz", + "hash": "051gfmd82m2ghf6am6q5bdsjda2wghy5pwn7gyxc1fahh9d9gakf" }, "mini-completion": { "type": "Git", @@ -1015,9 +1097,25 @@ }, "branch": "main", "submodules": false, - "revision": "9e6aa17fef2e86d3f33666a7843b942791cc1c1f", - "url": "https://github.com/echasnovski/mini.completion/archive/9e6aa17fef2e86d3f33666a7843b942791cc1c1f.tar.gz", - "hash": "05z0ghbwh7h2ij8k72sidrpypnzkf57kf058kwpc0wd1jm9ymznm" + "revision": "7254cce7766f330170318c8bd4826ec3a3aac183", + "url": "https://github.com/echasnovski/mini.completion/archive/7254cce7766f330170318c8bd4826ec3a3aac183.tar.gz", + "hash": "0n62xdkiicf4ngj1c30ahp68znhi6nva1shd23i98mihmlmv24hz" + }, + "mini-cursorword": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.cursorword" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v0.16.0", + "revision": "55ecfd08d8ff62375f5be9e5b5d5252324b220e8", + "url": "https://api.github.com/repos/echasnovski/mini.cursorword/tarball/v0.16.0", + "hash": "0sgii7m2lfp95vxnchisk3hpbjwwqpky6ivkx2nc5djkmj07b7mj" }, "mini-diff": { "type": "Git", @@ -1028,9 +1126,9 @@ }, "branch": "main", "submodules": false, - "revision": "e4a59a8a22d9afeeaac92e3cb3fbd8ff5dc8e310", - "url": "https://github.com/echasnovski/mini.diff/archive/e4a59a8a22d9afeeaac92e3cb3fbd8ff5dc8e310.tar.gz", - "hash": "0z38rpxdgg298a1i5ar49694xfjv26m8572qbhq2s6wkf24p08yk" + "revision": "f573bd2ae2eb225ea2f125126b8869e04bcaf231", + "url": "https://github.com/echasnovski/mini.diff/archive/f573bd2ae2eb225ea2f125126b8869e04bcaf231.tar.gz", + "hash": "0rlah6kwv9xw244b1xhkdz1hg10zq2zidnlvnxjl7ckn9qxq908p" }, "mini-doc": { "type": "Git", @@ -1041,9 +1139,9 @@ }, "branch": "main", "submodules": false, - "revision": "00d626a03e5642c657c58c99d14cc0ea6ed51abd", - "url": "https://github.com/echasnovski/mini.doc/archive/00d626a03e5642c657c58c99d14cc0ea6ed51abd.tar.gz", - "hash": "0n920j25rnb66hk3klrni9ji673800dbxyb8j30vd4dymq5051ym" + "revision": "dc336167b203f7405ce7a27d879a90fd9a4ba241", + "url": "https://github.com/echasnovski/mini.doc/archive/dc336167b203f7405ce7a27d879a90fd9a4ba241.tar.gz", + "hash": "17akjcvps4adzp3ag04i11gdwxhk10qhlqlacy3yx8ks2l8jsibh" }, "mini-extra": { "type": "Git", @@ -1054,9 +1152,9 @@ }, "branch": "main", "submodules": false, - "revision": "54420de7ee36cf011c6351a1d6290b2555120c7b", - "url": "https://github.com/echasnovski/mini.extra/archive/54420de7ee36cf011c6351a1d6290b2555120c7b.tar.gz", - "hash": "16kyn5jh6pnpiiahf16r2yk3bck9yz8vy5fbvwlfa847rbl39ybd" + "revision": "0dec9611833d058f9d2d48f6333b41631f5ef3b9", + "url": "https://github.com/echasnovski/mini.extra/archive/0dec9611833d058f9d2d48f6333b41631f5ef3b9.tar.gz", + "hash": "1q1jas6kx8sxyxrvf8c5d7jlb76bxfps9zsjaqmh7y4rx4pk103k" }, "mini-files": { "type": "Git", @@ -1067,9 +1165,9 @@ }, "branch": "main", "submodules": false, - "revision": "3007632477bb9df28b4e32329c63aea1ab2c2b0a", - "url": "https://github.com/echasnovski/mini.files/archive/3007632477bb9df28b4e32329c63aea1ab2c2b0a.tar.gz", - "hash": "1bb0sv766gjnwnqpn7qhcsm6m6c8zj96ippsh1sjlqd3ma09hzwm" + "revision": "5b9431cf5c69b8e69e5a67d2d12338a3ac2e1541", + "url": "https://github.com/echasnovski/mini.files/archive/5b9431cf5c69b8e69e5a67d2d12338a3ac2e1541.tar.gz", + "hash": "1y32wk17hlpv17q3yrjx4cfywi9svxxpmzy1qdzqxdkddrzya3sc" }, "mini-fuzzy": { "type": "Git", @@ -1080,9 +1178,9 @@ }, "branch": "main", "submodules": false, - "revision": "fb42763285075e316fd4250739af9b8c442503de", - "url": "https://github.com/echasnovski/mini.fuzzy/archive/fb42763285075e316fd4250739af9b8c442503de.tar.gz", - "hash": "0hl5ygzlf73g70j7pdd1x4975368sqpynpja1zx7bc5jln698vr4" + "revision": "f270c05a0afcb4e87044f7cd01af187497f30c4d", + "url": "https://github.com/echasnovski/mini.fuzzy/archive/f270c05a0afcb4e87044f7cd01af187497f30c4d.tar.gz", + "hash": "0jvvbwva2csadr4hhbmbcw0hzj16rrpbnh1ibhzsnalws8bn5mh7" }, "mini-git": { "type": "Git", @@ -1093,9 +1191,9 @@ }, "branch": "main", "submodules": false, - "revision": "96034bd94220115e49dbf8c38ef4da5508ba29c2", - "url": "https://github.com/echasnovski/mini-git/archive/96034bd94220115e49dbf8c38ef4da5508ba29c2.tar.gz", - "hash": "0f15bsqrjbifjp0g0fscncyhzsvjd3i4fh0vyagpl08g4as1fqx3" + "revision": "c38380e1a6582b1aee7de26e9738b1ce17366d7d", + "url": "https://github.com/echasnovski/mini-git/archive/c38380e1a6582b1aee7de26e9738b1ce17366d7d.tar.gz", + "hash": "11vfi9csq7s8xvsghr5h6qch71dy1r497bflfzjx14rpbb8bdmc8" }, "mini-hipatterns": { "type": "Git", @@ -1106,9 +1204,9 @@ }, "branch": "main", "submodules": false, - "revision": "fbf1e2195fdd65cf1bc970316c28098257728868", - "url": "https://github.com/echasnovski/mini.hipatterns/archive/fbf1e2195fdd65cf1bc970316c28098257728868.tar.gz", - "hash": "09g9b2jm1hac7pppmmncqpgaddd3yrlw9anhr4jw7lldr2bpwrqa" + "revision": "2b78f3d475d60ea1793a6d595ff65a0db9ac3a67", + "url": "https://github.com/echasnovski/mini.hipatterns/archive/2b78f3d475d60ea1793a6d595ff65a0db9ac3a67.tar.gz", + "hash": "1vn4pz7ibd4ll97xrvqvl8swr88dzr9gbq5zc4ssfixrqfssb22w" }, "mini-hues": { "type": "Git", @@ -1119,9 +1217,9 @@ }, "branch": "main", "submodules": false, - "revision": "b65cb42ad651ee3543985e333c504bf820bc5a85", - "url": "https://github.com/echasnovski/mini.hues/archive/b65cb42ad651ee3543985e333c504bf820bc5a85.tar.gz", - "hash": "1yhkvszlw6pp1pxkz0w76fwmmysb2bl2kka0f0ws4jhfcdj6qv1c" + "revision": "9149f51a5124ca34fe50c637e2dd5ac3b4e4a55e", + "url": "https://github.com/echasnovski/mini.hues/archive/9149f51a5124ca34fe50c637e2dd5ac3b4e4a55e.tar.gz", + "hash": "1bgigv8f262kh2493sncy975vr4nl49mw171n19rmgnixmh23w0s" }, "mini-icons": { "type": "Git", @@ -1132,9 +1230,9 @@ }, "branch": "main", "submodules": false, - "revision": "86a633f0dffcfd80110bac86681dbf4b5c37ba5c", - "url": "https://github.com/echasnovski/mini.icons/archive/86a633f0dffcfd80110bac86681dbf4b5c37ba5c.tar.gz", - "hash": "1810mvav1k24kxx3kj364v09k26d1s1p2y6dnc2l8mwzw7q70byr" + "revision": "b8f6fa6f5a3fd0c56936252edcd691184e5aac0c", + "url": "https://github.com/echasnovski/mini.icons/archive/b8f6fa6f5a3fd0c56936252edcd691184e5aac0c.tar.gz", + "hash": "07zlbmisc8c4wj36mdnk7wlwb0qfd38zpjdkqazjzb5lfzh9hf9m" }, "mini-indentscope": { "type": "Git", @@ -1145,9 +1243,9 @@ }, "branch": "main", "submodules": false, - "revision": "8ce41a77eed7f4121c83c67fda5e2e86af999e6d", - "url": "https://github.com/echasnovski/mini.indentscope/archive/8ce41a77eed7f4121c83c67fda5e2e86af999e6d.tar.gz", - "hash": "0dv4c6yf1s5fzvwy1n0chq553353bsix3g8ysajp9lswnd9lhbh4" + "revision": "f1567c6f46c250b22f4ad1b847a042464742b11d", + "url": "https://github.com/echasnovski/mini.indentscope/archive/f1567c6f46c250b22f4ad1b847a042464742b11d.tar.gz", + "hash": "0mbwy8ww0cxx4g5l7hipnxsgwzvmr6wxsap0dz6y4fy1g4jcw6cw" }, "mini-jump": { "type": "Git", @@ -1158,9 +1256,9 @@ }, "branch": "main", "submodules": false, - "revision": "1fb371cfdcb314c5faa272976f23514f264bd755", - "url": "https://github.com/echasnovski/mini.jump/archive/1fb371cfdcb314c5faa272976f23514f264bd755.tar.gz", - "hash": "1975qyjzcziya2w121cjkqaj17wxp205jl3b7lrl25db6l6ggjcs" + "revision": "5fd3bc5a97f3487c65b34475033ca8fccf297500", + "url": "https://github.com/echasnovski/mini.jump/archive/5fd3bc5a97f3487c65b34475033ca8fccf297500.tar.gz", + "hash": "0ai4pl9cx8p57qja2ixf3294hdrj0j30pkh0gymd7jw992dqkp6s" }, "mini-jump2d": { "type": "Git", @@ -1171,9 +1269,9 @@ }, "branch": "main", "submodules": false, - "revision": "3de91ea974627c4c2645e288bf0a6e6717a4dfa8", - "url": "https://github.com/echasnovski/mini.jump2d/archive/3de91ea974627c4c2645e288bf0a6e6717a4dfa8.tar.gz", - "hash": "0n40jmjbqnz1bbgal3j8m9cgzyma59ss8lxsqmi9230mkgd4xsnq" + "revision": "7a1b72251bf841bd8feb3e54e3e61c2883bc29ae", + "url": "https://github.com/echasnovski/mini.jump2d/archive/7a1b72251bf841bd8feb3e54e3e61c2883bc29ae.tar.gz", + "hash": "0ydavxi9ryxllky3y7whv62dm8b4h5545w1kzgk3b3bfss4zq1rj" }, "mini-map": { "type": "Git", @@ -1184,9 +1282,9 @@ }, "branch": "main", "submodules": false, - "revision": "2fe08148f883d613c825c1c0c6ea8a19901061f0", - "url": "https://github.com/echasnovski/mini.map/archive/2fe08148f883d613c825c1c0c6ea8a19901061f0.tar.gz", - "hash": "1mqf5bkyp8r05h7ba4drfxx97js2fzmdbjz0xb88xhnpmrikfjnv" + "revision": "94ce1694e7b7a3940fc507ab25f061deb9c8179c", + "url": "https://github.com/echasnovski/mini.map/archive/94ce1694e7b7a3940fc507ab25f061deb9c8179c.tar.gz", + "hash": "0rfhkijxvb40wvb6abvpdq1s34xki2s36clml5lprg0v880qv75l" }, "mini-misc": { "type": "Git", @@ -1197,9 +1295,9 @@ }, "branch": "main", "submodules": false, - "revision": "3f0cf62b7e9c545e7e92fe5614f4d6acbe5a8f29", - "url": "https://github.com/echasnovski/mini.misc/archive/3f0cf62b7e9c545e7e92fe5614f4d6acbe5a8f29.tar.gz", - "hash": "04sw3kxx7qa8i2xvagxls78ih7l6fq9mk42xrqjim225657hva5p" + "revision": "186e543e5c322e1d474d541ec66197839ec51778", + "url": "https://github.com/echasnovski/mini.misc/archive/186e543e5c322e1d474d541ec66197839ec51778.tar.gz", + "hash": "0rgcmzqbpnq0b07vi5bjq70skjhm959kvw7h3wsaihb68yri56m7" }, "mini-move": { "type": "Git", @@ -1210,9 +1308,9 @@ }, "branch": "main", "submodules": false, - "revision": "c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d", - "url": "https://github.com/echasnovski/mini.move/archive/c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d.tar.gz", - "hash": "0cnzfn706s90bc0m49jkx3fjghrcv0byqbajdhwbrv8f77c6crg3" + "revision": "819e90c3e113a3c826c3003ec07073f1e0677ea0", + "url": "https://github.com/echasnovski/mini.move/archive/819e90c3e113a3c826c3003ec07073f1e0677ea0.tar.gz", + "hash": "1dbflx3im6605vxhk3q8mqgsh89gs1q50x5vngl08knsv2vmm16a" }, "mini-notify": { "type": "Git", @@ -1223,9 +1321,9 @@ }, "branch": "main", "submodules": false, - "revision": "be6661ee23f2325841fb087efb8e492b29eccc9a", - "url": "https://github.com/echasnovski/mini.notify/archive/be6661ee23f2325841fb087efb8e492b29eccc9a.tar.gz", - "hash": "16n36gvk3gz46cs30gh8zd4mcwszniynl2k87rzbfhhcwsj71svx" + "revision": "e18f9fc783c7a26fab9c8a094d97dc768e56f558", + "url": "https://github.com/echasnovski/mini.notify/archive/e18f9fc783c7a26fab9c8a094d97dc768e56f558.tar.gz", + "hash": "0qvh5wy1acrilkzin16n2xnpsr5vydxajln0r2y2xbq9wix42vn6" }, "mini-operators": { "type": "Git", @@ -1236,9 +1334,9 @@ }, "branch": "main", "submodules": false, - "revision": "298218fb8280fd4a8234db80230dd84db6b07efd", - "url": "https://github.com/echasnovski/mini.operators/archive/298218fb8280fd4a8234db80230dd84db6b07efd.tar.gz", - "hash": "021big8pqbwkjrzkak0chffwhhvj8klanda5q9wxwgg1wky9qvi6" + "revision": "fd655907ed56434c83a6efb654b266d9c090ca82", + "url": "https://github.com/echasnovski/mini.operators/archive/fd655907ed56434c83a6efb654b266d9c090ca82.tar.gz", + "hash": "1f3yd23mggrrr3hdvzp8rl3qqxznx1889q0wgkz239636d07qsjc" }, "mini-pairs": { "type": "Git", @@ -1249,9 +1347,9 @@ }, "branch": "main", "submodules": false, - "revision": "b90e36aa5ca5e0d825e77ad67aac22214a4d9096", - "url": "https://github.com/echasnovski/mini.pairs/archive/b90e36aa5ca5e0d825e77ad67aac22214a4d9096.tar.gz", - "hash": "0h35xn8029d74sdv1fyrycpkl10vv0m01fvx2v955v0jfc9cii1n" + "revision": "1e1ca3f60f58d4050bf814902b472eec9963a5dd", + "url": "https://github.com/echasnovski/mini.pairs/archive/1e1ca3f60f58d4050bf814902b472eec9963a5dd.tar.gz", + "hash": "1zwvywy9pbskip3nckbymkkrl19mvdz8ax0ixcnnavk6567v5hh5" }, "mini-pick": { "type": "Git", @@ -1262,9 +1360,9 @@ }, "branch": "main", "submodules": false, - "revision": "4dfc0a21f16d34e9b2429b96d62788ed8a65e6cd", - "url": "https://github.com/echasnovski/mini.pick/archive/4dfc0a21f16d34e9b2429b96d62788ed8a65e6cd.tar.gz", - "hash": "0ybfn2mn038mn2bdaf5hyiycimfi785silpcnayh4nj544zhzjc9" + "revision": "c8f4ff0251ccb8c6a993ee0dee4e06d9c21a4b99", + "url": "https://github.com/echasnovski/mini.pick/archive/c8f4ff0251ccb8c6a993ee0dee4e06d9c21a4b99.tar.gz", + "hash": "0lrfzi55a19lqbxpq42fp9p6wwq5w8hwxh8hs6s8dc8f51cbrrvr" }, "mini-sessions": { "type": "Git", @@ -1275,9 +1373,9 @@ }, "branch": "main", "submodules": false, - "revision": "f38354b72c11d5bbb2153183fa6ba0cf238147d5", - "url": "https://github.com/echasnovski/mini.sessions/archive/f38354b72c11d5bbb2153183fa6ba0cf238147d5.tar.gz", - "hash": "1m08i9b235bpgyjgajj85i10z991yigrhp3hg5xji9hajn0d67iw" + "revision": "8b01c6cd257450b34a07fc0b3f05226020a94c75", + "url": "https://github.com/echasnovski/mini.sessions/archive/8b01c6cd257450b34a07fc0b3f05226020a94c75.tar.gz", + "hash": "1y9k63ac5i7mjqk1gazrm9w7avppbhc8cl5084d3rv7f4pgzn6cq" }, "mini-snippets": { "type": "Git", @@ -1288,9 +1386,9 @@ }, "branch": "main", "submodules": false, - "revision": "04e1c0f8538a4ee0ddc054e30e92a93cb4c1b568", - "url": "https://github.com/echasnovski/mini.snippets/archive/04e1c0f8538a4ee0ddc054e30e92a93cb4c1b568.tar.gz", - "hash": "17fqgsr7id11f1wp6wri1zi67m2vh6i9hdrwj9bgjy4528x7gi6f" + "revision": "a04d1b2fc0047b8e613a31dbc4a5760778003dcd", + "url": "https://github.com/echasnovski/mini.snippets/archive/a04d1b2fc0047b8e613a31dbc4a5760778003dcd.tar.gz", + "hash": "083yvsf1j8wwqmc0gm5c6a9cvy883s02kd0q8s8h0zb40f0xkmw7" }, "mini-splitjoin": { "type": "Git", @@ -1301,9 +1399,9 @@ }, "branch": "main", "submodules": false, - "revision": "efe24ba54f9623cb05698355981ec05278976788", - "url": "https://github.com/echasnovski/mini.splitjoin/archive/efe24ba54f9623cb05698355981ec05278976788.tar.gz", - "hash": "0xnc61cm1zpj8j7j10zgpx4438vmqpdwbqick9rrw9jbmbzcc0p5" + "revision": "51909e9883ab206f5a92deb9ca685317387586a4", + "url": "https://github.com/echasnovski/mini.splitjoin/archive/51909e9883ab206f5a92deb9ca685317387586a4.tar.gz", + "hash": "1rrpy2vf6dzxvrk4px4185zx5ci30d62hc7j5mqifv2br5gdlh0r" }, "mini-starter": { "type": "Git", @@ -1314,9 +1412,9 @@ }, "branch": "main", "submodules": false, - "revision": "cf770619b85968bc0f45cace82f5c80b69ca0e96", - "url": "https://github.com/echasnovski/mini.starter/archive/cf770619b85968bc0f45cace82f5c80b69ca0e96.tar.gz", - "hash": "11l7vxhd6sra55aj2xmm79nfhrkisv9r6fssknmcdxrmh47dr3kd" + "revision": "aa1f05d40e59ddc652a7333a05e707bd9233b9d0", + "url": "https://github.com/echasnovski/mini.starter/archive/aa1f05d40e59ddc652a7333a05e707bd9233b9d0.tar.gz", + "hash": "18y5k17vdlq1k93pnv7l7pd96g72zv4hp9q0fa4kh2r7ljn7zm7n" }, "mini-statusline": { "type": "Git", @@ -1327,9 +1425,9 @@ }, "branch": "main", "submodules": false, - "revision": "ec3adf7813b7604275dd4a28433e9c9610b70f1b", - "url": "https://github.com/echasnovski/mini.statusline/archive/ec3adf7813b7604275dd4a28433e9c9610b70f1b.tar.gz", - "hash": "1ny69yjvldl4jpyjpy8z4w4zz6ir976x63nds8z05zgkq8fa2ajd" + "revision": "f6917f4da995d64edf3728b1302dbd5d4561c912", + "url": "https://github.com/echasnovski/mini.statusline/archive/f6917f4da995d64edf3728b1302dbd5d4561c912.tar.gz", + "hash": "17jvy7986d0f49cwq233aclwnq0zp8dhjdq3v66iijkg16kdrfq7" }, "mini-surround": { "type": "Git", @@ -1340,9 +1438,9 @@ }, "branch": "main", "submodules": false, - "revision": "97796f68a8698d9b63ac3927da0d0bf5c3a0876b", - "url": "https://github.com/echasnovski/mini.surround/archive/97796f68a8698d9b63ac3927da0d0bf5c3a0876b.tar.gz", - "hash": "1lris02am949lqg35ql3jgyfhzya68df3yhb5d2dbfmwhk6mjxgc" + "revision": "b12fcfefd6b9b7c9e9a773bc0e3e07ae20c03351", + "url": "https://github.com/echasnovski/mini.surround/archive/b12fcfefd6b9b7c9e9a773bc0e3e07ae20c03351.tar.gz", + "hash": "037za6qh1j0rncjmh3x2lh3zzw0990j963irfc78fmpbv87msv4f" }, "mini-tabline": { "type": "Git", @@ -1353,9 +1451,9 @@ }, "branch": "main", "submodules": false, - "revision": "46108e2d32b0ec8643ee46df14badedb33f3defe", - "url": "https://github.com/echasnovski/mini.tabline/archive/46108e2d32b0ec8643ee46df14badedb33f3defe.tar.gz", - "hash": "19n37b89dxssx3p3lzr9l7pxmbdh0k2mb14ankpq3cy0ax3mi79c" + "revision": "c7bbf3e85ac1901bf170c7398ccdada8e4ea05b0", + "url": "https://github.com/echasnovski/mini.tabline/archive/c7bbf3e85ac1901bf170c7398ccdada8e4ea05b0.tar.gz", + "hash": "1l7aqxpc6ni6gkdqpp05w2pbsgj16f7ir9m9cd0qqwi3hjgm9cxq" }, "mini-test": { "type": "Git", @@ -1366,9 +1464,9 @@ }, "branch": "main", "submodules": false, - "revision": "5db2659a3bcda7890d3416cfbe49eb9c36824675", - "url": "https://github.com/echasnovski/mini.test/archive/5db2659a3bcda7890d3416cfbe49eb9c36824675.tar.gz", - "hash": "173wj06k5g8k6ah2aw4azlgwmq7jmin5jkqkkpr9z1lviagrdss7" + "revision": "62499fa5d3ee64f931ba67f5494b6a3175ac472b", + "url": "https://github.com/echasnovski/mini.test/archive/62499fa5d3ee64f931ba67f5494b6a3175ac472b.tar.gz", + "hash": "0kb77plwnifqnsl62f6azjmnr12jix0yrfkvjf5ja4m84yzlaa66" }, "mini-trailspace": { "type": "Git", @@ -1379,9 +1477,9 @@ }, "branch": "main", "submodules": false, - "revision": "9bbbf568c06fe424dc21d2c228fa76098008a5f3", - "url": "https://github.com/echasnovski/mini.trailspace/archive/9bbbf568c06fe424dc21d2c228fa76098008a5f3.tar.gz", - "hash": "1ihd8fbs5imnp5xcllcj6fgpx0y4vclrkfz802q9fl7fqh00dcay" + "revision": "3d570d015d63ad6d3f8a90f12c6b544c2400cea9", + "url": "https://github.com/echasnovski/mini.trailspace/archive/3d570d015d63ad6d3f8a90f12c6b544c2400cea9.tar.gz", + "hash": "1xvrrnl4wkxhr4dsaii8ps96w88cdfmpgy1da23kpb0y3wxyjjf4" }, "mini-visits": { "type": "Git", @@ -1392,9 +1490,9 @@ }, "branch": "main", "submodules": false, - "revision": "46e7a4074032d0340308c3379bc3650626c85da8", - "url": "https://github.com/echasnovski/mini.visits/archive/46e7a4074032d0340308c3379bc3650626c85da8.tar.gz", - "hash": "1776i3xn9dpccjjamy5ys5acc3nxd3zph4a77sbw2dipfd8zpasi" + "revision": "f2997b74f9255663c4f382ae538d4899509617f7", + "url": "https://github.com/echasnovski/mini.visits/archive/f2997b74f9255663c4f382ae538d4899509617f7.tar.gz", + "hash": "1mhjzjnqi7lzcyfikzncadpxd8ljl5jp5g8sap66n499f9nshhxq" }, "minimap-vim": { "type": "Git", @@ -1431,9 +1529,9 @@ }, "branch": "main", "submodules": false, - "revision": "1e34663c32e8f5d915921a938e0dc4e3e788ceb8", - "url": "https://github.com/mvllow/modes.nvim/archive/1e34663c32e8f5d915921a938e0dc4e3e788ceb8.tar.gz", - "hash": "07dara1m8igb6yr8jx62rl8jr71s51vxphiyk8i206bzmbx120ay" + "revision": "69407cef8b8074db0c692abb9216cb123152ef46", + "url": "https://github.com/mvllow/modes.nvim/archive/69407cef8b8074db0c692abb9216cb123152ef46.tar.gz", + "hash": "1mfp4ljjqllkf7h5kng7qqq34vdd6nxwm7yjkrqchmy0macw46m4" }, "multicursors-nvim": { "type": "GitRelease", @@ -1460,9 +1558,9 @@ }, "branch": "main", "submodules": false, - "revision": "69f798bf9493b84df660ac3c6b2fc03e23956d25", - "url": "https://github.com/nvim-neo-tree/neo-tree.nvim/archive/69f798bf9493b84df660ac3c6b2fc03e23956d25.tar.gz", - "hash": "0yybrcljbfq6xygaqzspjz3bhxa6fb7w0qypky66cvhbpzrl6blz" + "revision": "e858a443813097cba43524a6321e3976b14ec75d", + "url": "https://github.com/nvim-neo-tree/neo-tree.nvim/archive/e858a443813097cba43524a6321e3976b14ec75d.tar.gz", + "hash": "0lxjgx1yvc9sx1326v90bd00j3g75x7rb1rbvnkg7dkp6bprh80i" }, "neocord": { "type": "Git", @@ -1473,9 +1571,25 @@ }, "branch": "main", "submodules": false, - "revision": "41bacd44e9d36f5e36e0271672ac2c02f6fa355a", - "url": "https://github.com/IogaMaster/neocord/archive/41bacd44e9d36f5e36e0271672ac2c02f6fa355a.tar.gz", - "hash": "1n998zsv0bikscwpr75qq11xh559xzx6d7rs7fc21jj1rivkk4aw" + "revision": "2ebf3792a8100376bb65fd66d5dbf60f50af7529", + "url": "https://github.com/IogaMaster/neocord/archive/2ebf3792a8100376bb65fd66d5dbf60f50af7529.tar.gz", + "hash": "1ycx26ppfb5djxji1mwamr7ra29z8sm0fs9a6hhwn0l69x06x353" + }, + "neogit": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "NeogitOrg", + "repo": "neogit" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v2.0.0", + "revision": "7f97dbfc5af3b898c6660d927c23e3a96a5bd069", + "url": "https://api.github.com/repos/NeogitOrg/neogit/tarball/v2.0.0", + "hash": "0nyv64ai3765if7bdfyx01a0xmsmhm8cjvxyvh2s40bzvkx8xy17" }, "neorg": { "type": "Git", @@ -1486,9 +1600,9 @@ }, "branch": "main", "submodules": false, - "revision": "79ffd346ca19af49197d9c1b45d0b902c32c3e14", - "url": "https://github.com/nvim-neorg/neorg/archive/79ffd346ca19af49197d9c1b45d0b902c32c3e14.tar.gz", - "hash": "0czkcdfh0l8j80kaz2zpdyb424xa28c35jybkdigwj1fgi0afnzd" + "revision": "790b0444c0c654131a722817dc893332e06c72b9", + "url": "https://github.com/nvim-neorg/neorg/archive/790b0444c0c654131a722817dc893332e06c72b9.tar.gz", + "hash": "1bnqsf4v6rbw54z6ybibxz1qf0smxvzfxk938yb19jg075fsn15r" }, "neorg-telescope": { "type": "Git", @@ -1499,9 +1613,9 @@ }, "branch": "main", "submodules": false, - "revision": "ddb2556644cae922699a239bbb0fe16e25b084b7", - "url": "https://github.com/nvim-neorg/neorg-telescope/archive/ddb2556644cae922699a239bbb0fe16e25b084b7.tar.gz", - "hash": "0p2s3n22fy1vkqc9n55x6kssqs4n0znwlszfrs532hj8m992wbks" + "revision": "7fb6ca6a632c3c095601d379a664c0c1f802dc6c", + "url": "https://github.com/nvim-neorg/neorg-telescope/archive/7fb6ca6a632c3c095601d379a664c0c1f802dc6c.tar.gz", + "hash": "12pbixkb7175qb9wblq01mbpkccm9h0si7b2jjaf7yip8j8frxmn" }, "neovim-session-manager": { "type": "Git", @@ -1564,9 +1678,9 @@ }, "branch": "main", "submodules": false, - "revision": "a117163db44c256d53c3be8717f3e1a2a28e6299", - "url": "https://github.com/nvimtools/none-ls.nvim/archive/a117163db44c256d53c3be8717f3e1a2a28e6299.tar.gz", - "hash": "1qxi1wq3snhns49sl6rli5hsgjn7zzc43brnwv0b6mfzl55ydzr8" + "revision": "3ce66bc62eb363f19cceeb1fae2e71ea2bede56d", + "url": "https://github.com/nvimtools/none-ls.nvim/archive/3ce66bc62eb363f19cceeb1fae2e71ea2bede56d.tar.gz", + "hash": "1lv2x2njg67d28ff4cpg9lx39x16fgwi6svg9f6lw3b4p5mg6lpw" }, "nord": { "type": "Git", @@ -1590,9 +1704,9 @@ }, "branch": "main", "submodules": false, - "revision": "8d3bce9764e627b62b07424e0df77f680d47ffdb", - "url": "https://github.com/MunifTanjim/nui.nvim/archive/8d3bce9764e627b62b07424e0df77f680d47ffdb.tar.gz", - "hash": "0ia8q5d4xcss45vw6jlaanyr0migy03cjzq9g0kipfyqxkcxi105" + "revision": "de740991c12411b663994b2860f1a4fd0937c130", + "url": "https://github.com/MunifTanjim/nui.nvim/archive/de740991c12411b663994b2860f1a4fd0937c130.tar.gz", + "hash": "0l1ga86dr2rhfjshiicsw3nn03wrhmdqks8v1gn3xmzdgfd2anz3" }, "nvim-autopairs": { "type": "Git", @@ -1603,9 +1717,22 @@ }, "branch": "master", "submodules": false, - "revision": "6522027785b305269fa17088395dfc0f456cedd2", - "url": "https://github.com/windwp/nvim-autopairs/archive/6522027785b305269fa17088395dfc0f456cedd2.tar.gz", - "hash": "1i63wdgm54n3iiiix0y18mjvy2rsswc4iybqppsfpvi8cg2xjpa6" + "revision": "23320e75953ac82e559c610bec5a90d9c6dfa743", + "url": "https://github.com/windwp/nvim-autopairs/archive/23320e75953ac82e559c610bec5a90d9c6dfa743.tar.gz", + "hash": "12lkkyl6ink1qrpggbjfck2ab3yfj5mpa6jfgkrw451d1ycd4rz5" + }, + "nvim-biscuits": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "code-biscuits", + "repo": "nvim-biscuits" + }, + "branch": "main", + "submodules": false, + "revision": "ff1d12c8b47cd28723da593b2cfa2e98391d439a", + "url": "https://github.com/code-biscuits/nvim-biscuits/archive/ff1d12c8b47cd28723da593b2cfa2e98391d439a.tar.gz", + "hash": "18dvvg32nxrdp1ydbvxrzkdg7q214naq2bphs7y1s9zmjhyj25pm" }, "nvim-bufferline-lua": { "type": "Git", @@ -1629,9 +1756,9 @@ }, "branch": "main", "submodules": false, - "revision": "1e1900b0769324a9675ef85b38f99cca29e203b3", - "url": "https://github.com/hrsh7th/nvim-cmp/archive/1e1900b0769324a9675ef85b38f99cca29e203b3.tar.gz", - "hash": "1yqg4gnzmlm9h5rcmzv7msjmqna0ffn7gllf5knfkps5ns0ynpyf" + "revision": "b5311ab3ed9c846b585c0c15b7559be131ec4be9", + "url": "https://github.com/hrsh7th/nvim-cmp/archive/b5311ab3ed9c846b585c0c15b7559be131ec4be9.tar.gz", + "hash": "07674djcyac9wlj08y9p5gsmdpsm8zxjfgk3fwyvvx8j7qyzx74p" }, "nvim-colorizer-lua": { "type": "Git", @@ -1642,9 +1769,9 @@ }, "branch": "master", "submodules": false, - "revision": "517df88cf2afb36652830df2c655df2da416a0ae", - "url": "https://github.com/NvChad/nvim-colorizer.lua/archive/517df88cf2afb36652830df2c655df2da416a0ae.tar.gz", - "hash": "0gaxkq30wvxq3d8x6l6r10vdxyizfi5g55xnvzw69lfyl61d9qy8" + "revision": "16597180b4dd81fa3d23d88c4d2f1b49154f9479", + "url": "https://github.com/NvChad/nvim-colorizer.lua/archive/16597180b4dd81fa3d23d88c4d2f1b49154f9479.tar.gz", + "hash": "0flq77r4w90vk5sdvrwjypwq09yn4zj13z7h9zawshqy7318agy6" }, "nvim-cursorline": { "type": "Git", @@ -1668,9 +1795,9 @@ }, "branch": "master", "submodules": false, - "revision": "7aade9e99bef5f0735cf966e715b3ce45515d786", - "url": "https://github.com/mfussenegger/nvim-dap/archive/7aade9e99bef5f0735cf966e715b3ce45515d786.tar.gz", - "hash": "0cr2y3lkr6ffxxd9b2pj8hr3fzb5dlj003fcknswqwsdhws75l22" + "revision": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35", + "url": "https://github.com/mfussenegger/nvim-dap/archive/5dd4d50f2e6a2eaf9e57fad023d294ef371bda35.tar.gz", + "hash": "1x8bhcjvqrh4fyjv3lym382xli5c1xxd512v05vy5m60388dzz40" }, "nvim-dap-go": { "type": "Git", @@ -1681,9 +1808,9 @@ }, "branch": "main", "submodules": false, - "revision": "8763ced35b19c8dc526e04a70ab07c34e11ad064", - "url": "https://github.com/leoluz/nvim-dap-go/archive/8763ced35b19c8dc526e04a70ab07c34e11ad064.tar.gz", - "hash": "1s4vkq2ni9a5df455qn6qbj44r82rcghkcbkifxdcmz2kvmq3wmn" + "revision": "b4421153ead5d726603b02743ea40cf26a51ed5f", + "url": "https://github.com/leoluz/nvim-dap-go/archive/b4421153ead5d726603b02743ea40cf26a51ed5f.tar.gz", + "hash": "02i2b6w4ashkx1vnj8bclnlpnjzn2ahakq5vw6hcj04ydn4n83y2" }, "nvim-dap-ui": { "type": "Git", @@ -1694,9 +1821,9 @@ }, "branch": "master", "submodules": false, - "revision": "bc81f8d3440aede116f821114547a476b082b319", - "url": "https://github.com/rcarriga/nvim-dap-ui/archive/bc81f8d3440aede116f821114547a476b082b319.tar.gz", - "hash": "0hk34mfjxqiq82faf3q75ixpxd822vh8zbl1i5pvx6akn4v3mxk7" + "revision": "cf91d5e2d07c72903d052f5207511bf7ecdb7122", + "url": "https://github.com/rcarriga/nvim-dap-ui/archive/cf91d5e2d07c72903d052f5207511bf7ecdb7122.tar.gz", + "hash": "04378nxmh37dys2zbpwqs0wp82yr8racpmy7r44y1snx30577pfz" }, "nvim-docs-view": { "type": "Git", @@ -1733,9 +1860,9 @@ }, "branch": "master", "submodules": false, - "revision": "93b8040115c9114dac1047311763bef275e752dc", - "url": "https://github.com/mfussenegger/nvim-lint/archive/93b8040115c9114dac1047311763bef275e752dc.tar.gz", - "hash": "1115rn9npzj2xdj2zr1ayhfy76281zv0avbiyi5vgnvfg7064jmq" + "revision": "9c6207559297b24f0b7c32829f8e45f7d65b991f", + "url": "https://github.com/mfussenegger/nvim-lint/archive/9c6207559297b24f0b7c32829f8e45f7d65b991f.tar.gz", + "hash": "1llz8iwy8py2zx6j9k3yfygslwp5zqjlidhdd9gc4dqrl3854blp" }, "nvim-lspconfig": { "type": "Git", @@ -1746,9 +1873,9 @@ }, "branch": "master", "submodules": false, - "revision": "a785eb7ad5adf9341f5e9fc8bc3b25af4fdc9385", - "url": "https://github.com/neovim/nvim-lspconfig/archive/a785eb7ad5adf9341f5e9fc8bc3b25af4fdc9385.tar.gz", - "hash": "02bc6g1dq54hmg481dd2vywx1pirklymsq36dlwzg77qr2hr6701" + "revision": "4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe", + "url": "https://github.com/neovim/nvim-lspconfig/archive/4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.gz", + "hash": "1lssglccyxlzkypklr4cwz20zik0qwnv514hp06722vcrxs32pzw" }, "nvim-metals": { "type": "Git", @@ -1759,9 +1886,9 @@ }, "branch": "main", "submodules": false, - "revision": "f763b65fd71cb17d544753194fd91090e611c6e0", - "url": "https://github.com/scalameta/nvim-metals/archive/f763b65fd71cb17d544753194fd91090e611c6e0.tar.gz", - "hash": "0ayn8npywhr9j1rlhvq5kij0s3751hh89fd5qqp1iqjqr9mg4ns8" + "revision": "6af8bdcca7361fa62c9453e3d50036475a7ca4f3", + "url": "https://github.com/scalameta/nvim-metals/archive/6af8bdcca7361fa62c9453e3d50036475a7ca4f3.tar.gz", + "hash": "1yqz8g9j5jclhkmvcgxk18myxx2mr2xw49ql01qc44bfq5r6drg7" }, "nvim-navbuddy": { "type": "Git", @@ -1772,9 +1899,9 @@ }, "branch": "master", "submodules": false, - "revision": "f22bac988f2dd073601d75ba39ea5636ab6e38cb", - "url": "https://github.com/SmiteshP/nvim-navbuddy/archive/f22bac988f2dd073601d75ba39ea5636ab6e38cb.tar.gz", - "hash": "034pmg403y0y1fxnb1jv291mr016bx1vn68y543v6v4dpbdlr7di" + "revision": "a34786c77a528519f6b8a142db7609f6e387842d", + "url": "https://github.com/SmiteshP/nvim-navbuddy/archive/a34786c77a528519f6b8a142db7609f6e387842d.tar.gz", + "hash": "0b6bazh531bixskpmmpkidqii4n3m7n2cp9bmzml5wb0wibazcac" }, "nvim-navic": { "type": "Git", @@ -1785,9 +1912,9 @@ }, "branch": "master", "submodules": false, - "revision": "8649f694d3e76ee10c19255dece6411c29206a54", - "url": "https://github.com/SmiteshP/nvim-navic/archive/8649f694d3e76ee10c19255dece6411c29206a54.tar.gz", - "hash": "0964wgwh6i4nm637vx36bshkpd5i63ipwzqmrdbkz5h9bzyng7nj" + "revision": "f887d794a0f4594882814d7780980a949200a238", + "url": "https://github.com/SmiteshP/nvim-navic/archive/f887d794a0f4594882814d7780980a949200a238.tar.gz", + "hash": "0mxsnwvrjirpy2ichsilx6207z55xi42syg5d3fdgs2r1p1npggc" }, "nvim-neoclip-lua": { "type": "Git", @@ -1824,9 +1951,9 @@ }, "branch": "master", "submodules": false, - "revision": "22f29093eae7785773ee9d543f8750348b1a195c", - "url": "https://github.com/rcarriga/nvim-notify/archive/22f29093eae7785773ee9d543f8750348b1a195c.tar.gz", - "hash": "0nnxmi65ppmn8dzwh38vx2w7w6piq0i28mw0s32wa31xn5rmzwza" + "revision": "397c7c1184745fca649e5104de659e6392ef5a4d", + "url": "https://github.com/rcarriga/nvim-notify/archive/397c7c1184745fca649e5104de659e6392ef5a4d.tar.gz", + "hash": "0hjjgh730kcmc8lm1l8fwkgm9x96hkcnxw8aphi8q7m3yvfl205r" }, "nvim-scrollbar": { "type": "Git", @@ -1837,9 +1964,9 @@ }, "branch": "main", "submodules": false, - "revision": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49", - "url": "https://github.com/petertriho/nvim-scrollbar/archive/6994eb9f73d5fdc36ee2c8717940e8c853e51a49.tar.gz", - "hash": "0h01gcaqgjkb2392zl2jwvlsh5qmz10k9sy5rhyz1kwizmw7nw7y" + "revision": "5b103ef0fd2e8b9b4be3878ed38d224522192c6c", + "url": "https://github.com/petertriho/nvim-scrollbar/archive/5b103ef0fd2e8b9b4be3878ed38d224522192c6c.tar.gz", + "hash": "1bh34njkvlbkjzy62w48rzjmliaj6lczgxxkks455r0w7yvfklv7" }, "nvim-surround": { "type": "Git", @@ -1850,9 +1977,9 @@ }, "branch": "main", "submodules": false, - "revision": "caf6f633d4d77a29b6e265b560c5a035d171a913", - "url": "https://github.com/kylechui/nvim-surround/archive/caf6f633d4d77a29b6e265b560c5a035d171a913.tar.gz", - "hash": "130y0b2f69y5rzm64ss34a9zyqkpkybr2d1s4p0pcvvaq1ngq0r0" + "revision": "7a7a78a52219a3312c1fcabf880cea07a7956a5f", + "url": "https://github.com/kylechui/nvim-surround/archive/7a7a78a52219a3312c1fcabf880cea07a7956a5f.tar.gz", + "hash": "1vs1akksdbqq818phf95j0ml1rabwrv6vsnl1knsxw0yrmspisaj" }, "nvim-tree-lua": { "type": "Git", @@ -1863,9 +1990,9 @@ }, "branch": "master", "submodules": false, - "revision": "44d9b58f11d5a426c297aafd0be1c9d45617a849", - "url": "https://github.com/nvim-tree/nvim-tree.lua/archive/44d9b58f11d5a426c297aafd0be1c9d45617a849.tar.gz", - "hash": "0gya49yydrbq5jylsk4b9c2cpygy0mxhr6kwdsbg0di0i74pkav0" + "revision": "a9156c013916d3c8a2905ab2e26e9dd74beb642e", + "url": "https://github.com/nvim-tree/nvim-tree.lua/archive/a9156c013916d3c8a2905ab2e26e9dd74beb642e.tar.gz", + "hash": "0ivcsbcvwl2xfslrn7x5ncx89hlh7lnbqkwlb38a8yaxsv95ayf7" }, "nvim-treesitter-context": { "type": "Git", @@ -1876,9 +2003,22 @@ }, "branch": "master", "submodules": false, - "revision": "93b29a32d5f4be10e39226c6b796f28d68a8b483", - "url": "https://github.com/nvim-treesitter/nvim-treesitter-context/archive/93b29a32d5f4be10e39226c6b796f28d68a8b483.tar.gz", - "hash": "12ixiqb4bj7n3kkzqi81hyhn3bjsb93250gvfy12bxya2l5bi20g" + "revision": "59f318a65d42a5c4037796886a8874fd57f774fc", + "url": "https://github.com/nvim-treesitter/nvim-treesitter-context/archive/59f318a65d42a5c4037796886a8874fd57f774fc.tar.gz", + "hash": "09giakcby7gmif3sdqrfv8201q1w8n56d7g59qwbmfcw5vm6wb9k" + }, + "nvim-treesitter-textobjects": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-textobjects" + }, + "branch": "master", + "submodules": false, + "revision": "89ebe73cd2836db80a22d9748999ace0241917a5", + "url": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects/archive/89ebe73cd2836db80a22d9748999ace0241917a5.tar.gz", + "hash": "1lvny4hzw0h8f1xdz78ga24w9w7j68ha68sjs9mvqsxn6xqh4ngr" }, "nvim-ts-autotag": { "type": "Git", @@ -1902,9 +2042,9 @@ }, "branch": "main", "submodules": false, - "revision": "5b75cf5fdb74054fc8badb2e7ca9911dc0470d94", - "url": "https://github.com/kevinhwang91/nvim-ufo/archive/5b75cf5fdb74054fc8badb2e7ca9911dc0470d94.tar.gz", - "hash": "0arbnim2lchd4khrr06f5n0vsj29ahrs7v277j9vmnkmrfpjzvhb" + "revision": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1", + "url": "https://github.com/kevinhwang91/nvim-ufo/archive/80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1.tar.gz", + "hash": "1rwk6hfkpvmm9sbbrqy89aacb00myha2ggsmfqqpnv06vmr68z34" }, "nvim-web-devicons": { "type": "Git", @@ -1915,9 +2055,9 @@ }, "branch": "master", "submodules": false, - "revision": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c", - "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/4c3a5848ee0b09ecdea73adcd2a689190aeb728c.tar.gz", - "hash": "1a3pkkjdv99nzmh9rf3rn4x1wwhbrr7497ln7xlnkczmk9faz8r4" + "revision": "4a8369f4c78ef6f6f895f0cec349e48f74330574", + "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/4a8369f4c78ef6f6f895f0cec349e48f74330574.tar.gz", + "hash": "0m4cyg9l3pxjqjlzh5rvi183cqlw2l6lz61dc1xyh9hls9qhx36l" }, "obsidian-nvim": { "type": "Git", @@ -1932,6 +2072,19 @@ "url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz", "hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr" }, + "oil-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "stevearc", + "repo": "oil.nvim" + }, + "branch": "master", + "submodules": false, + "revision": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc", + "url": "https://github.com/stevearc/oil.nvim/archive/bbad9a76b2617ce1221d49619e4e4b659b3c61fc.tar.gz", + "hash": "1x5dlwga3j17i6j3ycycl93pry8ccwji9ii3vjlsgp30053kl4hs" + }, "omnisharp-extended-lsp-nvim": { "type": "Git", "repository": { @@ -1954,9 +2107,9 @@ }, "branch": "master", "submodules": false, - "revision": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6", - "url": "https://github.com/navarasu/onedark.nvim/archive/67a74c275d1116d575ab25485d1bfa6b2a9c38a6.tar.gz", - "hash": "1pfyz3ascxs3sxl878qcirp9jsz77kpl2ks3wxkcv8ql4psymc9l" + "revision": "11de4da47f3e69cb70c3ae9816bd8af166cbe121", + "url": "https://github.com/navarasu/onedark.nvim/archive/11de4da47f3e69cb70c3ae9816bd8af166cbe121.tar.gz", + "hash": "1cqpd4yvcd6szbs95kxxr77mhfvgxcpjfybw8chlnnnwxxyh1k54" }, "orgmode": { "type": "Git", @@ -1967,9 +2120,9 @@ }, "branch": "master", "submodules": false, - "revision": "145dce4d2f1bbaed5ff9e353822981b783627b32", - "url": "https://github.com/nvim-orgmode/orgmode/archive/145dce4d2f1bbaed5ff9e353822981b783627b32.tar.gz", - "hash": "0vy5wx8kwf0k7sx27cy6lcqvni5njq1nhcj2yxk8xkdn61wk7gyi" + "revision": "468570f42d7b0a402d407a993344e29dcb6f2c8e", + "url": "https://github.com/nvim-orgmode/orgmode/archive/468570f42d7b0a402d407a993344e29dcb6f2c8e.tar.gz", + "hash": "0llrh32d9995svca0dvx9iq98svbrlw86i2h1b8pr5vgy26dyzqq" }, "otter-nvim": { "type": "Git", @@ -1980,9 +2133,9 @@ }, "branch": "main", "submodules": false, - "revision": "622816aac66933352e20e4d5d01993cd270d6fb0", - "url": "https://github.com/jmbuhr/otter.nvim/archive/622816aac66933352e20e4d5d01993cd270d6fb0.tar.gz", - "hash": "15ciqkx3hbbccy30dkga17jhra4mslvas0qnqiqrv5qlc09shyrp" + "revision": "fcc8cf1eeb39f16c309bb27a7ff140ddf87c9fcb", + "url": "https://github.com/jmbuhr/otter.nvim/archive/fcc8cf1eeb39f16c309bb27a7ff140ddf87c9fcb.tar.gz", + "hash": "10p2pm209fvpxk58nm8b5l2a4pz42r9xqg2fx7c4dvvf39jqhwjw" }, "oxocarbon": { "type": "Git", @@ -1993,9 +2146,9 @@ }, "branch": "main", "submodules": false, - "revision": "004777819ba294423b638a35a75c9f0c7be758ed", - "url": "https://github.com/nyoom-engineering/oxocarbon.nvim/archive/004777819ba294423b638a35a75c9f0c7be758ed.tar.gz", - "hash": "1qllk870nqc9nhkdgmqm8km2rar6dsmyhfhpcfx8crrg640yfbqy" + "revision": "1dc7b7ea9df60edd9547b667fd1f789ce9f028fb", + "url": "https://github.com/nyoom-engineering/oxocarbon.nvim/archive/1dc7b7ea9df60edd9547b667fd1f789ce9f028fb.tar.gz", + "hash": "1928b611jfzp8alk3v5dl5pdwr0a3qicwdha7mhdkwci7x13ac3y" }, "pathlib-nvim": { "type": "Git", @@ -2019,9 +2172,9 @@ }, "branch": "master", "submodules": false, - "revision": "857c5ac632080dba10aae49dba902ce3abf91b35", - "url": "https://github.com/nvim-lua/plenary.nvim/archive/857c5ac632080dba10aae49dba902ce3abf91b35.tar.gz", - "hash": "0jxx9nfga7z87v78cifglqs8w4mrpf99wcp483kb0hbv6537jmgh" + "revision": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "url": "https://github.com/nvim-lua/plenary.nvim/archive/b9fd5226c2f76c951fc8ed5923d85e4de065e509.tar.gz", + "hash": "1kg043h7dqcrqqgg8pp6hsldx7jdhlh8qwad2kkckia191xgnjgm" }, "precognition-nvim": { "type": "Git", @@ -2032,9 +2185,9 @@ }, "branch": "main", "submodules": false, - "revision": "4223fb903cbafc3bd8a87a314dac375bbd1c01ce", - "url": "https://github.com/tris203/precognition.nvim/archive/4223fb903cbafc3bd8a87a314dac375bbd1c01ce.tar.gz", - "hash": "11ng6p0xmrjky5xr9jdkrrav7is9r090qhs2fsnbg16124bgb0g5" + "revision": "a0ed9c97b24002394201c39755e10495d47b2d3f", + "url": "https://github.com/tris203/precognition.nvim/archive/a0ed9c97b24002394201c39755e10495d47b2d3f.tar.gz", + "hash": "15gsd3cyx5na06nwy2p5jj68j6ln5mfjx2v7dvyyns3q6g8k98nl" }, "project-nvim": { "type": "Git", @@ -2071,9 +2224,9 @@ }, "branch": "master", "submodules": false, - "revision": "de39919a57e1a40a4c7dc5bae0de276f9c616ef3", - "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/de39919a57e1a40a4c7dc5bae0de276f9c616ef3.tar.gz", - "hash": "04a3y7kyszgjgi1nmjb41vwwpz4svkxh61zkbxrn4ajvxz1ia05i" + "revision": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7", + "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/97bf4b8ef9298644a29fcd9dd41a0210cf08cac7.tar.gz", + "hash": "045zcmzsxi5hh10a26qr96szg9kvkr7b12n841x7dck4vj9j2dk3" }, "registers-nvim": { "type": "Git", @@ -2097,9 +2250,9 @@ }, "branch": "main", "submodules": false, - "revision": "a1fc4e559252baa128c471adadf0be045abd542d", - "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/a1fc4e559252baa128c471adadf0be045abd542d.tar.gz", - "hash": "0n9zis5jf7khjdmc622g40is5yjsqkxph64mldpd3q8ka64yaib1" + "revision": "5c0e241bdbd208b7ae546009378d6bc93c083ef3", + "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/5c0e241bdbd208b7ae546009378d6bc93c083ef3.tar.gz", + "hash": "16sygfwzmlgbsymlmrbii9vhblgyn8qn1clcjaah7rwby0bwkzq7" }, "rose-pine": { "type": "Git", @@ -2110,9 +2263,9 @@ }, "branch": "main", "submodules": false, - "revision": "7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3", - "url": "https://github.com/rose-pine/neovim/archive/7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3.tar.gz", - "hash": "0iy9is76bhgb17v0l7mr95mkhd9b4ah917v9shx74jp1xsgc481q" + "revision": "72befaffeac38db7bdd49e0549eaa2c4806dd878", + "url": "https://github.com/rose-pine/neovim/archive/72befaffeac38db7bdd49e0549eaa2c4806dd878.tar.gz", + "hash": "05f61gwsbppc14j6cabi30qrgj43i7sgal9r8b3qz7s5mcwaz0jx" }, "rtp-nvim": { "type": "Git", @@ -2149,9 +2302,25 @@ }, "branch": "master", "submodules": false, - "revision": "1486b5a2cc0de646d6d0837ec77127c9d6e2c50f", - "url": "https://github.com/mrcjkb/rustaceanvim/archive/1486b5a2cc0de646d6d0837ec77127c9d6e2c50f.tar.gz", - "hash": "1gl4i8pbmia78srxcsi131vxby5d8w9mn0ydzl3r0v7pawyvwr9q" + "revision": "f845bb055397019c4bc70f9c76376ca490f4c783", + "url": "https://github.com/mrcjkb/rustaceanvim/archive/f845bb055397019c4bc70f9c76376ca490f4c783.tar.gz", + "hash": "06l8vppliivz53dyx6yqj0zigns62sg97cbw9mcjml77i78dc393" + }, + "smart-splits": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "mrjones2014", + "repo": "smart-splits.nvim" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v2.0.3", + "revision": "0670128ccecbec2e49d493d58ee6471d6edb7367", + "url": "https://api.github.com/repos/mrjones2014/smart-splits.nvim/tarball/v2.0.3", + "hash": "0lgcsysddq5jqkbz0064wc16pr897mmh4myxs2q2ax7f55lq3yyd" }, "smartcolumn-nvim": { "type": "Git", @@ -2162,9 +2331,9 @@ }, "branch": "main", "submodules": false, - "revision": "92f3773af80d674f1eb61e112dca79e2fa449fd1", - "url": "https://github.com/m4xshen/smartcolumn.nvim/archive/92f3773af80d674f1eb61e112dca79e2fa449fd1.tar.gz", - "hash": "0k1xnyvblshn4fhbxgl0i34j22n55xlwr09sdmb23l57br5rb07q" + "revision": "b9cdbdf42f7ac5a659204cd5926017c7ff724a19", + "url": "https://github.com/m4xshen/smartcolumn.nvim/archive/b9cdbdf42f7ac5a659204cd5926017c7ff724a19.tar.gz", + "hash": "1x90vxghilh75alqfyasfpm8s5ir73kg7ji48wh5lkbhyqxz81j0" }, "snacks-nvim": { "type": "GitRelease", @@ -2182,6 +2351,35 @@ "url": "https://api.github.com/repos/folke/snacks.nvim/tarball/v2.22.0", "hash": "1hbm4fnw51qdp0nz83fcxbvnxjq2k57a37w6dp0wz6wkcx7cwxw9" }, + "solarized": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "maxmx03", + "repo": "solarized.nvim" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v3.6.0", + "revision": "c0dfe1cbfabd93b546baf5f1408f5df7e02e2050", + "url": "https://api.github.com/repos/maxmx03/solarized.nvim/tarball/v3.6.0", + "hash": "1fz1wc569w26aanmj3hhsc17xrx29g6bfsjsbgssa7jq76aavp3w" + }, + "solarized-osaka": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "craftzdog", + "repo": "solarized-osaka.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "f796014c14b1910e08d42cc2077fef34f08e0295", + "url": "https://github.com/craftzdog/solarized-osaka.nvim/archive/f796014c14b1910e08d42cc2077fef34f08e0295.tar.gz", + "hash": "0jy2hk4fc210jih30ybvisr9pliya1s3nazw4d131vh5k4p1xqi6" + }, "sqls-nvim": { "type": "Git", "repository": { @@ -2195,6 +2393,19 @@ "url": "https://github.com/nanotee/sqls.nvim/archive/d1bc5421ef3e8edc5101e37edbb7de6639207a09.tar.gz", "hash": "1j4n5c8h1iriqzsjxr0wvz70g9lf6d4lm3nyxlpwy9dqmbj8w0kd" }, + "supermaven-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "supermaven-inc", + "repo": "supermaven-nvim" + }, + "branch": "main", + "submodules": false, + "revision": "07d20fce48a5629686aefb0a7cd4b25e33947d50", + "url": "https://github.com/supermaven-inc/supermaven-nvim/archive/07d20fce48a5629686aefb0a7cd4b25e33947d50.tar.gz", + "hash": "1h9h98wsnfhkfdmdxjvr2d4idhrvp4i56pp4q6l0m4d2i0ldcgfp" + }, "tabular": { "type": "Git", "repository": { @@ -2217,9 +2428,9 @@ }, "branch": "master", "submodules": false, - "revision": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5", - "url": "https://github.com/nvim-telescope/telescope.nvim/archive/a4ed82509cecc56df1c7138920a1aeaf246c0ac5.tar.gz", - "hash": "0vc2fr5nhbc39d55zn09fh8zpy4472ic4xmwvmk5dda8fqw76p8q" + "revision": "b4da76be54691e854d3e0e02c36b0245f945c2c7", + "url": "https://github.com/nvim-telescope/telescope.nvim/archive/b4da76be54691e854d3e0e02c36b0245f945c2c7.tar.gz", + "hash": "161qlx099ymi62qsd89srda605ynks1sswx3djamrwqp3dxb9596" }, "tiny-devicons-auto-colors-nvim": { "type": "Git", @@ -2308,9 +2519,22 @@ }, "branch": "master", "submodules": false, - "revision": "10e6ec6f00365639e383fa8e95a32058dad53b22", - "url": "https://github.com/chomosuke/typst-preview.nvim/archive/10e6ec6f00365639e383fa8e95a32058dad53b22.tar.gz", - "hash": "1va3yw7iq5170ilfzd0fvpvkbkxn2yqk413j64ymg31aql8amgjc" + "revision": "dea4525d5420b7c32eebda7de15a6beb9d6574fa", + "url": "https://github.com/chomosuke/typst-preview.nvim/archive/dea4525d5420b7c32eebda7de15a6beb9d6574fa.tar.gz", + "hash": "0y658l2ibq0x4cwa4rl3lab7aw4ba68xcrdnxp81p2rsk0d60qq4" + }, + "undotree": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mbbill", + "repo": "undotree" + }, + "branch": "master", + "submodules": false, + "revision": "28f2f54a34baff90ea6f4a735ef1813ad875c743", + "url": "https://github.com/mbbill/undotree/archive/28f2f54a34baff90ea6f4a735ef1813ad875c743.tar.gz", + "hash": "0k9qfp64rbwy1lc62x0vkwfl3qlx8633lfbhqxkf64yqwi81ysp5" }, "vim-dirtytalk": { "type": "Git", @@ -2334,9 +2558,9 @@ }, "branch": "master", "submodules": false, - "revision": "4a745ea72fa93bb15dd077109afbb3d1809383f2", - "url": "https://github.com/tpope/vim-fugitive/archive/4a745ea72fa93bb15dd077109afbb3d1809383f2.tar.gz", - "hash": "188l24j7j57hgs02gy6ch165agyrwr4g034c5j3m1vnw14vmw2yl" + "revision": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4", + "url": "https://github.com/tpope/vim-fugitive/archive/61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4.tar.gz", + "hash": "1fk02wb2g52lqxxp1gx551bbv7nmambwjiqfgcp4ypn2n4wnhzxv" }, "vim-illuminate": { "type": "Git", @@ -2347,9 +2571,9 @@ }, "branch": "master", "submodules": false, - "revision": "19cb21f513fc2b02f0c66be70107741e837516a1", - "url": "https://github.com/RRethy/vim-illuminate/archive/19cb21f513fc2b02f0c66be70107741e837516a1.tar.gz", - "hash": "1wfri17br6yqxnci43g69mvbckb7ajhj3c0mlcn1g0s7jkxz4acd" + "revision": "0d1e93684da00ab7c057410fecfc24f434698898", + "url": "https://github.com/RRethy/vim-illuminate/archive/0d1e93684da00ab7c057410fecfc24f434698898.tar.gz", + "hash": "0456q474765p0r0q7frn1n9drl05d16alv7kn9qnw1235d20k81a" }, "vim-markdown": { "type": "Git", @@ -2377,6 +2601,19 @@ "url": "https://github.com/tpope/vim-repeat/archive/65846025c15494983dafe5e3b46c8f88ab2e9635.tar.gz", "hash": "0n8sx6s2sbjb21dv9j6y5lyqda9vvxraffg2jz423daamn96dxqv" }, + "vim-sleuth": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tpope", + "repo": "vim-sleuth" + }, + "branch": "master", + "submodules": false, + "revision": "be69bff86754b1aa5adcbb527d7fcd1635a84080", + "url": "https://github.com/tpope/vim-sleuth/archive/be69bff86754b1aa5adcbb527d7fcd1635a84080.tar.gz", + "hash": "0wqxdjgplf04nq428ialw1w03f8nh5vb629a17vl5gc9gf3zfanq" + }, "vim-startify": { "type": "Git", "repository": { @@ -2412,9 +2649,9 @@ }, "branch": "main", "submodules": false, - "revision": "a21a0b4f593e1fb17b17882f1ab3a3c1b943b831", - "url": "https://github.com/gbprod/yanky.nvim/archive/a21a0b4f593e1fb17b17882f1ab3a3c1b943b831.tar.gz", - "hash": "1sk3acrwwmx9wfxnfymgvl88bnp0xh8a30pyx040czrj3zl5l920" + "revision": "04775cc6e10ef038c397c407bc17f00a2f52b378", + "url": "https://github.com/gbprod/yanky.nvim/archive/04775cc6e10ef038c397c407bc17f00a2f52b378.tar.gz", + "hash": "024dw52ji4691ndkaz3k12fx6qyvhdpd2r69r9d2isy81fbs2fjm" } }, "version": 5 diff --git a/npins/sources.nix b/npins/sources.nix index 162f1d94..3ae0b99e 100644 --- a/npins/sources.nix +++ b/npins/sources.nix @@ -98,7 +98,9 @@ builtins.mapAttrs Channel = getZip; Tarball = getUrl; } - .${spec.type} + .${ + spec.type + } or (builtins.throw "Unknown source type ${spec.type}"); in spec // {outPath = mayOverride (func spec);} diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..8d17121f --- /dev/null +++ b/shell.nix @@ -0,0 +1,7 @@ +# Make the behaviour of `nix-shell` consistent with the one of `nix develop` +# by returning the default devShell output from the flake. This is useful when +# I do not want to work with direnv, or simply need backwards compatibility. +{system ? builtins.currentSystem}: let + nvf = import ./.; +in + nvf.devShells.${system}.default