mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
Merge branch 'main' into machine-tests
This commit is contained in:
commit
09b2c4ec39
48 changed files with 1410 additions and 716 deletions
80
.github/CONTRIBUTING.md
vendored
80
.github/CONTRIBUTING.md
vendored
|
@ -2,48 +2,72 @@
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [Welcome](#welcome)
|
- [Preface](#preface)
|
||||||
- [Contributing](#contributing)
|
- [Contributing Process](#contributing-process)
|
||||||
- [Code of Conduct](#code-of-conduct)
|
- [Code of Conduct](#code-of-conduct)
|
||||||
|
|
||||||
## Welcome
|
## Preface
|
||||||
|
|
||||||
I'm glad you are thinking about contributing to nvf! If you're unsure about
|
[LICENSE]: ../LICENSE
|
||||||
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.
|
|
||||||
|
|
||||||
Before you contribute, I encourage you to read this project's CONTRIBUTING
|
I am glad you are thinking about contributing to nvf! The project is shaped by
|
||||||
policy (you are here) and its [LICENSE](../LICENSE) to understand how your
|
contributors and user feedback, and all contributions are appreciated.
|
||||||
contributions are licensed.
|
|
||||||
|
|
||||||
If you have any questions regarding those files, feel free to open an issue or
|
If you are unsure about anything, whether a change is necessary or if it would
|
||||||
[shoot me an email](mailto:me@notashelf.dev). Discussions tab is also available
|
be accepted _had_ you created a PR, please just ask! Or submit the issue or pull
|
||||||
for more informal discussions.
|
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
|
If you have any questions regarding those files, or would like to ask a question
|
||||||
[pull request template](PULL_REQUEST_TEMPLATE/pull_request_template.md). You
|
that is not covered by any of them, please feel free to open an issue!
|
||||||
will find a checklist of items to complete before submitting a pull request.
|
Discussions tab is also available for less formal discussions. You may also
|
||||||
Please make sure you complete it before submitting a pull request. If you are
|
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.
|
unsure about any of the items, please ask.
|
||||||
|
|
||||||
### Guidelines
|
### Guidelines
|
||||||
|
|
||||||
We provide instructions on a healthy contribution to neovim-flake - including
|
We provide instructions for a healthy contribution to nvf. This includes
|
||||||
styling, commit formats, how-to guides for adding new modules and options. You
|
**styling**, **commit formats**, **how-to guides for common contributions**. You
|
||||||
are very well recommended to read the contributing guidelines over at
|
are strongly encouraged to read the contributing guidelines in full over at
|
||||||
[the documentation](https://notashelf.github.io/nvf#hacking)
|
[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
|
### Code of Conduct
|
||||||
|
|
||||||
This project does not quite have a code of conduct yet. And to be perfectly
|
This project does not have a formal 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
|
honest I am not entirely positive if I want one or if it will _ever_ have one.
|
||||||
expecting this project to be a hotbed of activity, but I do want to make sure
|
This project is not expected to be a hotbed of activity, and I trust my
|
||||||
that everyone who does contribute feels welcome and safe. As such, I will do my
|
contributors to keep it civil and respectful.
|
||||||
best to make sure that those who distrupt the project are dealt with swiftly and
|
|
||||||
appropriately.
|
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
|
If you feel that you are not being treated with respect, please contact me
|
||||||
directly.
|
directly.
|
||||||
|
|
120
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
120
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
|
@ -1,60 +1,120 @@
|
||||||
name: "🐛 Bug Report"
|
name: "🐛 Bug Report"
|
||||||
description: "Submit a bug report to help us improve"
|
description: "Submit a bug report to help us improve nvf"
|
||||||
#title: "[Bug] "
|
title: "<short description of the bug>"
|
||||||
labels: [bug]
|
labels: [bug]
|
||||||
body:
|
body:
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: no-duplicate-issues
|
|
||||||
attributes:
|
attributes:
|
||||||
label: "⚠️ Please verify that this bug has NOT been reported before."
|
label: I have confirmed that this is a bug related to nvf
|
||||||
description: "Search in the issues sections by clicking [HERE](https://github.com/notashelf/neovim-flake/issues?q=)"
|
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:
|
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
|
- type: textarea
|
||||||
id: description
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
attributes:
|
attributes:
|
||||||
label: "Description"
|
label: Description
|
||||||
description: "You could also upload screenshots, if necessary"
|
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
|
- type: textarea
|
||||||
id: steps-to-reproduce
|
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:
|
validations:
|
||||||
required: true
|
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
|
- type: textarea
|
||||||
id: expected-behavior
|
id: expected-behavior
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: "👀 Expected behavior"
|
label: Expected behavior
|
||||||
description: "What did you think would or should happen?"
|
description: "What did you think would or should happen?"
|
||||||
placeholder: "..."
|
placeholder: "..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: actual-behavior
|
id: actual-behavior
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: "😓 Actual Behavior"
|
label: Actual Behavior
|
||||||
description: "What actually happen?"
|
description: "What actually happen?"
|
||||||
placeholder: "..."
|
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:
|
validations:
|
||||||
required: true
|
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
|
- type: textarea
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
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
|
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:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
76
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
76
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
|
@ -1,58 +1,72 @@
|
||||||
name: 🚀 Feature Request
|
name: 🚀 Feature Request
|
||||||
description: "Propose a new feature"
|
description: "Propose a new feature"
|
||||||
#title: "[Feature] "
|
title: "<short description of the desired addition>"
|
||||||
labels: [feature-request]
|
labels: [feature-request]
|
||||||
body:
|
body:
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: no-duplicate-issues
|
|
||||||
attributes:
|
attributes:
|
||||||
label: "⚠️ Please verify that this feature request has NOT been suggested before."
|
label: I have verified that this feature request has not been made before
|
||||||
description: "Search in the issues sections by clicking [HERE](https://github.com/notashelf/neovim-flake/issues?q=)"
|
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:
|
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
|
- type: dropdown
|
||||||
id: feature-area
|
id: feature-area
|
||||||
attributes:
|
attributes:
|
||||||
label: "🏷️ Feature Type"
|
label: Feature Type
|
||||||
description: "What kind of a feature request is this?"
|
description: Please describe the kind of addition this is
|
||||||
multiple: true
|
multiple: true
|
||||||
options:
|
options:
|
||||||
- New Command
|
- New Plugin
|
||||||
- New Addon
|
- Update Request (Plugin/Nixpkgs)
|
||||||
- API Additions
|
- Documentation Updates
|
||||||
- Other
|
- Other
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: feature-description
|
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:
|
validations:
|
||||||
required: true
|
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
|
- type: textarea
|
||||||
id: alternatives
|
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:
|
validations:
|
||||||
required: false
|
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
|
- type: textarea
|
||||||
id: additional-context
|
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:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
attributes:
|
|
||||||
label: "📝 Additional Context"
|
|
||||||
description: "Add any other context or screenshots about the feature request here."
|
|
||||||
placeholder: "..."
|
|
||||||
|
|
14
.github/workflows/check.yml
vendored
14
.github/workflows/check.yml
vendored
|
@ -39,6 +39,17 @@ jobs:
|
||||||
- name: Check formatting via Alejandra
|
- name: Check formatting via Alejandra
|
||||||
run: nix run nixpkgs#alejandra -- --check . --exclude npins
|
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:
|
check-typos:
|
||||||
name: "Check source tree for typos"
|
name: "Check source tree for typos"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -142,7 +153,8 @@ jobs:
|
||||||
- name: Checking Editorconfig conformance
|
- name: Checking Editorconfig conformance
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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() }}
|
- if: ${{ failure() }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
<!-- markdownlint-disable MD013 MD033 MD041-->
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="assets/nvf-logo-work.svg" alt="nvf Logo" width="200">
|
<img src=".github/assets/nvf-logo-work.svg" alt="nvf Logo" width="192">
|
||||||
<br/>
|
<br/>
|
||||||
<h1>nvf</h1>
|
<h1>nvf</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,11 +47,10 @@
|
||||||
[Features]: #features
|
[Features]: #features
|
||||||
[Get Started]: #get-started
|
[Get Started]: #get-started
|
||||||
[Documentation]: #documentation
|
[Documentation]: #documentation
|
||||||
[Help]: #help
|
[Help]: #getting-help
|
||||||
[Contribute]: #contributing
|
[Contribute]: #contributing
|
||||||
[FAQ]: #frequently-asked-questions
|
[FAQ]: #frequently-asked-questions
|
||||||
[Credits]: #credits
|
[Credits]: #credits
|
||||||
[License]: #license
|
|
||||||
|
|
||||||
**[<kbd><br> Features <br></kbd>][Features]**
|
**[<kbd><br> Features <br></kbd>][Features]**
|
||||||
**[<kbd><br> Get Started <br></kbd>][Get Started]**
|
**[<kbd><br> Get Started <br></kbd>][Get Started]**
|
||||||
|
@ -84,21 +84,22 @@
|
||||||
customizable through the Nix module system.
|
customizable through the Nix module system.
|
||||||
- Not comfortable with a full-nix config or want to bring your Lua config? You
|
- Not comfortable with a full-nix config or want to bring your Lua config? You
|
||||||
can do just that, no unnecessary restrictions.
|
can do just that, no unnecessary restrictions.
|
||||||
- Lazyloading 💤? We got it! Lazyload both internal and external plugins at
|
- Lazyloading? We got it! Lazyload both internal and external plugins at will
|
||||||
will.
|
💤 .
|
||||||
- nvf allows _ordering configuration bits_ using [DAG] (_Directed acyclic
|
- nvf allows _ordering configuration bits_ using [DAG] (_Directed acyclic
|
||||||
graph_)s. It has never been easier to construct an editor configuration
|
graph_)s. It has never been easier to construct an editor configuration
|
||||||
deterministically!
|
deterministically!
|
||||||
- nvf exposes everything you need to avoid a vendor lock-in. Which means you
|
- 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
|
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.
|
for them! Though, of course, feel free to request them.
|
||||||
- Use plugins from anywhere. Inputs, npins, nixpkgs... You name it.
|
- Use plugins from anywhere: inputs, npins, nixpkgs... You name it.
|
||||||
- Add your own modules, with ease. It's all built-in!
|
- Add your own modules with ease. It's all built-in!
|
||||||
- **Well-documented**: Documentation is priority. You will _never_ face
|
- **Well-documented**: Documentation is priority. You will _never_ face
|
||||||
undocumented, obscure behaviour.
|
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.
|
- 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
|
- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and
|
||||||
will, remain maintainable for myself and any contributors.
|
will, remain maintainable for myself and any contributors.
|
||||||
- **Community-Led**: we would like nvf to be fully capable of accomplishing what
|
- **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
|
```bash
|
||||||
# Run the default package
|
# 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
|
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.
|
configurable.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> The flake exposes `#nix` as the default package, providing minimal language
|
> The flake exposes `nix` as the default package, which will be evaluated when
|
||||||
> support and various utilities. You may also use the `#nix` or `#maximal`
|
> you run `nix build` or `nix run` on this repo. It is minimal, and providing
|
||||||
> packages provided by the this flake to get try out different configurations.
|
> 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.
|
It is as simple as changing the target output in your `nix run` command to get a
|
||||||
For example, to get a configuration with large language coverage, run:
|
different configuration. For example, to get a configuration with large language
|
||||||
|
coverage, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run the maximal package
|
# 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
|
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]
|
> [!NOTE]
|
||||||
> The `maximal` configuration is quite large, and might take a while to build.
|
> The `maximal` configuration is quite large, and might take a while to build.
|
||||||
|
@ -155,6 +161,10 @@ instructions.
|
||||||
|
|
||||||
## Documentation
|
## 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
|
### Installation
|
||||||
|
|
||||||
The _recommended_ way of installing nvf is using either the NixOS or the
|
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,
|
See the rendered [nvf manual] for detailed and up-to-date installation guides,
|
||||||
configurations, available options, release notes and more. Tips for installing
|
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]
|
> [!TIP]
|
||||||
> While using NixOS or Home-Manager modules,
|
> 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
|
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.
|
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
|
We are not yet on spaces like matrix or IRC, so please use the issue tracker for
|
||||||
for now.
|
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
|
||||||
|
|
||||||
|
[contributing guide]: .github/CONTRIBUTING.md
|
||||||
|
|
||||||
I am always looking for new ways to help improve this flake. If you would like
|
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
|
to contribute, please read the [contributing guide] before submitting a pull
|
||||||
submitting a pull request. You can also create an issue on the [issue tracker]
|
request. You can also create an issue on the [issue tracker] before submitting a
|
||||||
before submitting a pull request if you would like to discuss a feature or bug
|
pull request if you would like to discuss a feature or bug fix.
|
||||||
fix.
|
|
||||||
|
|
||||||
## Frequently Asked Questions
|
## 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
|
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
|
[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
|
_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?
|
**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
|
**A**: Yes! Add `"~/.config/nvim"` to `vim.additionalRuntimePaths = [ ... ]` and
|
||||||
any plugins you want to load to `vim.startPlugins`. This will load your
|
any plugins you want to load to `vim.startPlugins`. This will load your
|
||||||
configuration from `~/.config/nvim`. You may still use `vim.*` to modify
|
configuration from `~/.config/nvim`. You may still use `vim.*` options in Nix to
|
||||||
Neovim's behaviour with Nix.
|
further configure Neovim.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
### Co-Maintainers
|
### Co-Maintainers
|
||||||
|
|
||||||
Alongside [myself](https://github.com/notashelf), nvf is developed by those
|
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.
|
contributions.
|
||||||
|
|
||||||
- [**@horriblename**](https://github.com/horriblename)
|
- [**@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.
|
planned features and quality of life updates.
|
||||||
- [**@Soliprem**](https://github.com/soliprem) - For rigorously implementing
|
- [**@Soliprem**](https://github.com/soliprem) - For rigorously implementing
|
||||||
missing features and excellent work on new language modules.
|
missing features and excellent work on new language modules.
|
|
@ -43,7 +43,7 @@ isMaximal: {
|
||||||
# This section does not include a comprehensive list of available language modules.
|
# This section does not include a comprehensive list of available language modules.
|
||||||
# To list all available language module options, please visit the nvf manual.
|
# To list all available language module options, please visit the nvf manual.
|
||||||
languages = {
|
languages = {
|
||||||
enableFormat = true; #
|
enableFormat = true;
|
||||||
enableTreesitter = true;
|
enableTreesitter = true;
|
||||||
enableExtraDiagnostics = true;
|
enableExtraDiagnostics = true;
|
||||||
|
|
||||||
|
@ -154,7 +154,6 @@ isMaximal: {
|
||||||
binds = {
|
binds = {
|
||||||
whichKey.enable = true;
|
whichKey.enable = true;
|
||||||
cheatsheet.enable = true;
|
cheatsheet.enable = true;
|
||||||
hardtime-nvim.enable = isMaximal;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
telescope.enable = true;
|
telescope.enable = true;
|
||||||
|
@ -194,6 +193,8 @@ isMaximal: {
|
||||||
leetcode-nvim.enable = isMaximal;
|
leetcode-nvim.enable = isMaximal;
|
||||||
multicursors.enable = isMaximal;
|
multicursors.enable = isMaximal;
|
||||||
smart-splits.enable = isMaximal;
|
smart-splits.enable = isMaximal;
|
||||||
|
undotree.enable = isMaximal;
|
||||||
|
nvim-biscuits.enable = isMaximal;
|
||||||
|
|
||||||
motion = {
|
motion = {
|
||||||
hop.enable = true;
|
hop.enable = true;
|
||||||
|
|
15
default.nix
Normal file
15
default.nix
Normal file
|
@ -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
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
The [additional plugins section](#sec-additional-plugins) details the addition
|
The [additional plugins section](#sec-additional-plugins) details the addition
|
||||||
of new plugins to nvf under regular circumstances, i.e. while making a pull
|
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
|
request to the project. You may _override_ those plugins in your config to
|
||||||
to change source versions, e.g., to use newer versions of plugins
|
change source versions, e.g., to use newer versions of plugins that are not yet
|
||||||
that are not yet updated in **nvf**.
|
updated in **nvf**.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
vim.pluginOverrides = {
|
vim.pluginOverrides = {
|
||||||
|
|
|
@ -1,25 +1,92 @@
|
||||||
# Adding Plugins {#sec-additional-plugins}
|
# 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:
|
Then run:
|
||||||
|
|
||||||
`npins add --name <plugin name> github <owner> <repo> -b <branch>`
|
```bash
|
||||||
|
npins add --name <plugin name> github <owner> <repo> -b <branch>
|
||||||
|
```
|
||||||
|
|
||||||
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
|
```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}
|
## 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
|
```lua
|
||||||
require('plugin-name').setup({
|
require('plugin-name').setup({
|
||||||
|
@ -101,23 +168,41 @@ own fields!
|
||||||
As you've seen above, `toLuaObject` is used to convert our nix attrSet
|
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:
|
`cfg.setupOpts`, into a lua table. Here are some rules of the conversion:
|
||||||
|
|
||||||
1. nix `null` converts to lua `nil`
|
1. Nix `null` converts to lua `nil`
|
||||||
2. number and strings convert to their lua counterparts
|
2. Number and strings convert to their lua counterparts
|
||||||
3. nix attrSet/list convert into lua tables
|
3. Nix attribute sets (`{}`) and lists (`[]`) convert into Lua dictionaries and
|
||||||
4. you can write raw lua code using `lib.generators.mkLuaInline`. This function
|
tables respectively. Here is an example of Nix -> Lua conversion.
|
||||||
is part of nixpkgs.
|
- `{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
|
The above expression will be interpreted as a Lua expression in the final
|
||||||
vim.your-plugin.setupOpts = {
|
config. Without the `mkLuaInline` function, you will only receive a string
|
||||||
on_init = lib.generators.mkLuaInline ''
|
literal. You can use it to feed plugin configuration tables Lua functions
|
||||||
function()
|
that return specific values as expected by the plugins.
|
||||||
print('we can write lua!')
|
|
||||||
end
|
```nix
|
||||||
'';
|
{
|
||||||
}
|
vim.your-plugin.setupOpts = {
|
||||||
```
|
on_init = lib.generators.mkLuaInline ''
|
||||||
|
function()
|
||||||
|
print('we can write lua!')
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Lazy plugins {#sec-lazy-plugins}
|
## Lazy plugins {#sec-lazy-plugins}
|
||||||
|
|
||||||
|
@ -126,25 +211,24 @@ Lazy plugins are managed by `lz.n`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# in modules/.../your-plugin/config.nix
|
# in modules/.../your-plugin/config.nix
|
||||||
{lib, config, ...}:
|
{config, ...}: let
|
||||||
let
|
|
||||||
cfg = config.vim.your-plugin;
|
cfg = config.vim.your-plugin;
|
||||||
in {
|
in {
|
||||||
vim.lazy.plugins.your-plugin = {
|
vim.lazy.plugins.your-plugin = {
|
||||||
# instead of vim.startPlugins, use this:
|
# Instead of vim.startPlugins, use this:
|
||||||
package = "your-plugin";
|
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";
|
setupModule = "your-plugin";
|
||||||
inherit (cfg) setupOpts;
|
inherit (cfg) setupOpts;
|
||||||
|
|
||||||
# events that trigger this plugin to be loaded
|
# Events that trigger this plugin to be loaded
|
||||||
event = ["DirChanged"];
|
event = ["DirChanged"];
|
||||||
cmd = ["YourPluginCommand"];
|
cmd = ["YourPluginCommand"];
|
||||||
|
|
||||||
# keymaps
|
# Plugin Keymaps
|
||||||
keys = [
|
keys = [
|
||||||
# we'll cover this in detail in the keymaps section
|
# We'll cover this in detail in the 'keybinds' section
|
||||||
{
|
{
|
||||||
key = "<leader>d";
|
key = "<leader>d";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
@ -152,7 +236,6 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
;
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -163,7 +246,9 @@ require('lz.n').load({
|
||||||
{
|
{
|
||||||
"name-of-your-plugin",
|
"name-of-your-plugin",
|
||||||
after = function()
|
after = function()
|
||||||
require('your-plugin').setup({--[[ your setupOpts ]]})
|
require('your-plugin').setup({
|
||||||
|
--[[ your setupOpts ]]--
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
event = {"DirChanged"},
|
event = {"DirChanged"},
|
||||||
|
@ -175,5 +260,7 @@ require('lz.n').load({
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
A full list of options can be found
|
[`vim.lazy.plugins` spec]: https://notashelf.github.io/nvf/options.html#opt-vim.lazy.plugins
|
||||||
[here](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.
|
||||||
|
|
|
@ -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
|
[documentation](https://notashelf.github.io/nvf/options.html#opt-vim.keymaps) to
|
||||||
see a list of them.
|
see a list of them.
|
||||||
|
|
||||||
**nvf** provides a helper function, so that you don't have to write the
|
**nvf** provides a helper function, so that you don't have to write the mapping
|
||||||
mapping attribute sets every time:
|
attribute sets every time:
|
||||||
|
|
||||||
- `mkKeymap`, which mimics neovim's `vim.keymap.set` function
|
- `mkKeymap`, which mimics neovim's `vim.keymap.set` function
|
||||||
|
|
||||||
|
|
33
docs/manual/installation/modules/flakes.md
Normal file
33
docs/manual/installation/modules/flakes.md
Normal file
|
@ -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" <sub-commands>
|
||||||
|
```
|
|
@ -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
|
yourself. It is the recommended way to use **nvf** alongside the NixOS module
|
||||||
depending on your needs.
|
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
|
```nix
|
||||||
|
# flake.nix
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
# Optional, if you intend to follow nvf's obsidian-nvim input
|
# 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
|
# Required, nvf works best and only directly supports flakes
|
||||||
nvf = {
|
nvf = {
|
||||||
url = "github:notashelf/nvf";
|
url = "github:NotAShelf/nvf";
|
||||||
# You can override the input nixpkgs to follow your system's
|
# You can override the input nixpkgs to follow your system's
|
||||||
# instance of nixpkgs. This is safe to do as nvf does not depend
|
# instance of nixpkgs. This is safe to do as nvf does not depend
|
||||||
# on a binary cache.
|
# on a binary cache.
|
||||||
|
@ -25,6 +34,8 @@ To use it, we first add the input flake.
|
||||||
# for example:
|
# for example:
|
||||||
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
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
|
```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
|
`programs.nvf` module option anywhere in your configuration in order to
|
||||||
configure **nvf**.
|
configure **nvf**.
|
||||||
|
|
||||||
```nix{
|
```nix
|
||||||
|
{
|
||||||
programs.nvf = {
|
programs.nvf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# your settings need to go into the settings attribute set
|
# 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)
|
[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/<commit or tag>.tar.gz";
|
||||||
|
# Optionally, you can add 'sha256' for verification and caching
|
||||||
|
# sha256 = "<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.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
|
@ -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
|
the recommended way to use **nvf** alongside the home-manager module depending
|
||||||
on your needs.
|
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
|
```nix
|
||||||
|
# flake.nix
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
# Optional, if you intend to follow nvf's obsidian-nvim input
|
# 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
|
# Required, nvf works best and only directly supports flakes
|
||||||
nvf = {
|
nvf = {
|
||||||
url = "github:notashelf/nvf";
|
url = "github:NotAShelf/nvf";
|
||||||
# You can override the input nixpkgs to follow your system's
|
# You can override the input nixpkgs to follow your system's
|
||||||
# instance of nixpkgs. This is safe to do as nvf does not depend
|
# instance of nixpkgs. This is safe to do as nvf does not depend
|
||||||
# on a binary cache.
|
# on a binary cache.
|
||||||
|
@ -25,6 +34,8 @@ To use it, we first add the input flake.
|
||||||
# for example:
|
# for example:
|
||||||
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
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
|
```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
|
`programs.nvf` module option anywhere in your configuration in order to
|
||||||
configure **nvf**.
|
configure **nvf**.
|
||||||
|
|
||||||
```nix{
|
```nix
|
||||||
|
{
|
||||||
programs.nvf = {
|
programs.nvf = {
|
||||||
enable = true;
|
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
|
# most settings are documented in the appendix
|
||||||
settings = {
|
settings = {
|
||||||
vim.viAlias = false;
|
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)
|
[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/<commit or tag>.tar.gz";
|
||||||
|
# Optionally, you can add 'sha256' for verification and caching
|
||||||
|
# sha256 = "<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.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
|
@ -49,7 +49,8 @@ the default theme enabled. You may use other options inside `config.vim` in
|
||||||
# ...
|
# ...
|
||||||
modules = [
|
modules = [
|
||||||
# This will make wrapped neovim available in your system packages
|
# 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, ...}: {
|
({pkgs, ...}: {
|
||||||
environment.systemPackages = [self.packages.${pkgs.stdenv.system}.neovim];
|
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
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}```
|
}
|
||||||
|
```
|
||||||
|
|
|
@ -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
|
different configurations provided by this flake. As of v0.5, two specialized
|
||||||
configurations are provided:
|
configurations are provided:
|
||||||
|
|
||||||
- **Nix** - Nix language server + simple utility plugins
|
- **Nix** (`packages.nix`) - Nix language server + simple utility plugins
|
||||||
- **Maximal** - Variable language servers + utility and decorative 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
|
You may try out any of the provided configurations using the `nix run` command
|
||||||
on a system where Nix is installed.
|
on a system where Nix is installed.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
$ cachix use nvf # Optional: it'll save you CPU resources and time
|
$ 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
|
Do keep in mind that this is **susceptible to garbage collection** meaning that
|
||||||
will be removed from your Nix store once you garbage collect.
|
the built outputs will be removed from your Nix store once you garbage collect.
|
||||||
|
|
||||||
## Using Prebuilt Configs {#sec-using-prebuilt-configs}
|
## Using Prebuilt Configs {#sec-using-prebuilt-configs}
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ companion or fun plugins.
|
||||||
::: {.warning}
|
::: {.warning}
|
||||||
|
|
||||||
Running the maximal config will download _a lot_ of packages as it is
|
Running the maximal config will download _a lot_ of packages as it is
|
||||||
downloading language servers, formatters, and more.
|
downloading language servers, formatters, and more. If CPU time and bandwidth
|
||||||
|
are concerns, please use the default package instead.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
|
@ -35,7 +35,10 @@
|
||||||
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
|
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
|
||||||
[yazi.nvim]: https://github.com/mikavilpas/yazi.nvim
|
[yazi.nvim]: https://github.com/mikavilpas/yazi.nvim
|
||||||
[snacks.nvim]: https://github.com/folke/snacks.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
|
[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
|
- Add [typst-preview.nvim] under
|
||||||
`languages.typst.extensions.typst-preview-nvim`.
|
`languages.typst.extensions.typst-preview-nvim`.
|
||||||
|
@ -93,9 +96,10 @@
|
||||||
|
|
||||||
- Lazyload Lspsaga and remove default keybindings for it.
|
- Lazyload Lspsaga and remove default keybindings for it.
|
||||||
|
|
||||||
|
- 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
|
- Add [oil.nvim] as an alternative file explorer. It will be available under
|
||||||
`vim.utility.oil-nvim`.
|
`vim.utility.oil-nvim`.
|
||||||
|
|
||||||
- Add `vim.diagnostics` to interact with Neovim's diagnostics module. Available
|
- Add `vim.diagnostics` to interact with Neovim's diagnostics module. Available
|
||||||
options for `vim.diagnostic.config()` can now be customized through the
|
options for `vim.diagnostic.config()` can now be customized through the
|
||||||
[](#opt-vim.diagnostics.config) in nvf.
|
[](#opt-vim.diagnostics.config) in nvf.
|
||||||
|
@ -104,6 +108,8 @@
|
||||||
relevant packages in a simple UI.
|
relevant packages in a simple UI.
|
||||||
- This deprecates `vim.useSystemClipboard` as well, see breaking changes
|
- This deprecates `vim.useSystemClipboard` as well, see breaking changes
|
||||||
section above for migration options.
|
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):
|
[amadaluzia](https://github.com/amadaluzia):
|
||||||
|
|
||||||
|
@ -382,7 +388,10 @@
|
||||||
|
|
||||||
[poz](https://poz.pet):
|
[poz](https://poz.pet):
|
||||||
|
|
||||||
|
[everforest]: https://github.com/sainnhe/everforest
|
||||||
|
|
||||||
- Fix gitsigns null-ls issue.
|
- Fix gitsigns null-ls issue.
|
||||||
|
- Add [everforest] theme support.
|
||||||
|
|
||||||
[Haskex](https://github.com/haskex):
|
[Haskex](https://github.com/haskex):
|
||||||
|
|
||||||
|
@ -428,7 +437,7 @@
|
||||||
|
|
||||||
- Add missing `transparent` option for existing
|
- Add missing `transparent` option for existing
|
||||||
[onedark.nvim](https://github.com/navarasu/onedark.nvim) theme.
|
[onedark.nvim](https://github.com/navarasu/onedark.nvim) theme.
|
||||||
|
|
||||||
[theutz](https://github.com/theutz):
|
[theutz](https://github.com/theutz):
|
||||||
|
|
||||||
- Added "auto" flavour for catppuccin theme
|
- Added "auto" flavour for catppuccin theme
|
||||||
|
@ -440,19 +449,21 @@
|
||||||
[neogit]: https://github.com/NeogitOrg/neogit
|
[neogit]: https://github.com/NeogitOrg/neogit
|
||||||
|
|
||||||
- Add [solarized.nvim] theme with support for multiple variants
|
- Add [solarized.nvim] theme with support for multiple variants
|
||||||
- Add [smart-splits.nvim] for navigating between Neovim windows and terminal multiplexer panes.
|
- Add [smart-splits.nvim] for navigating between Neovim windows and terminal
|
||||||
Available at `vim.utility.smart-splits`.
|
multiplexer panes. Available at `vim.utility.smart-splits`.
|
||||||
- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated config.
|
- Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated
|
||||||
|
config.
|
||||||
- Fix lualine separator options
|
- Fix lualine separator options
|
||||||
- Add [neogit], an interactive and powerful Git interface for Neovim, inspired by Magit
|
- Add [neogit], an interactive and powerful Git interface for Neovim, inspired
|
||||||
|
by Magit
|
||||||
- Allow deregistering which-key binds or groups by setting them to `null`
|
- Allow deregistering which-key binds or groups by setting them to `null`
|
||||||
|
|
||||||
[justDeeevin](https://github.com/justDeeevin):
|
[justDeeevin](https://github.com/justDeeevin):
|
||||||
|
|
||||||
[supermaven-nvim]: https://github.com/supermaven-inc/supermaven-nvim
|
[supermaven-nvim]: https://github.com/supermaven-inc/supermaven-nvim
|
||||||
|
|
||||||
- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable` and
|
- Add [supermaven-nvim] plugin in `vim.assistant.supermaven-nvim` with `enable`
|
||||||
`setupOpts`
|
and `setupOpts`
|
||||||
|
|
||||||
[trueNAHO](https://github.com/trueNAHO):
|
[trueNAHO](https://github.com/trueNAHO):
|
||||||
|
|
||||||
|
@ -460,9 +471,18 @@
|
||||||
download size.
|
download size.
|
||||||
|
|
||||||
- `flake-utils`'s `systems` inputs follows nvf's `systems` input to transitively
|
- `flake-utils`'s `systems` inputs follows nvf's `systems` input to transitively
|
||||||
leverage the pattern introduced in commit [fc8206e7a61d ("flake: utilize
|
leverage the pattern introduced in commit
|
||||||
nix-systems for overridable flake systems")](
|
[fc8206e7a61d ("flake: utilize
|
||||||
https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2).
|
nix-systems for overridable flake systems")](https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2).
|
||||||
|
|
||||||
[soliprem](https://github.com/soliprem):
|
[soliprem](https://github.com/soliprem):
|
||||||
|
|
||||||
- fix broken `neorg` grammars
|
- 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`.
|
||||||
|
|
50
flake.lock
generated
50
flake.lock
generated
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"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": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
|
@ -7,11 +23,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749398372,
|
"lastModified": 1753121425,
|
||||||
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
|
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
|
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -20,26 +36,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": [
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mnw": {
|
"mnw": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748710831,
|
"lastModified": 1748710831,
|
||||||
|
@ -57,11 +53,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750215678,
|
"lastModified": 1753432016,
|
||||||
"narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=",
|
"narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192",
|
"rev": "6027c30c8e9810896b92429f0092f624f7b1aace",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -73,8 +69,8 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"mnw": "mnw",
|
"mnw": "mnw",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
|
|
50
flake.nix
50
flake.nix
|
@ -5,8 +5,9 @@
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
# call the extended library with `inputs`
|
# Call the extended library with `inputs`.
|
||||||
# inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function
|
# 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;};
|
lib = import ./lib/stdlib-extended.nix {inherit inputs self;};
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake {
|
flake-parts.lib.mkFlake {
|
||||||
|
@ -31,6 +32,8 @@
|
||||||
inherit (lib.nvim) neovimConfiguration;
|
inherit (lib.nvim) neovimConfiguration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inherit (lib.importJSON ./npins/sources.json) pins;
|
||||||
|
|
||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
|
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
|
||||||
default = self.homeManagerModules.nvf;
|
default = self.homeManagerModules.nvf;
|
||||||
|
@ -52,21 +55,33 @@
|
||||||
''
|
''
|
||||||
self.nixosModules.nvf;
|
self.nixosModules.nvf;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (lib.importJSON ./npins/sources.json) pins;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = {pkgs, ...}: {
|
perSystem = {pkgs, ...}: {
|
||||||
# Provide the default formatter. `nix fmt` in project root
|
# Provides the default formatter for 'nix fmt', which will format the
|
||||||
# will format available files with the correct formatter.
|
# entire tree with Alejandra. The wrapper script is necessary due to
|
||||||
# P.S: Please do not format with nixfmt! It messes with many
|
# changes to the behaviour of Nix, which now encourages wrappers for
|
||||||
# syntax elements and results in unreadable code.
|
# tree-wide formatting.
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.writeShellApplication {
|
||||||
|
name = "nix3-fmt-wrapper";
|
||||||
|
|
||||||
# Check if codebase is properly formatted.
|
runtimeInputs = [
|
||||||
# This can be initiated with `nix build .#checks.<system>.nix-fmt`
|
pkgs.alejandra
|
||||||
# or with `nix flake check`
|
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 = {
|
checks = {
|
||||||
|
# Check if codebase is properly formatted.
|
||||||
|
# This can be initiated with `nix build .#checks.<system>.nix-fmt`
|
||||||
|
# or with `nix flake check`
|
||||||
nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
|
nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
|
||||||
alejandra --check ${self} < /dev/null | tee $out
|
alejandra --check ${self} < /dev/null | tee $out
|
||||||
'';
|
'';
|
||||||
|
@ -74,8 +89,9 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Flake inputs
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
|
||||||
## Basic Inputs
|
## Basic Inputs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
@ -84,13 +100,11 @@
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils = {
|
flake-compat = {
|
||||||
url = "github:numtide/flake-utils";
|
url = "git+https://git.lix.systems/lix-project/flake-compat.git";
|
||||||
inputs.systems.follows = "systems";
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
systems.url = "github:nix-systems/default";
|
|
||||||
|
|
||||||
# Alternate neovim-wrapper
|
# Alternate neovim-wrapper
|
||||||
mnw.url = "github:Gerg-L/mnw";
|
mnw.url = "github:Gerg-L/mnw";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,84 +9,114 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: 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;};
|
docs = import ../docs {inherit pkgs inputs lib;};
|
||||||
|
|
||||||
|
# Helper function for creating demo configurations for nvf
|
||||||
|
# TODO: make this more generic.
|
||||||
buildPkg = maximal:
|
buildPkg = maximal:
|
||||||
(args.config.flake.lib.nvim.neovimConfiguration {
|
(args.config.flake.lib.nvim.neovimConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [(import ../configuration.nix maximal)];
|
modules = [(import ../configuration.nix maximal)];
|
||||||
}).neovim;
|
}).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 {
|
in {
|
||||||
packages = {
|
packages =
|
||||||
blink-cmp = pkgs.callPackage ./blink {};
|
(flattenPkgs "/" [] legacyPackages)
|
||||||
avante-nvim = let
|
// {
|
||||||
pin = self.pins.avante-nvim;
|
inherit (docs.manual) htmlOpenTool;
|
||||||
in
|
|
||||||
pkgs.callPackage ./avante-nvim {
|
|
||||||
version = pin.branch;
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
inherit (pin.repository) owner repo;
|
|
||||||
rev = pin.revision;
|
|
||||||
sha256 = pin.hash;
|
|
||||||
};
|
|
||||||
pins = self.pins;
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (docs.manual) htmlOpenTool;
|
# Documentation
|
||||||
# Documentation
|
docs = docs.manual.html;
|
||||||
docs = docs.manual.html;
|
docs-html = docs.manual.html;
|
||||||
docs-html = docs.manual.html;
|
docs-manpages = docs.manPages;
|
||||||
docs-manpages = docs.manPages;
|
docs-json = docs.options.json;
|
||||||
docs-json = docs.options.json;
|
docs-linkcheck = let
|
||||||
docs-linkcheck = let
|
site = config.packages.docs;
|
||||||
site = config.packages.docs;
|
in
|
||||||
in
|
pkgs.testers.lycheeLinkCheck {
|
||||||
pkgs.testers.lycheeLinkCheck {
|
inherit site;
|
||||||
inherit site;
|
|
||||||
|
|
||||||
remap = {
|
remap = {
|
||||||
"https://notashelf.github.io/nvf/" = site;
|
"https://notashelf.github.io/nvf/" = site;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
exclude = [];
|
||||||
|
include_mail = true;
|
||||||
|
include_verbatim = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = {
|
# Helper utility for building the HTML manual and opening it in the
|
||||||
exclude = [];
|
# browser with $BROWSER or using xdg-open as a fallback tool.
|
||||||
include_mail = true;
|
# Adapted from Home-Manager, available under the MIT license.
|
||||||
include_verbatim = true;
|
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
|
if [[ ! -v BROWSER || -z $BROWSER ]]; then
|
||||||
# browser with $BROWSER or using xdg-open as a fallback tool.
|
for candidate in xdg-open open w3m; do
|
||||||
# Adapted from Home-Manager, available under the MIT license.
|
BROWSER="$(type -P $candidate || true)"
|
||||||
docs-html-wrapped = let
|
if [[ -x $BROWSER ]]; then
|
||||||
xdg-open = lib.getExe' pkgs.xdg-utils "xdg-open";
|
break;
|
||||||
docs-html = docs.manual.html + /share/doc/nvf;
|
fi
|
||||||
in
|
done
|
||||||
pkgs.writeShellScriptBin "docs-html-wrapped" ''
|
fi
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
if [[ ! -v BROWSER || -z $BROWSER ]]; then
|
if [[ ! -v BROWSER || -z $BROWSER ]]; then
|
||||||
for candidate in xdg-open open w3m; do
|
echo "$0: unable to start a web browser; please set \$BROWSER"
|
||||||
BROWSER="$(type -P $candidate || true)"
|
echo "$0: Trying xdg-open as a fallback"
|
||||||
if [[ -x $BROWSER ]]; then
|
${xdg-open} ${docs-html}/index.xhtml
|
||||||
break;
|
else
|
||||||
fi
|
echo "\$BROWSER is set. Attempting to open manual"
|
||||||
done
|
exec "$BROWSER" "${docs-html}/index.xhtml"
|
||||||
fi
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
if [[ ! -v BROWSER || -z $BROWSER ]]; then
|
# Exposed neovim configurations
|
||||||
echo "$0: unable to start a web browser; please set \$BROWSER"
|
nix = buildPkg false;
|
||||||
echo "$0: Trying xdg-open as a fallback"
|
maximal = buildPkg true;
|
||||||
${xdg-open} ${docs-html}/index.xhtml
|
default = config.packages.nix;
|
||||||
else
|
};
|
||||||
echo "\$BROWSER is set. Attempting to open manual"
|
|
||||||
exec "$BROWSER" "${docs-html}/index.xhtml"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Exposed neovim configurations
|
|
||||||
nix = buildPkg false;
|
|
||||||
maximal = buildPkg true;
|
|
||||||
default = config.packages.nix;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pins,
|
||||||
openssl,
|
openssl,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
@ -6,11 +7,17 @@
|
||||||
vimUtils,
|
vimUtils,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
pkgs,
|
pkgs,
|
||||||
version,
|
|
||||||
src,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit version src;
|
# 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 {
|
avante-nvim-lib = rustPlatform.buildRustPackage {
|
||||||
pname = "avante-nvim-lib";
|
pname = "avante-nvim-lib";
|
||||||
inherit version src;
|
inherit version src;
|
||||||
|
@ -48,10 +55,9 @@ in
|
||||||
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in ''
|
in ''
|
||||||
mkdir -p $out/build
|
mkdir -p $out/build
|
||||||
ln -s ${avante-nvim-lib}/lib/libavante_repo_map${ext} $out/build/avante_repo_map${ext}
|
for lib in "avante_repo_map" "avante_templates" "avante_tokenizers" "avante_html2md"; do
|
||||||
ln -s ${avante-nvim-lib}/lib/libavante_templates${ext} $out/build/avante_templates${ext}
|
ln -s ${avante-nvim-lib}/lib/lib$lib${ext} $out/build/$lib${ext}
|
||||||
ln -s ${avante-nvim-lib}/lib/libavante_tokenizers${ext} $out/build/avante_tokenizers${ext}
|
done
|
||||||
ln -s ${avante-nvim-lib}/lib/libavante_html2md${ext} $out/build/avante_html2md${ext}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nvimSkipModules = [
|
nvimSkipModules = [
|
|
@ -5,13 +5,13 @@
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "blink-cmp";
|
pname = "blink-cmp";
|
||||||
version = "1.3.1";
|
version = "1.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Saghen";
|
owner = "Saghen";
|
||||||
repo = "blink.cmp";
|
repo = "blink.cmp";
|
||||||
tag = "v${finalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-8lyDDrsh3sY7l0i0TPyhL69Oq0l63+/QPnLaU/mhq5A=";
|
hash = "sha256-IHRYgKcYP+JDGu8Vtawgzlhq25vpROFqb8KmpfVMwCk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
forceShare = [
|
forceShare = [
|
||||||
|
@ -29,8 +29,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
mv "$out/lib" "$out/target/release"
|
mv "$out/lib" "$out/target/release"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
|
cargoHash = "sha256-QsVCugYWRri4qu64wHnbJQZBhy4tQrr+gCYbXtRBlqE=";
|
||||||
useFetchCargoVendor = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
(writeShellScriptBin "git" "exit 1")
|
(writeShellScriptBin "git" "exit 1")
|
|
@ -88,7 +88,7 @@
|
||||||
in {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = mkEnableOption "diagostics module for Neovim";
|
enable = mkEnableOption "diagnostics module for Neovim";
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
type = diagnosticsSubmodule;
|
type = diagnosticsSubmodule;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
|
@ -3,46 +3,47 @@
|
||||||
inherit (lib.types) listOf attrs bool enum str oneOf int;
|
inherit (lib.types) listOf attrs bool enum str oneOf int;
|
||||||
in {
|
in {
|
||||||
options.vim.dashboard.startify = {
|
options.vim.dashboard.startify = {
|
||||||
enable = mkEnableOption "dashboard via vim-startify";
|
enable = mkEnableOption "fancy start screen for Vim [vim-startify]";
|
||||||
|
|
||||||
bookmarks = mkOption {
|
bookmarks = mkOption {
|
||||||
default = [];
|
|
||||||
description = ''List of book marks to disaply on start page'';
|
|
||||||
type = listOf attrs;
|
type = listOf attrs;
|
||||||
|
default = [];
|
||||||
example = {"c" = "~/.vimrc";};
|
example = {"c" = "~/.vimrc";};
|
||||||
|
description = "List of book marks to display on start page";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeToDir = mkOption {
|
changeToDir = mkOption {
|
||||||
default = true;
|
|
||||||
description = "Should vim change to the directory of the file you open";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether Vim should change to the directory of the file you open";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeToVCRoot = mkOption {
|
changeToVCRoot = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Should vim change to the version control root when opening a file";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether Vim should change to the version control root when opening a file";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeDirCmd = mkOption {
|
changeDirCmd = mkOption {
|
||||||
default = "lcd";
|
|
||||||
description = "Command to change the current window with. Can be cd, lcd or tcd";
|
|
||||||
type = enum ["cd" "lcd" "tcd"];
|
type = enum ["cd" "lcd" "tcd"];
|
||||||
|
default = "lcd";
|
||||||
|
description = "Command to change the current window with.";
|
||||||
};
|
};
|
||||||
|
|
||||||
customHeader = mkOption {
|
customHeader = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Text to place in the header";
|
description = "Text to place in the header";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
customFooter = mkOption {
|
customFooter = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Text to place in the footer";
|
description = "Text to place in the footer";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lists = mkOption {
|
lists = mkOption {
|
||||||
|
type = listOf attrs;
|
||||||
default = [
|
default = [
|
||||||
{
|
{
|
||||||
type = "files";
|
type = "files";
|
||||||
|
@ -66,121 +67,136 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
description = "Specify the lists and in what order they are displayed on startify.";
|
description = "Specify the lists and in what order they are displayed on startify.";
|
||||||
type = listOf attrs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
skipList = mkOption {
|
skipList = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of regex patterns to exclude from MRU lists";
|
description = "List of regex patterns to exclude from MRU lists";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
updateOldFiles = mkOption {
|
updateOldFiles = mkOption {
|
||||||
|
type = bool;
|
||||||
|
|
||||||
default = false;
|
default = false;
|
||||||
description = "Set if you want startify to always update and not just when neovim closes";
|
description = "Set if you want startify to always update and not just when neovim closes";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionAutoload = mkOption {
|
sessionAutoload = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Make startify auto load Session.vim files from the current directory";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
|
||||||
|
default = false;
|
||||||
|
description = "Make vim-startify auto load Session.vim files from the current directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
commands = mkOption {
|
commands = mkOption {
|
||||||
|
type = listOf (oneOf [str attrs (listOf str)]);
|
||||||
default = [];
|
default = [];
|
||||||
description = "Commands that are presented to the user on startify page";
|
description = "Commands that are presented to the user on startify page";
|
||||||
type = listOf (oneOf [str attrs (listOf str)]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
filesNumber = mkOption {
|
filesNumber = mkOption {
|
||||||
|
type = int;
|
||||||
default = 10;
|
default = 10;
|
||||||
description = "How many files to list";
|
description = "How many files to list";
|
||||||
type = int;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
customIndices = mkOption {
|
customIndices = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Specify a list of default characters to use instead of numbers";
|
description = "Specify a list of default characters to use instead of numbers";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
disableOnStartup = mkOption {
|
disableOnStartup = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Prevent startify from opening on startup but can be called with :Startify";
|
|
||||||
type = bool;
|
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 {
|
unsafe = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Turns on unsafe mode for Startify. Stops resolving links, checking files are readable and filtering bookmark list";
|
|
||||||
type = bool;
|
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 {
|
paddingLeft = mkOption {
|
||||||
|
type = int;
|
||||||
default = 3;
|
default = 3;
|
||||||
description = "Number of spaces used for left padding.";
|
description = "Number of spaces used for left padding.";
|
||||||
type = int;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEnv = mkOption {
|
useEnv = mkOption {
|
||||||
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Show environment variables in path if name is shorter than value";
|
description = "Show environment variables in path if name is shorter than value";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionBeforeSave = mkOption {
|
sessionBeforeSave = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Commands to run before saving a session";
|
description = "Commands to run before saving a session";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionPersistence = mkOption {
|
sessionPersistence = mkOption {
|
||||||
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Persist session before leaving vim or switching session";
|
description = "Persist session before leaving vim or switching session";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionDeleteBuffers = mkOption {
|
sessionDeleteBuffers = mkOption {
|
||||||
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Delete all buffers when loading or closing a session";
|
description = "Delete all buffers when loading or closing a session";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionDir = mkOption {
|
sessionDir = mkOption {
|
||||||
|
type = str;
|
||||||
default = "~/.vim/session";
|
default = "~/.vim/session";
|
||||||
description = "Directory to save and load sessions from";
|
description = "Directory to save and load sessions from";
|
||||||
type = str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
skipListServer = mkOption {
|
skipListServer = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of vim servers to not load startify for";
|
description = "List of vim servers to not load startify for";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionRemoveLines = mkOption {
|
sessionRemoveLines = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Patterns to remove from session files";
|
description = "Patterns to remove from session files";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSavevars = mkOption {
|
sessionSavevars = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of variables to save into a session file.";
|
description = "List of variables to save into a session file.";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSavecmds = mkOption {
|
sessionSavecmds = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of commands to run when loading a session.";
|
description = "List of commands to run when loading a session.";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSort = mkOption {
|
sessionSort = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Set if you want items sorted by date rather than alphabetically";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
While true, sessions will be sorted by date rather than alphabetically.
|
||||||
|
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./gitsigns
|
./gitsigns
|
||||||
|
./hunk-nvim
|
||||||
./vim-fugitive
|
./vim-fugitive
|
||||||
./git-conflict
|
./git-conflict
|
||||||
./gitlinker-nvim
|
./gitlinker-nvim
|
||||||
|
@ -14,7 +15,9 @@ in {
|
||||||
git integration suite.
|
git integration suite.
|
||||||
|
|
||||||
Enabling this option will enable the following plugins:
|
Enabling this option will enable the following plugins:
|
||||||
|
|
||||||
* gitsigns
|
* gitsigns
|
||||||
|
* hunk-nvim
|
||||||
* vim-fugitive
|
* vim-fugitive
|
||||||
* git-conflict
|
* git-conflict
|
||||||
* gitlinker-nvim
|
* gitlinker-nvim
|
||||||
|
|
27
modules/plugins/git/hunk-nvim/config.nix
Normal file
27
modules/plugins/git/hunk-nvim/config.nix
Normal file
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/git/hunk-nvim/default.nix
Normal file
6
modules/plugins/git/hunk-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hunk-nvim.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
13
modules/plugins/git/hunk-nvim/hunk-nvim.nix
Normal file
13
modules/plugins/git/hunk-nvim/hunk-nvim.nix
Normal file
|
@ -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" {};
|
||||||
|
};
|
||||||
|
}
|
|
@ -26,7 +26,7 @@
|
||||||
cmd = ${
|
cmd = ${
|
||||||
if isList cfg.lsp.package
|
if isList cfg.lsp.package
|
||||||
then expToLua cfg.lsp.package
|
then expToLua cfg.lsp.package
|
||||||
else "{'${cfg.lsp.package}/bin/wgsl_analyzer'}"
|
else "{'${cfg.lsp.package}/bin/wgsl-analyzer'}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -15,13 +15,6 @@
|
||||||
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
|
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && cfg.otter-nvim.enable) {
|
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 = {
|
vim = {
|
||||||
startPlugins = ["otter-nvim"];
|
startPlugins = ["otter-nvim"];
|
||||||
|
|
||||||
|
|
|
@ -25,15 +25,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buffers = {
|
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 {
|
write_to_disk = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
|
@ -246,10 +246,10 @@ in {
|
||||||
transparent = {
|
transparent = {
|
||||||
enabled = ${boolToString transparent},
|
enabled = ${boolToString transparent},
|
||||||
},
|
},
|
||||||
${optionalString (!isNull palette) ''palette = "${palette}",''}
|
${optionalString (palette != null) ''palette = "${palette}",''}
|
||||||
${optionalString (!isNull variant) ''variant = "${variant}",''}
|
${optionalString (variant != null) ''variant = "${variant}",''}
|
||||||
}
|
}
|
||||||
${optionalString (!isNull background) ''vim.opt.background = "${background}"''}
|
${optionalString (background != null) ''vim.opt.background = "${background}"''}
|
||||||
vim.cmd.colorscheme "solarized"
|
vim.cmd.colorscheme "solarized"
|
||||||
'';
|
'';
|
||||||
styles = let
|
styles = let
|
||||||
|
@ -281,4 +281,23 @@ in {
|
||||||
vim.cmd.colorscheme("solarized-osaka")
|
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"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ in {
|
||||||
type = listOf package;
|
type = listOf package;
|
||||||
default = [];
|
default = [];
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||||
regex
|
regex
|
||||||
kdl
|
kdl
|
||||||
];
|
];
|
||||||
|
@ -33,6 +33,7 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
List of treesitter grammars to install. For grammars to be installed properly,
|
List of treesitter grammars to install. For grammars to be installed properly,
|
||||||
you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`.
|
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
|
For languages already supported by nvf, you may use
|
||||||
{option}`vim.language.<lang>.treesitter` options, which will automatically add
|
{option}`vim.language.<lang>.treesitter` options, which will automatically add
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.ui.colorful-menu-nvim = {
|
||||||
|
enable = mkEnableOption "treesitter highlighted completion menus [colorful-menu.nvim]";
|
||||||
|
setupOpts = mkPluginSetupOption "colorful-menu-nvim" {};
|
||||||
|
};
|
||||||
|
}
|
20
modules/plugins/ui/colorful-menu-nvim/config.nix
Normal file
20
modules/plugins/ui/colorful-menu-nvim/config.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
cfg = config.vim.ui.colorful-menu-nvim;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["colorful-menu-nvim"];
|
||||||
|
pluginRC.colorful-menu-nvim = entryAnywhere ''
|
||||||
|
require("colorful-menu").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/ui/colorful-menu-nvim/default.nix
Normal file
6
modules/plugins/ui/colorful-menu-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./colorful-menu-nvim.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,14 +1,15 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./noice
|
|
||||||
./modes
|
|
||||||
./nvim-ufo
|
|
||||||
./notifications
|
|
||||||
./smartcolumn
|
|
||||||
./colorizer
|
|
||||||
./illuminate
|
|
||||||
./breadcrumbs
|
|
||||||
./borders
|
./borders
|
||||||
|
./breadcrumbs
|
||||||
|
./colorful-menu-nvim
|
||||||
|
./colorizer
|
||||||
./fastaction
|
./fastaction
|
||||||
|
./illuminate
|
||||||
|
./modes
|
||||||
|
./noice
|
||||||
|
./notifications
|
||||||
|
./nvim-ufo
|
||||||
|
./smartcolumn
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
|
||||||
cfg = config.vim.binds.whichKey;
|
cfg = config.vim.binds.whichKey;
|
||||||
register = mapAttrsToList (n: v: lib.lists.optional (! isNull v) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register;
|
register = mapAttrsToList (n: v: lib.lists.optional (v != null) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
./multicursors
|
./multicursors
|
||||||
./new-file-template
|
./new-file-template
|
||||||
./nix-develop
|
./nix-develop
|
||||||
|
./nvim-biscuits
|
||||||
./oil-nvim
|
./oil-nvim
|
||||||
./outline
|
./outline
|
||||||
./preview
|
./preview
|
||||||
|
@ -26,5 +27,6 @@
|
||||||
./wakatime
|
./wakatime
|
||||||
./yanky-nvim
|
./yanky-nvim
|
||||||
./yazi-nvim
|
./yazi-nvim
|
||||||
|
./undotree
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
20
modules/plugins/utility/nvim-biscuits/config.nix
Normal file
20
modules/plugins/utility/nvim-biscuits/config.nix
Normal file
|
@ -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})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/utility/nvim-biscuits/default.nix
Normal file
6
modules/plugins/utility/nvim-biscuits/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./nvim-biscuits.nix
|
||||||
|
];
|
||||||
|
}
|
10
modules/plugins/utility/nvim-biscuits/nvim-biscuits.nix
Normal file
10
modules/plugins/utility/nvim-biscuits/nvim-biscuits.nix
Normal file
|
@ -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" {};
|
||||||
|
};
|
||||||
|
}
|
22
modules/plugins/utility/undotree/config.nix
Normal file
22
modules/plugins/utility/undotree/config.nix
Normal file
|
@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/utility/undotree/default.nix
Normal file
6
modules/plugins/utility/undotree/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./undotree.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
7
modules/plugins/utility/undotree/undotree.nix
Normal file
7
modules/plugins/utility/undotree/undotree.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
in {
|
||||||
|
options.vim.utility.undotree = {
|
||||||
|
enable = mkEnableOption "undo history visualizer for Vim [undotree]";
|
||||||
|
};
|
||||||
|
}
|
|
@ -33,32 +33,33 @@ in {
|
||||||
default = [];
|
default = [];
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[
|
[
|
||||||
# absolute path, as a string - impure
|
# Absolute path, as a string. This is the impure option.
|
||||||
"$HOME/.config/nvim-extra"
|
"$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
|
./nvim
|
||||||
|
|
||||||
# source type path - pure and reproducible
|
# Source type path. This pure and reproducible.
|
||||||
(builtins.source {
|
# See `:doc builtins.path` inside a Nix repl for more options.
|
||||||
path = ./runtime;
|
(builtins.path {
|
||||||
name = "nvim-runtime";
|
path = ./runtime; # this must be a relative path
|
||||||
|
name = "nvim-runtime"; # name is arbitrary
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
Additional runtime paths that will be appended to the
|
Additional runtime paths that will be appended to the active
|
||||||
active runtimepath of the Neovim. This can be used to
|
runtimepath of the Neovim. This can be used to add additional
|
||||||
add additional lookup paths for configs, plugins, spell
|
lookup paths for configs, plugins, spell languages and other
|
||||||
languages and other things you would generally place in
|
things you would generally place in your {file}`$HOME/.config/nvim`.
|
||||||
your {file}`$HOME/.config/nvim`.
|
|
||||||
|
|
||||||
This is meant as a declarative alternative to throwing
|
This is meant as a declarative alternative to throwing files into
|
||||||
files into {file}`~/.config/nvim` and having the Neovim
|
{file}`~/.config/nvim` and having the Neovim wrapper pick them up.
|
||||||
wrapper pick them up. For more details on
|
|
||||||
`vim.o.runtimepath`, and what paths to use; please see
|
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')
|
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath').
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,13 +68,13 @@ in {
|
||||||
default = [];
|
default = [];
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[
|
[
|
||||||
# absolute path, as a string - impure
|
# Absolute path, as a string - impure
|
||||||
"$HOME/.config/nvim/my-lua-file.lua"
|
"$HOME/.config/nvim/my-lua-file.lua"
|
||||||
|
|
||||||
# relative path, as a path - pure
|
# Relative path, as a path - pure
|
||||||
./nvim/my-lua-file.lua
|
./nvim/my-lua-file.lua
|
||||||
|
|
||||||
# source type path - pure and reproducible
|
# Source type path - pure and reproducible
|
||||||
(builtins.path {
|
(builtins.path {
|
||||||
path = ./nvim/my-lua-file.lua;
|
path = ./nvim/my-lua-file.lua;
|
||||||
name = "my-lua-file";
|
name = "my-lua-file";
|
||||||
|
@ -82,9 +83,10 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
Additional lua files that will be sourced by 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.
|
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)
|
See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands)
|
||||||
on the Neovim documentation for more details.
|
on the Neovim documentation for more details.
|
||||||
|
|
File diff suppressed because it is too large
Load diff
7
shell.nix
Normal file
7
shell.nix
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue