Compare commits

...

19 commits

Author SHA1 Message Date
raf
58c7abc85a
Merge 4bcc8745dd into ecc9b60a2d 2025-01-02 01:13:06 +00:00
raf
4bcc8745dd
Merge branch 'main' into live-docs-preview 2025-01-02 04:13:05 +03:00
Ching Pei Yang
ecc9b60a2d nixos: use attrset for long function args 2025-01-02 04:12:04 +03:00
Ching Pei Yang
fcbc49e2e5 home-manager: use attr for long function args 2025-01-02 04:12:04 +03:00
Ching Pei Yang
59bf01bbe0 nixos: remove redundant import module 2025-01-02 04:12:04 +03:00
Ching Pei Yang
9ccd0bfd4e home-manager: remove redundant import module 2025-01-02 04:12:04 +03:00
Ching Pei Yang
411e641eab lib: remove anythingConcatLists 2025-01-02 04:12:04 +03:00
Ching Pei Yang
98b36e08f0 nixos: use proper submodule type for settings 2025-01-02 04:12:04 +03:00
Ching Pei Yang
8c1352502a module: remove redundant code
the bulk of the build step is moved to modules/wrapper/build
2025-01-02 04:12:04 +03:00
Ching Pei Yang
7d043e5f14 home-manager: use proper submodule type for settings 2025-01-02 04:12:04 +03:00
Ching Pei Yang
26398b6b14 wrapper: add built package as option 2025-01-02 04:12:04 +03:00
Ching Pei Yang
f9d1684b5f wrapper: rename build dir to environemnt 2025-01-02 04:12:04 +03:00
raf
8febf44422
languages/markdown: add render-markdown.nvim as an extension (#517) 2024-12-31 04:02:13 +00:00
raf
c0c6447090
Merge pull request #516 from NotAShelf/bump-all-inputs
flake: bump all inputs
2024-12-30 19:35:54 +03:00
2a89fd4093
flake: bump all inputs 2024-12-30 19:21:33 +03:00
raf
ba3173d363
Merge pull request #515 from diniamo/update-run
flake: update run.nvim
2024-12-30 12:05:52 +03:00
diniamo
c3b51df4a6 flake: update run.nvim 2024-12-30 09:49:33 +01:00
raf
5ce1d90e95
Merge branch 'main' into live-docs-preview 2024-12-20 07:11:58 +03:00
7324474ef8
ci: build previws for the website on doc changes 2024-12-11 02:39:59 +03:00
18 changed files with 718 additions and 482 deletions

172
.github/workflows/docs-preview.yml vendored Normal file
View file

@ -0,0 +1,172 @@
name: Build and Preview Manual
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, closed]
paths:
- ".github/workflows/docs-preview.yml"
- "modules/**"
- "docs/**"
# Defining permissions here passes it to all workflows.
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions:
contents: write
pull-requests: write
issues: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Checkout
uses: actions/checkout@v4
- name: Set default git branch (to reduce log spam)
run: git config --global init.defaultBranch main
- name: Build documentation packages
run: nix build .#docs-html --print-build-logs
- name: Deploy to GitHub Pages preview
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
BRANCH_NAME="gh-pages"
PREVIEW_DIR="docs-preview-${PR_NUMBER}"
# Clone the gh-pages branch and move to the preview subdirectory
git clone --single-branch --branch $BRANCH_NAME https://github.com/${{ github.repository }} gh-pages
cd gh-pages
mkdir -p $PREVIEW_DIR
# Copy the build files to the preview subdirectory
cp -rvf ../result/share/doc/nvf/* ./$PREVIEW_DIR
# Configure git to use the GitHub Actions token for authentication
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# Set the GitHub token for authentication
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
# Add and commit the changes
git add --all
git commit -m "Deploy PR #${PR_NUMBER} preview" || echo "No changes to commit"
git push --force origin $BRANCH_NAME
comment-url:
needs: build-preview
runs-on: ubuntu-latest
steps:
- name: Prepare Environment
id: prelude
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
URL="https://${{ github.repository_owner }}.github.io/nvf/docs-preview-${PR_NUMBER}/"
# Propagate non-interpolatable environment vars
echo "URL=$URL" >> "$GITHUB_OUTPUT"
echo "REV=$GITHUB_SHA" >> "$GITHUB_OUTPUT"
echo "ACTOR=$GITHUB_ACTOR" >> "$GITHUB_OUTPUT"
echo "REF=$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT"
echo "RUNS=$GITHUB_RUN_NUMBER" >> "$GITHUB_OUTPUT"
echo "Live Preview URL: $URL"
echo "Rev: $GITHUB_SHA"
echo "Actor: $GITHUB_ACTOR"
echo "Ref: "$GITHUB_HEAD_REF"
echo "Reruns: "$GITHUB_RUN_NUMBER"
echo "### :rocket: Live Preview Deployed " >> "$GITHUB_STEP_SUMMARY"
echo "Preview can be found at ${URL}" >> "$GITHUB_STEP_SUMMARY"
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
comment-author: "github-actions[bot]"
issue-number: ${{ github.event.pull_request.number }}
body-includes: "Live preview deployed"
- name: Post live preview comment
uses: peter-evans/create-or-update-comment@v4
env:
COMMENT_ID: ${{ steps.fc.outputs.comment-id }}
URL: ${{ steps.prelude.outputs.URL }}
GITHUB_SHA: ${{ steps.prelude.outputs.REV }}
ACTOR: ${{ steps.prelude.outputs.ACTOR }}
REF: ${{ steps.prelude.outputs.REF }}
RUNS: ${{ steps.prelude.outputs.RUNS }}
with:
comment-id: ${{ env.COMMENT_ID }}
issue-number: ${{ github.event.pull_request.number }} # issue number also applies to pull requests
edit-mode: replace # replace previous body
body: |
### :rocket: Live preview deployed from ${{ env.GITHUB_SHA }}
View it [here](${{ env.URL }}):
<details>
<summary><strong>Debug Information</strong></summary>
<p>Triggered by: ${{ env.ACTOR }}</p>
<p><code>HEAD</code> at: ${{ env.REF }}</p>
<p>Reruns: ${{ env.RUNS }}</p>
</details>
cleanup:
if: ${{ github.event.pull_request.merged == true || github.event.pull_request.state == 'closed' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Delete preview for closed/merged PR
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
BRANCH_NAME="gh-pages"
PREVIEW_DIR="docs-preview-${PR_NUMBER}"
# Clone the gh-pages branch
git clone --single-branch --branch $BRANCH_NAME https://github.com/${{ github.repository }} gh-pages
cd gh-pages
# Check if the preview directory exists, and delete it if it does
if [ -d "$PREVIEW_DIR" ]; then
echo "Deleting preview directory $PREVIEW_DIR"
rm -rf $PREVIEW_DIR
else
echo "Preview directory $PREVIEW_DIR does not exist. Skipping deletion."
fi
# Configure git to use the GitHub Actions token for authentication
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# Set the GitHub token for authentication
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
# Add and commit the changes (only if there's something to delete)
git add .
git diff --quiet || git commit -m "Remove preview for PR #${PR_NUMBER}"
git push origin $BRANCH_NAME
cleanup-comment:
needs: cleanup
runs-on: ubuntu-latest
steps:
- name: Post cleanup verification
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
✅ Preview has been deleted successfully!

View file

@ -3,12 +3,16 @@
[NotAShelf](https://github.com/notashelf):
[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
- Add [typst-preview.nvim] under
`languages.typst.extensions.typst-preview-nvim`.
- Add a search widget to the options page in the nvf manual.
- Add [render-markdown.nvim] under
`languages.markdown.extensions.render-markdown-nvim`
[amadaluzia](https://github.com/amadaluzia):
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim

View file

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
@ -98,11 +98,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733024928,
"narHash": "sha256-n/DOfpKH1vkukuBnach91QBQId2dr5tkE7/7UrkV2zw=",
"lastModified": 1735523292,
"narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2c27ab2e60502d1ebb7cf38909de38663f762a79",
"rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b",
"type": "github"
},
"original": {
@ -114,14 +114,14 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"lastModified": 1733096140,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nixpkgs_2": {
@ -207,11 +207,11 @@
"plugin-catppuccin": {
"flake": false,
"locked": {
"lastModified": 1732428187,
"narHash": "sha256-Oogw5wmYkx/zsMlPE/r6Kt3cy5sC92rwVzf0P9rzqyw=",
"lastModified": 1735299190,
"narHash": "sha256-lwQLmqm01FihJdad4QRMK23MTrouyOokyuX/3enWjzs=",
"owner": "catppuccin",
"repo": "nvim",
"rev": "faf15ab0201b564b6368ffa47b56feefc92ce3f4",
"rev": "f67b886d65a029f12ffa298701fb8f1efd89295d",
"type": "github"
},
"original": {
@ -335,11 +335,11 @@
"plugin-cmp-nvim-lsp": {
"flake": false,
"locked": {
"lastModified": 1715931395,
"narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=",
"lastModified": 1733823748,
"narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=",
"owner": "hrsh7th",
"repo": "cmp-nvim-lsp",
"rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
"rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0",
"type": "github"
},
"original": {
@ -415,11 +415,11 @@
"plugin-copilot-cmp": {
"flake": false,
"locked": {
"lastModified": 1718601710,
"narHash": "sha256-8w9go2SBkI+BrXNadWM8ZxDDfrAnZZJx6RbVHAK4+Pg=",
"lastModified": 1733947099,
"narHash": "sha256-erRL8bY/zuwuCZfttw+avTrFV7pjv2H6v73NzY2bymM=",
"owner": "zbirenbaum",
"repo": "copilot-cmp",
"rev": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44",
"rev": "15fc12af3d0109fa76b60b5cffa1373697e261d1",
"type": "github"
},
"original": {
@ -431,11 +431,11 @@
"plugin-copilot-lua": {
"flake": false,
"locked": {
"lastModified": 1729295476,
"narHash": "sha256-UY6N2Q+egh+Cn4REZXrSGH9ElWQBedl0n8tWJvGe7vs=",
"lastModified": 1734926641,
"narHash": "sha256-c2UE0dLBtoYMvMxg+jXzfsD+wN9sZLvftJq4gGmooZU=",
"owner": "zbirenbaum",
"repo": "copilot.lua",
"rev": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0",
"rev": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9",
"type": "github"
},
"original": {
@ -463,11 +463,11 @@
"plugin-csharpls-extended": {
"flake": false,
"locked": {
"lastModified": 1732674428,
"narHash": "sha256-d7ll3OlOLx/7E+6+uga26L/FAqd8pZ4XquMakxMsFwU=",
"lastModified": 1734491815,
"narHash": "sha256-jO/vuNgP8JAOIturzPFvxMLL5y+6YTYsUxjWwX6Nyso=",
"owner": "Decodetalkers",
"repo": "csharpls-extended-lsp.nvim",
"rev": "c788fed627827238de348195c3f318cd090e8e77",
"rev": "4f56c06215d10c4fcfee8a7f04ba766c114aece0",
"type": "github"
},
"original": {
@ -511,11 +511,11 @@
"plugin-dracula": {
"flake": false,
"locked": {
"lastModified": 1731308832,
"narHash": "sha256-3Tlk+utoF4QUjTIPszbyMDh5vUyNiBmq4bRW/leMjaU=",
"lastModified": 1734597715,
"narHash": "sha256-9iRI5NW3mcVzduitY4sr679dRWAWVbZuCAEfgM1OIOs=",
"owner": "Mofiqul",
"repo": "dracula.nvim",
"rev": "e6128ec3923b92bb2b16e81b4a0f04ed0308038e",
"rev": "515acae4fd294fcefa5b15237a333c2606e958d1",
"type": "github"
},
"original": {
@ -527,11 +527,11 @@
"plugin-dressing-nvim": {
"flake": false,
"locked": {
"lastModified": 1731521499,
"narHash": "sha256-O0sdxU+ZQnclnnC5IfBpgqlMxjsJKlmPYQYPP+S3cn8=",
"lastModified": 1734804193,
"narHash": "sha256-N4hB5wDgoqXrXxSfzDCrqmdDtdVvq+PtOS7FBPH7qXE=",
"owner": "stevearc",
"repo": "dressing.nvim",
"rev": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b",
"rev": "3a45525bb182730fe462325c99395529308f431e",
"type": "github"
},
"original": {
@ -543,11 +543,11 @@
"plugin-elixir-tools": {
"flake": false,
"locked": {
"lastModified": 1727872243,
"narHash": "sha256-7gIvoV6myqbkjLnIhHuyNPix1DFkKEeeND2o6VDxDWc=",
"lastModified": 1735076861,
"narHash": "sha256-CoGTVSKifjqshk8hYaQfFYTYgEGsIb1hKdz6fIS81iU=",
"owner": "elixir-tools",
"repo": "elixir-tools.nvim",
"rev": "b465f6aff50257fa466de3886fc3e7de2dcff0de",
"rev": "803fa69dbb457305cff98e3997bed2c4b51aea7c",
"type": "github"
},
"original": {
@ -559,11 +559,11 @@
"plugin-fastaction-nvim": {
"flake": false,
"locked": {
"lastModified": 1732135971,
"narHash": "sha256-Q+FX7XiX8LyTC4OZ43Q2pXIdSViDn65P9pkDp8jvbnA=",
"lastModified": 1734546047,
"narHash": "sha256-1GSxTyXqufjkRtNK3drWlCn/mGJ9mM9bHMR6ZwWT6X8=",
"owner": "Chaitanyabsprip",
"repo": "fastaction.nvim",
"rev": "24255a74e0d35f1e1807aa78997f5c31ae419dbc",
"rev": "886e22d85e13115808e81ca367d5aaba02d9a25b",
"type": "github"
},
"original": {
@ -575,11 +575,11 @@
"plugin-fidget-nvim": {
"flake": false,
"locked": {
"lastModified": 1730221432,
"narHash": "sha256-fQBrkHV54TaOeLYQJ1DE+lr7SFDPN1yqSlzhFm26NAY=",
"lastModified": 1734334336,
"narHash": "sha256-o0za2NxFtzHZa7PRIm9U/P1/fwJrxS1G79ukdGLhJ4Q=",
"owner": "j-hui",
"repo": "fidget.nvim",
"rev": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f",
"rev": "9238947645ce17d96f30842e61ba81147185b657",
"type": "github"
},
"original": {
@ -591,11 +591,11 @@
"plugin-flutter-tools": {
"flake": false,
"locked": {
"lastModified": 1732910301,
"narHash": "sha256-iU0aTq3F5U2z8iKdUMxkvQ8ZopmWIGdx1I8ir0q7n0U=",
"lastModified": 1735420417,
"narHash": "sha256-xfSdPhrSUwBYdE9ZA8GgwFvR70nOp+snbNrFHeIfwOM=",
"owner": "akinsho",
"repo": "flutter-tools.nvim",
"rev": "40f974b15f82f9af498adda8d93aabd637f3ab58",
"rev": "a526c30f1941a7472509aaedda13758f943c968e",
"type": "github"
},
"original": {
@ -607,11 +607,11 @@
"plugin-friendly-snippets": {
"flake": false,
"locked": {
"lastModified": 1728273759,
"narHash": "sha256-H94Ryad0ZsSg/gioUgW+7sowij7GgtEUMNFi1IOZAys=",
"lastModified": 1733106470,
"narHash": "sha256-I8SRZxnoNC6SOWW+scoA77Jwyxcb4eUczppLdyOiZe0=",
"owner": "rafamadriz",
"repo": "friendly-snippets",
"rev": "de8fce94985873666bd9712ea3e49ee17aadb1ed",
"rev": "efff286dd74c22f731cdec26a70b46e5b203c619",
"type": "github"
},
"original": {
@ -751,11 +751,11 @@
"plugin-image-nvim": {
"flake": false,
"locked": {
"lastModified": 1732136347,
"narHash": "sha256-Az/jiHW/DtvHNlV+Wzw6U+p8b2Ic9pNJRQ6YGerL81c=",
"lastModified": 1735173549,
"narHash": "sha256-Sjbmf4BmjkjAorT3tojbC7JivJagFamAVgzwcCipa8k=",
"owner": "3rd",
"repo": "image.nvim",
"rev": "5f8fceca2d1be96a45b81de21c2f98bf6084fb34",
"rev": "b991fc7f845bc6ab40c6ec00b39750dcd5190010",
"type": "github"
},
"original": {
@ -767,11 +767,11 @@
"plugin-indent-blankline": {
"flake": false,
"locked": {
"lastModified": 1731320409,
"narHash": "sha256-WVDNi/woG0ohPEYzM83mmXDCRNYnQbqooSDVUtBsJbY=",
"lastModified": 1733296464,
"narHash": "sha256-H3lUQZDvgj3a2STYeMUDiOYPe7rfsy08tJ4SlDd+LuE=",
"owner": "lukas-reineke",
"repo": "indent-blankline.nvim",
"rev": "7871a88056f7144defca9c931e311a3134c5d509",
"rev": "259357fa4097e232730341fa60988087d189193a",
"type": "github"
},
"original": {
@ -799,11 +799,11 @@
"plugin-lsp-lines": {
"flake": false,
"locked": {
"lastModified": 1716108775,
"narHash": "sha256-QsvmPOer7JgO7Y+N/iaNJD7Kmy69gnlV4CeyaQesNvA=",
"lastModified": 1734793049,
"narHash": "sha256-jHiIZemneQACTDYZXBJqX2/PRTBoxq403ILvt1Ej1ZM=",
"owner": "~whynothugo",
"repo": "lsp_lines.nvim",
"rev": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055",
"rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d",
"type": "sourcehut"
},
"original": {
@ -831,11 +831,11 @@
"plugin-lspkind": {
"flake": false,
"locked": {
"lastModified": 1729872608,
"narHash": "sha256-/ifgjqqCQw67l3+gUs00tt860pa92M1WYdjdZ0lhxak=",
"lastModified": 1733408701,
"narHash": "sha256-OCvKUBGuzwy8OWOL1x3Z3fo+0+GyBMI9TX41xSveqvE=",
"owner": "onsails",
"repo": "lspkind-nvim",
"rev": "a700f1436d4a938b1a1a93c9962dc796afbaef4d",
"rev": "d79a1c3299ad0ef94e255d045bed9fa26025dab6",
"type": "github"
},
"original": {
@ -895,11 +895,11 @@
"plugin-luasnip": {
"flake": false,
"locked": {
"lastModified": 1732967555,
"narHash": "sha256-iWivJ6dIOEqT3uLQA5KzvCHkDcjC62OlNWagEW680qc=",
"lastModified": 1733162004,
"narHash": "sha256-efDe3RXncnNVkj37AmIv8oj0DKurB50Dziao5FGTLP4=",
"owner": "L3MON4D3",
"repo": "LuaSnip",
"rev": "2592b91577136dbb355a4708be1e60619456b7f6",
"rev": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d",
"type": "github"
},
"original": {
@ -911,11 +911,11 @@
"plugin-lz-n": {
"flake": false,
"locked": {
"lastModified": 1733019070,
"narHash": "sha256-Go9FBjF3EBFy+/53lpC5AdKYpJBK+uFzInTk6lODxdQ=",
"lastModified": 1735437369,
"narHash": "sha256-6NIXqwmX7RgwiZVEzmTnkJgmrPqFNx12ayIcRgNIaEs=",
"owner": "nvim-neorocks",
"repo": "lz.n",
"rev": "f308fa4dd81355fb5fddf3ca209847d679af6917",
"rev": "32be28a221b9c98e56841458e4b20c150a4169c4",
"type": "github"
},
"original": {
@ -976,11 +976,11 @@
"plugin-modes-nvim": {
"flake": false,
"locked": {
"lastModified": 1717693302,
"narHash": "sha256-z1XD0O+gG2/+g/skdWGC64Zv4dXvvhWesaK/8DcPF/E=",
"lastModified": 1734414076,
"narHash": "sha256-ShIK8ROowT1yFHgSIVHUFnnQOEMr3YPIqw4ixzR8w8M=",
"owner": "mvllow",
"repo": "modes.nvim",
"rev": "326cff3282419b3bcc745061978c1e592cae055d",
"rev": "c7a4b1b383606832aab150902719bd5eb5cdb2b0",
"type": "github"
},
"original": {
@ -992,11 +992,11 @@
"plugin-neo-tree-nvim": {
"flake": false,
"locked": {
"lastModified": 1732465535,
"narHash": "sha256-3wRojpFbdjcRQPv62/mHqQgyfytTqaBcsX1X0zCNgC8=",
"lastModified": 1735302061,
"narHash": "sha256-tZMneZsEbB5bgZgYq4ZWwK25B3vcnn80Q7diKcRoEv4=",
"owner": "nvim-neo-tree",
"repo": "neo-tree.nvim",
"rev": "42caaf5c3b7ca346ab278201151bb878006a6031",
"rev": "a9f8943b4c31f8460d25c71e0f463d65e9775f1c",
"type": "github"
},
"original": {
@ -1008,11 +1008,11 @@
"plugin-neocord": {
"flake": false,
"locked": {
"lastModified": 1729369963,
"narHash": "sha256-4dVaxigJ8eOXpgiqcxUYIF4SoC1CPFvNHYKT0zxIYo0=",
"lastModified": 1733429637,
"narHash": "sha256-g/pq6hFo7duonIl1wWoxbJUTh/IRTH3hHEoQUdoiqKE=",
"owner": "IogaMaster",
"repo": "neocord",
"rev": "587e03390a355e9c364d48638e0e0db2a8431d73",
"rev": "4d55d8dab2d5f2f272192add7a2c21982039c699",
"type": "github"
},
"original": {
@ -1040,11 +1040,11 @@
"plugin-neorg": {
"flake": false,
"locked": {
"lastModified": 1732289702,
"narHash": "sha256-8RQ+PFnIcjPoNJQB/qz+zv1fjVjFEwPhuAh+JL7GPL4=",
"lastModified": 1734188232,
"narHash": "sha256-xH87caxEebrWLwY/v3xyyOy6PTG/ZqX2OfCdwg/RqDY=",
"owner": "nvim-neorg",
"repo": "neorg",
"rev": "7a893a176a7d9c074a5371865b53c6aa4e223991",
"rev": "6b945909d84b5aeadc875f9b3f529ec44b9bc60f",
"type": "github"
},
"original": {
@ -1088,11 +1088,11 @@
"plugin-noice-nvim": {
"flake": false,
"locked": {
"lastModified": 1732649160,
"narHash": "sha256-0RLMkThaE6AxYvUKx056Ac63Oc2NTJxvgyRnZJ5/D2g=",
"lastModified": 1734026622,
"narHash": "sha256-OpwgNTGunmy6Y7D/k0T+DFK/WJ8MeVTGWwjiPTQlvEY=",
"owner": "folke",
"repo": "noice.nvim",
"rev": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c",
"rev": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f",
"type": "github"
},
"original": {
@ -1121,11 +1121,11 @@
"plugin-nui-nvim": {
"flake": false,
"locked": {
"lastModified": 1726376728,
"narHash": "sha256-90Wq+vT361mTaGU/SvAezqJkX9HHmZ2GI2fKBDxPn04=",
"lastModified": 1733856815,
"narHash": "sha256-6U7E/i5FuNXQy+sF4C5DVxuTPqNKD5wxUgFohpOjm9Q=",
"owner": "MunifTanjim",
"repo": "nui.nvim",
"rev": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f",
"rev": "53e907ffe5eedebdca1cd503b00aa8692068ca46",
"type": "github"
},
"original": {
@ -1169,11 +1169,11 @@
"plugin-nvim-cmp": {
"flake": false,
"locked": {
"lastModified": 1732948484,
"narHash": "sha256-+0nflL0WCaxPuJgUviELhbXASNYYl/SKZ+nz70sEAXU=",
"lastModified": 1734672427,
"narHash": "sha256-Z/Qy2ErbCa7dbjZVuJUkMmb4d24amNunNgRcbCGPfOg=",
"owner": "hrsh7th",
"repo": "nvim-cmp",
"rev": "ca4d3330d386e76967e53b85953c170658255ecb",
"rev": "b555203ce4bd7ff6192e759af3362f9d217e8c89",
"type": "github"
},
"original": {
@ -1185,11 +1185,11 @@
"plugin-nvim-colorizer-lua": {
"flake": false,
"locked": {
"lastModified": 1732386340,
"narHash": "sha256-lAWeljYC17bmEs1Ss80o6eJYrJ9fsFlKvyJWu9e44XU=",
"lastModified": 1735384185,
"narHash": "sha256-quqs3666vQc/4ticc/Z5BHzGxV6UUVE9jVGT07MEMQQ=",
"owner": "NvChad",
"repo": "nvim-colorizer.lua",
"rev": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb",
"rev": "8a65c448122fc8fac9c67b2e857b6e830a4afd0b",
"type": "github"
},
"original": {
@ -1217,11 +1217,11 @@
"plugin-nvim-dap": {
"flake": false,
"locked": {
"lastModified": 1732901614,
"narHash": "sha256-atsgMdPyAAbh4dIxZOAE3hHLLb/664112lHdXHcXtZQ=",
"lastModified": 1735568902,
"narHash": "sha256-5iaXim9bDvSAI6jUXgu2OEk/KivfAsMTRry+UTHs2Gk=",
"owner": "mfussenegger",
"repo": "nvim-dap",
"rev": "0a0daa796a5919a51e5e5019ffa91219c94c4fef",
"rev": "ffb077e65259f13be096ea6d603e3575a76b214a",
"type": "github"
},
"original": {
@ -1249,11 +1249,11 @@
"plugin-nvim-dap-ui": {
"flake": false,
"locked": {
"lastModified": 1727897692,
"narHash": "sha256-kg7lyVBeuBqPCVzvt3pBoonQupgf1nGh3EvCF/astf4=",
"lastModified": 1735324898,
"narHash": "sha256-psIBQpx3tV2UWm5hZTMPBANcXHPAX24dIuDq8Qcscxs=",
"owner": "rcarriga",
"repo": "nvim-dap-ui",
"rev": "ffa89839f97bad360e78428d5c740fdad9a0ff02",
"rev": "e94d98649dccb6a3884b66aabc2e07beb279e535",
"type": "github"
},
"original": {
@ -1265,11 +1265,11 @@
"plugin-nvim-docs-view": {
"flake": false,
"locked": {
"lastModified": 1723781320,
"narHash": "sha256-6kd3IWsD72eYe+q1w78gcFcK9LalCQHCqtSwwqQR3Ew=",
"lastModified": 1733658747,
"narHash": "sha256-b5aH8Tj+tMk0BjNCgdeCEeR26oQ9NCobj98P7IDgIPY=",
"owner": "amrbashir",
"repo": "nvim-docs-view",
"rev": "365593534e0acd762bfddce6e8313315ffa4fa36",
"rev": "1b97f8f954d74c46061bf289b6cea9232484c12c",
"type": "github"
},
"original": {
@ -1281,11 +1281,11 @@
"plugin-nvim-lightbulb": {
"flake": false,
"locked": {
"lastModified": 1729134062,
"narHash": "sha256-JfXSuOBwyxgH/PzzcBQ7OqoXHkLGZSCYutYHLocbTto=",
"lastModified": 1734997673,
"narHash": "sha256-byvgRJvvt5rhiUVWdreY2jELXoPVld5EKQlOXwjNgWE=",
"owner": "kosayoda",
"repo": "nvim-lightbulb",
"rev": "33d4c95e0e853956bc9468b70b3064c87d5abaca",
"rev": "3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea",
"type": "github"
},
"original": {
@ -1297,11 +1297,11 @@
"plugin-nvim-lspconfig": {
"flake": false,
"locked": {
"lastModified": 1733062298,
"narHash": "sha256-tLZYWbKSQxiRU1tQqRXAUSTfCS7a1tHNSIMbt0aOamU=",
"lastModified": 1735439232,
"narHash": "sha256-6a1HjpLYdZ+ZmWM1B0tv631A3EHHstPrjaV15UnVtoY=",
"owner": "neovim",
"repo": "nvim-lspconfig",
"rev": "90c1c6cc822b1836209514c096069b9bbeab63d9",
"rev": "8b15a1a597a59f4f5306fad9adfe99454feab743",
"type": "github"
},
"original": {
@ -1313,11 +1313,11 @@
"plugin-nvim-metals": {
"flake": false,
"locked": {
"lastModified": 1728295172,
"narHash": "sha256-ja/+MNxZ3H9io9jDwm5rhE6iKNi86a22eCOY75g19O8=",
"lastModified": 1735386491,
"narHash": "sha256-G9V7fX65uW4z7kiuiP8mLtEjLoTJ1mkltj51OlN5/oM=",
"owner": "scalameta",
"repo": "nvim-metals",
"rev": "f861db9fda55939797ac1b05238c49b0dcdc3bdb",
"rev": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c",
"type": "github"
},
"original": {
@ -1361,11 +1361,11 @@
"plugin-nvim-neoclip": {
"flake": false,
"locked": {
"lastModified": 1725927226,
"narHash": "sha256-GHkTIGPgX5j1wUS9EW/fGOp3NSRjfVaz+6o1Aehy2Xw=",
"lastModified": 1734898459,
"narHash": "sha256-RCMZi1DM9JFrXWQ5w2wOjFzpANkiukn+RvHB9swMtbk=",
"owner": "AckslD",
"repo": "nvim-neoclip.lua",
"rev": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f",
"rev": "5e5e010251281f4aea69cfc1d4976ffe6065cf0f",
"type": "github"
},
"original": {
@ -1393,11 +1393,11 @@
"plugin-nvim-notify": {
"flake": false,
"locked": {
"lastModified": 1727022370,
"narHash": "sha256-Sd7IR5roXHOKRCxhqtYMhWfEltyRJMDEMDO/ecSKenE=",
"lastModified": 1735562588,
"narHash": "sha256-9jDpoLLto9WgTsV399WeE2XGrTJXWTYbcJ+zOFWldAA=",
"owner": "rcarriga",
"repo": "nvim-notify",
"rev": "fbef5d32be8466dd76544a257d3f3dce20082a07",
"rev": "c3797193536711b5d8983975791c4b11dc35ab3a",
"type": "github"
},
"original": {
@ -1457,11 +1457,11 @@
"plugin-nvim-tree-lua": {
"flake": false,
"locked": {
"lastModified": 1732428058,
"narHash": "sha256-HHgC7aH2m3gv2FtOK1jhjBgJOGWrdc+FQOEpMiEWe74=",
"lastModified": 1734820548,
"narHash": "sha256-4PmP31vYPH9xw4AjV5rDSKvcvZGTnIaPfR4Bwc0lAiA=",
"owner": "nvim-tree",
"repo": "nvim-tree.lua",
"rev": "ca7c4c33cac2ad66ec69d45e465379716ef0cc97",
"rev": "68fc4c20f5803444277022c681785c5edd11916d",
"type": "github"
},
"original": {
@ -1473,11 +1473,11 @@
"plugin-nvim-treesitter-context": {
"flake": false,
"locked": {
"lastModified": 1733041360,
"narHash": "sha256-wcz3F0vDrgMXJjB0Zz7naoVQ8YvHdd55gG4NHqQMYQY=",
"lastModified": 1734710732,
"narHash": "sha256-TIFMPKzD2ero1eK9aVfY1iKEvf/Sw8SL/9mk9omCQ3c=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "920999bf53daa63ddf12efdeb5137a7cea1cc201",
"rev": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0",
"type": "github"
},
"original": {
@ -1489,11 +1489,11 @@
"plugin-nvim-ts-autotag": {
"flake": false,
"locked": {
"lastModified": 1732998473,
"narHash": "sha256-HtF0arW9cuE4yQN+1ccRaonqiH6fcoTpyuSecLPKtKc=",
"lastModified": 1733164313,
"narHash": "sha256-v2NTFBIzKTYizUPWB3uhpnTGVZWaelhE3MT5+BDA6Do=",
"owner": "windwp",
"repo": "nvim-ts-autotag",
"rev": "f2d24aca1bcbbd2c0306fd93d52e3697027b77ff",
"rev": "1cca23c9da708047922d3895a71032bc0449c52d",
"type": "github"
},
"original": {
@ -1505,11 +1505,11 @@
"plugin-nvim-web-devicons": {
"flake": false,
"locked": {
"lastModified": 1732925137,
"narHash": "sha256-Sh+r54pTI60j5tOmSyEkTVS6MzMIt52nqjNdtMp8kpI=",
"lastModified": 1735569123,
"narHash": "sha256-h9rY6F+2sBlG9PFN34/0ZTkY66oCeCIPe/HEadM03K4=",
"owner": "nvim-tree",
"repo": "nvim-web-devicons",
"rev": "203da76ecfbb4b192cf830665b03eb651b635c94",
"rev": "4adeeaa7a32d46cf3b5833341358c797304f950a",
"type": "github"
},
"original": {
@ -1569,11 +1569,11 @@
"plugin-orgmode-nvim": {
"flake": false,
"locked": {
"lastModified": 1731656059,
"narHash": "sha256-uKJuJsxQhdh3NxZx1Uu72poQVFN7KEyyMFEHPUr7UgQ=",
"lastModified": 1734770880,
"narHash": "sha256-E1YJeTay1tX2PgiXwV/DRgrlYHIGUe9/uTA+6ORIhBw=",
"owner": "nvim-orgmode",
"repo": "orgmode",
"rev": "1d8c9b9417f8c8e9fb146d4f54fb1e90a4f7e534",
"rev": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0",
"type": "github"
},
"original": {
@ -1585,11 +1585,11 @@
"plugin-otter-nvim": {
"flake": false,
"locked": {
"lastModified": 1724585935,
"narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=",
"lastModified": 1735130975,
"narHash": "sha256-NPBGcLi1lEmpGGbGs58Xzw1IriOyKTMQdwIdVFsbVDM=",
"owner": "jmbuhr",
"repo": "otter.nvim",
"rev": "ca9ce67d0399380b659923381b58d174344c9ee7",
"rev": "e8c662e1aefa8b483cfba6e00729a39a363dcecc",
"type": "github"
},
"original": {
@ -1694,14 +1694,30 @@
"type": "github"
}
},
"plugin-render-markdown-nvim": {
"flake": false,
"locked": {
"lastModified": 1735525479,
"narHash": "sha256-ncFqBv0JITX3pTsLON+HctLUaKXhLRMBUrRWmI8KOSA=",
"owner": "MeanderingProgrammer",
"repo": "render-markdown.nvim",
"rev": "6fbd1491abc104409f119685de5353c35c97c005",
"type": "github"
},
"original": {
"owner": "MeanderingProgrammer",
"repo": "render-markdown.nvim",
"type": "github"
}
},
"plugin-rose-pine": {
"flake": false,
"locked": {
"lastModified": 1729724348,
"narHash": "sha256-/a4pwuVJ5odm3Iio2MeoqAm8GlWIPI91mM4cVnSy/gE=",
"lastModified": 1733845819,
"narHash": "sha256-ejh9UXQbLc8Ie6wF7zszzL1gaJzr16gcu0dUWqTo8AM=",
"owner": "rose-pine",
"repo": "neovim",
"rev": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e",
"rev": "91548dca53b36dbb9d36c10f114385f759731be1",
"type": "github"
},
"original": {
@ -1729,11 +1745,11 @@
"plugin-run-nvim": {
"flake": false,
"locked": {
"lastModified": 1735130195,
"narHash": "sha256-OaOSYyXSNCl9kJJVKhy0L4M06CQFc0NtZ8+AIgKBPik=",
"lastModified": 1735501787,
"narHash": "sha256-CFOyOARCLQiMOhFPeqz8n2ULyaaRxRZrOk0FCibjuIM=",
"owner": "diniamo",
"repo": "run.nvim",
"rev": "5888f31c5faf4776e598c0665470f5445510c59e",
"rev": "9015c9cece816ccf10a185b420f6e345fd990802",
"type": "github"
},
"original": {
@ -1745,11 +1761,11 @@
"plugin-rustaceanvim": {
"flake": false,
"locked": {
"lastModified": 1732919014,
"narHash": "sha256-7UZ54b3IPS1cPyu+JCM/dHhJLHuqa16suaC2XlSw5Og=",
"lastModified": 1735431742,
"narHash": "sha256-ucZXGbxHtbSKf5n11lL3vb6rD2BxJacIDOgcx32PLzA=",
"owner": "mrcjkb",
"repo": "rustaceanvim",
"rev": "4ac7a3c6cca9e393229651cc90733afbdc7c6395",
"rev": "51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb",
"type": "github"
},
"original": {
@ -1761,11 +1777,11 @@
"plugin-smartcolumn": {
"flake": false,
"locked": {
"lastModified": 1710067624,
"narHash": "sha256-DHIeDNUF9n9s14GVeojIwc5QUPwJMYYl3gRvhvO/rdE=",
"lastModified": 1734696989,
"narHash": "sha256-6RodA5BQnL6tB3RCE5G2RiXqBvM3VP3HYZ+T3AxIF7Q=",
"owner": "m4xshen",
"repo": "smartcolumn.nvim",
"rev": "cefb17be095ad5526030a21bb2a80553cae09127",
"rev": "f14fbea6f86cd29df5042897ca9e3ba10ba4d27f",
"type": "github"
},
"original": {
@ -1777,11 +1793,11 @@
"plugin-sqls-nvim": {
"flake": false,
"locked": {
"lastModified": 1733003065,
"narHash": "sha256-VKN4ggWogAr+hwr/gtIDgY5j3afL9R7dZ2oJ4+qpEtE=",
"lastModified": 1733090837,
"narHash": "sha256-o5uD6shPkweuE+k/goBX42W3I2oojXVijfJC7L50sGU=",
"owner": "nanotee",
"repo": "sqls.nvim",
"rev": "8d7b6010d276fdda494ede23df511eba120886b9",
"rev": "a514379f5f89bf72955ed3bf5c1c31a40b8a1472",
"type": "github"
},
"original": {
@ -1825,11 +1841,11 @@
"plugin-tiny-devicons-auto-colors": {
"flake": false,
"locked": {
"lastModified": 1724403745,
"narHash": "sha256-Ndkbvxn/x7+fxEYD7JIygqUiItuhoY+4+DaL/pJGKdc=",
"lastModified": 1733445616,
"narHash": "sha256-klUZKvdYhwO3sq4Su4sBFDcNSAYXh53O72vg4+ZOrhI=",
"owner": "rachartier",
"repo": "tiny-devicons-auto-colors.nvim",
"rev": "a39fa4c92268832f6034306793b8acbfec2a7549",
"rev": "c8f63933ee013c1e0a26091d58131e060546f01f",
"type": "github"
},
"original": {
@ -1857,11 +1873,11 @@
"plugin-toggleterm-nvim": {
"flake": false,
"locked": {
"lastModified": 1731162901,
"narHash": "sha256-g1FwgCc3a8Fak0Nb0gQQ+SI44uyAGaH1tIk1qpaAPEY=",
"lastModified": 1735340326,
"narHash": "sha256-oeNIb+QHa/9yGZz/2u9LYIdKluel0bcQkaIqOuQUkis=",
"owner": "akinsho",
"repo": "toggleterm.nvim",
"rev": "87b2d6a3cab8e2bd9a0255427074285f0365398d",
"rev": "344fc1810292785b3d962ddac2de57669e1a7ff9",
"type": "github"
},
"original": {
@ -1873,11 +1889,11 @@
"plugin-tokyonight": {
"flake": false,
"locked": {
"lastModified": 1732026921,
"narHash": "sha256-vKXlFHzga9DihzDn+v+j3pMNDfvhYHcCT8GpPs0Uxgg=",
"lastModified": 1734211493,
"narHash": "sha256-TJ/a6N6Cc1T0wdMxMopma1NtwL7rMYbZ6F0zFI1zaIA=",
"owner": "folke",
"repo": "tokyonight.nvim",
"rev": "c2725eb6d086c8c9624456d734bd365194660017",
"rev": "45d22cf0e1b93476d3b6d362d720412b3d34465c",
"type": "github"
},
"original": {
@ -1921,11 +1937,11 @@
"plugin-typst-preview-nvim": {
"flake": false,
"locked": {
"lastModified": 1733120663,
"narHash": "sha256-uYMZ2PONiiI3UDvCgNvyy4+jhzmUDbAyxX0phKxELXw=",
"lastModified": 1734839452,
"narHash": "sha256-d6Tv7xZRghYYDfABk/p2e9qTm4qnWHM+ejKDCcR0TfY=",
"owner": "chomosuke",
"repo": "typst-preview.nvim",
"rev": "0cb5f5627312f50ce089f785ec42b55a85f30ce7",
"rev": "c1100e8788baabe8ca8f8cd7fd63d3d479e49e36",
"type": "github"
},
"original": {
@ -1953,11 +1969,11 @@
"plugin-vim-fugitive": {
"flake": false,
"locked": {
"lastModified": 1732036604,
"narHash": "sha256-RGS2T6tHuFPZROU0W4Z6j6wMEiJmd8xuKv3qqM3XHPI=",
"lastModified": 1735457366,
"narHash": "sha256-45zsqKavWoclA67MC54bAel1nE8CLHtSdullHByiRS8=",
"owner": "tpope",
"repo": "vim-fugitive",
"rev": "320b18fba2a4f2fe3c8225c778c687e0d2620384",
"rev": "174230d6a7f2df94705a7ffd8d5413e27ec10a80",
"type": "github"
},
"original": {
@ -2033,11 +2049,11 @@
"plugin-which-key": {
"flake": false,
"locked": {
"lastModified": 1732804356,
"narHash": "sha256-55RmbdN0rNG8946eIMFd5BlN82eY1GKqmHdUiC7BP+U=",
"lastModified": 1734253151,
"narHash": "sha256-f/+sYMDEguB5ZDiYiQAsDvdF/2cVcWnLBU+9qwigk4s=",
"owner": "folke",
"repo": "which-key.nvim",
"rev": "9b365a6428a9633e3eeb34dbef1b791511c54f70",
"rev": "8ab96b38a2530eacba5be717f52e04601eb59326",
"type": "github"
},
"original": {
@ -2170,6 +2186,7 @@
"plugin-precognition-nvim": "plugin-precognition-nvim",
"plugin-project-nvim": "plugin-project-nvim",
"plugin-registers": "plugin-registers",
"plugin-render-markdown-nvim": "plugin-render-markdown-nvim",
"plugin-rose-pine": "plugin-rose-pine",
"plugin-rtp-nvim": "plugin-rtp-nvim",
"plugin-run-nvim": "plugin-run-nvim",

View file

@ -31,7 +31,7 @@
};
homeManagerModules = {
nvf = import ./flake/modules/home-manager.nix self.packages lib;
nvf = import ./flake/modules/home-manager.nix {inherit lib self;};
default = self.homeManagerModules.nvf;
neovim-flake =
lib.warn ''
@ -42,7 +42,7 @@
};
nixosModules = {
nvf = import ./flake/modules/nixos.nix self.packages lib;
nvf = import ./flake/modules/nixos.nix {inherit lib self;};
default = self.nixosModules.nvf;
neovim-flake =
lib.warn ''
@ -488,6 +488,11 @@
flake = false;
};
plugin-render-markdown-nvim = {
url = "github:MeanderingProgrammer/render-markdown.nvim";
flake = false;
};
# Minimap
plugin-minimap-vim = {
url = "github:wfxr/minimap.vim";

View file

@ -1,22 +1,28 @@
# Home Manager module
packages: lib: {
{
self,
lib,
}: {
config,
pkgs,
...
}: let
inherit (self) packages inputs;
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
inherit (lib.types) anything bool submoduleWith;
cfg = config.programs.nvf;
neovimConfigured = neovimConfiguration {
inherit pkgs;
modules = [cfg.settings];
nvfModule = submoduleWith {
description = "Nvf module";
class = "nvf";
specialArgs = {
inherit pkgs lib inputs;
};
modules = import ../../modules/modules.nix {inherit pkgs lib;};
};
in {
imports = [
@ -55,7 +61,7 @@ in {
};
settings = mkOption {
type = attrsOf anythingConcatLists;
type = nvfModule;
default = {};
description = "Attribute set of nvf preferences.";
example = literalExpression ''
@ -78,7 +84,7 @@ in {
};
config = mkIf cfg.enable {
programs.nvf.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = cfg.settings.vim.build.finalPackage;
home = {
sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";};

View file

@ -1,22 +1,28 @@
# NixOS module
packages: lib: {
{
self,
lib,
}: {
config,
pkgs,
...
}: let
inherit (self) inputs packages;
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
inherit (lib.types) anything bool submoduleWith;
cfg = config.programs.nvf;
neovimConfigured = neovimConfiguration {
inherit pkgs;
modules = [cfg.settings];
nvfModule = submoduleWith {
description = "Nvf module";
class = "nvf";
specialArgs = {
inherit pkgs lib inputs;
};
modules = import ../../modules/modules.nix {inherit pkgs lib;};
};
in {
imports = [
@ -55,7 +61,7 @@ in {
};
settings = mkOption {
type = attrsOf anythingConcatLists;
type = nvfModule;
default = {};
description = "Attribute set of nvf preferences.";
example = literalExpression ''
@ -78,7 +84,7 @@ in {
};
config = mkIf cfg.enable {
programs.nvf.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = cfg.settings.vim.build.finalPackage;
environment = {
variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");

View file

@ -1,57 +1,8 @@
{lib}: let
inherit (lib.options) showOption showFiles getFiles mergeOneOption mergeEqualOption;
inherit (lib.strings) isString isStringLike;
inherit (lib.types) anything attrsOf listOf mkOptionType;
inherit (lib.nvim.types) anythingConcatLists;
inherit (builtins) typeOf isAttrs any head concatLists stringLength match;
inherit (lib.options) mergeEqualOption;
inherit (lib.strings) isString stringLength match;
inherit (lib.types) listOf mkOptionType;
in {
# HACK: Does this break anything in our case?
# A modified version of the nixpkgs anything type that concatenates lists
# This isn't the default because the order in which the lists are concatenated depends on the order in which the modules are imported,
# which makes it non-deterministic
anythingConcatLists =
anything
// {
merge = loc: defs: let
getType = value:
if isAttrs value && isStringLike value
then "stringCoercibleSet"
else typeOf value;
# Throw an error if not all defs have the same type
checkType = getType (head defs).value;
commonType =
if any (def: getType def.value != checkType) defs
then throw "The option `${showOption loc}' has conflicting option types in ${showFiles (getFiles defs)}"
else checkType;
mergeFunctions = {
# Recursively merge attribute sets
set = (attrsOf anythingConcatLists).merge;
# Overridden behavior for lists, that concatenates lists
list = _: defs: concatLists (map (e: e.value) defs);
# This means it's a package, only accept a single definition
stringCoercibleSet = mergeOneOption;
# This works by passing the argument to the functions,
# and merging their returns values instead
lambda = loc: defs: arg:
anythingConcatLists.merge
(loc ++ ["<function body>"])
(map (def: {
inherit (def) file;
value = def.value arg;
})
defs);
};
in
# Merge the defs with the correct function from above, if available
# otherwise only allow equal values
(mergeFunctions.${commonType} or mergeEqualOption) loc defs;
};
mergelessListOf = elemType: let
super = listOf elemType;
in

View file

@ -11,5 +11,5 @@ in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
inherit (typesLanguage) diagnostics mkGrammarOption;
inherit (customTypes) anythingConcatLists char hexColor mergelessListOf;
inherit (customTypes) char hexColor mergelessListOf;
}

View file

@ -9,9 +9,8 @@
extraModules ? [],
configuration ? {},
}: let
inherit (pkgs) vimPlugins;
inherit (lib.strings) isString toString;
inherit (lib.lists) filter map concatLists;
inherit (lib.strings) toString;
inherit (lib.lists) concatLists;
# import modules.nix with `check`, `pkgs` and `lib` as arguments
# check can be disabled while calling this file is called
@ -21,7 +20,12 @@
# evaluate the extended library with the modules
# optionally with any additional modules passed by the user
module = lib.evalModules {
specialArgs = extraSpecialArgs // {modulesPath = toString ./.;};
specialArgs =
extraSpecialArgs
// {
inherit inputs;
modulesPath = toString ./.;
};
modules = concatLists [
nvimModules
modules
@ -36,102 +40,11 @@
extraModules))
];
};
# alias to the internal configuration
vimOptions = module.config.vim;
noBuildPlug = {pname, ...} @ attrs: let
src = inputs."plugin-${attrs.pname}";
in
{
version = src.shortRev or src.shortDirtyRev or "dirty";
outPath = src;
passthru.vimPlugin = false;
}
// attrs;
# build a vim plugin with the given name and arguments
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
# instead
buildPlug = attrs: let
src = inputs."plugin-${attrs.pname}";
in
pkgs.vimUtils.buildVimPlugin (
{
version = src.shortRev or src.shortDirtyRev or "dirty";
inherit src;
}
// attrs
);
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
pluginBuilders = {
nvim-treesitter = buildTreesitterPlug vimOptions.treesitter.grammars;
flutter-tools-patched = buildPlug {
pname = "flutter-tools";
patches = [../patches/flutter-tools.patch];
};
};
buildConfigPlugins = plugins:
map (
plug:
if (isString plug)
then pluginBuilders.${plug} or (noBuildPlug {pname = plug;})
else plug
) (filter (f: f != null) plugins);
# built (or "normalized") plugins that are modified
builtStartPlugins = buildConfigPlugins vimOptions.startPlugins;
builtOptPlugins = map (package: package // {optional = true;}) (buildConfigPlugins vimOptions.optPlugins);
# additional Lua and Python3 packages, mapped to their respective functions
# to conform to the format mnw expects. end user should
# only ever need to pass a list of packages, which are modified
# here
extraLuaPackages = ps: map (x: ps.${x}) vimOptions.luaPackages;
extraPython3Packages = ps: map (x: ps.${x}) vimOptions.python3Packages;
# Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to
# generate a wrapped Neovim package.
neovim-wrapped = inputs.mnw.lib.wrap pkgs {
neovim = vimOptions.package;
plugins = builtStartPlugins ++ builtOptPlugins;
appName = "nvf";
extraBinPath = vimOptions.extraPackages;
initLua = vimOptions.builtLuaConfigRC;
luaFiles = vimOptions.extraLuaFiles;
inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3;
inherit extraLuaPackages extraPython3Packages;
};
dummyInit = pkgs.writeText "nvf-init.lua" vimOptions.builtLuaConfigRC;
# Additional helper scripts for printing and displaying nvf configuration
# in your commandline.
printConfig = pkgs.writers.writeDashBin "nvf-print-config" "cat ${dummyInit}";
printConfigPath = pkgs.writers.writeDashBin "nvf-print-config-path" "echo -n ${dummyInit}";
in {
inherit (module) options config;
inherit (module._module.args) pkgs;
# Expose wrapped neovim-package for userspace
# or module consumption.
neovim = pkgs.symlinkJoin {
name = "nvf-with-helpers";
paths = [neovim-wrapped printConfig printConfigPath];
postBuild = "echo Helpers added";
# Allow evaluating vimOptions, i.e., config.vim from the packages' passthru
# attribute. For example, packages.x86_64-linux.neovim.passthru.neovimConfig
# will return the configuration in full.
passthru.neovimConfig = vimOptions;
meta =
neovim-wrapped.meta
// {
description = "Wrapped Neovim package with helper scripts to print the config (path)";
};
};
neovim = module.config.vim.build.finalPackage;
}

View file

@ -49,6 +49,7 @@
# using the configuration passed in `neovim` and `plugins` modules.
wrapper = map (p: ./wrapper + "/${p}") [
"build"
"environment"
"rc"
"warnings"
"lazy"

View file

@ -4,13 +4,14 @@
lib,
...
}: let
inherit (builtins) attrNames concatLists;
inherit (builtins) attrNames;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.lists) isList;
inherit (lib.lists) isList concatLists;
inherit (lib.types) bool enum either package listOf str;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua toLuaObject;
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.markdown;
defaultServer = "marksman";
@ -98,6 +99,29 @@ in {
description = "Extra filetypes to format with the Markdown formatter";
};
};
extensions = {
render-markdown-nvim = {
enable =
mkEnableOption ""
// {
description = ''
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
Inline Markdown rendering with [render-markdown.nvim]
'';
};
setupOpts = mkPluginSetupOption "render-markdown" {
auto_override_publish_diagnostics = mkOption {
description = "Automatically override the publish_diagnostics handler";
type = bool;
default = true;
};
};
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -115,5 +139,13 @@ in {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.markdown-format = formats.${cfg.format.type}.nullConfig;
})
# Extensions
(mkIf cfg.extensions.render-markdown-nvim.enable {
vim.startPlugins = ["render-markdown-nvim"];
vim.pluginRC.render-markdown-nvim = entryAnywhere ''
require("render-markdown").setup(${toLuaObject cfg.extensions.render-markdown-nvim.setupOpts})
'';
})
]);
}

View file

@ -1,13 +1,111 @@
{
config,
inputs,
lib,
config,
pkgs,
...
}: let
inherit (lib.attrsets) attrValues;
}
: let
inherit (pkgs) vimPlugins;
inherit (lib.strings) isString;
inherit (lib.lists) filter map;
cfg = config.vim;
# alias to the internal configuration
vimOptions = config.vim;
noBuildPlug = {pname, ...} @ attrs: let
src = inputs."plugin-${attrs.pname}";
in
{
version = src.shortRev or src.shortDirtyRev or "dirty";
outPath = src;
passthru.vimPlugin = false;
}
// attrs;
# build a vim plugin with the given name and arguments
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
# instead
buildPlug = attrs: let
src = inputs."plugin-${attrs.pname}";
in
pkgs.vimUtils.buildVimPlugin (
{
version = src.shortRev or src.shortDirtyRev or "dirty";
inherit src;
}
// attrs
);
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
pluginBuilders = {
nvim-treesitter = buildTreesitterPlug vimOptions.treesitter.grammars;
flutter-tools-patched = buildPlug {
pname = "flutter-tools";
patches = [./patches/flutter-tools.patch];
};
};
buildConfigPlugins = plugins:
map (
plug:
if (isString plug)
then pluginBuilders.${plug} or (noBuildPlug {pname = plug;})
else plug
) (filter (f: f != null) plugins);
# built (or "normalized") plugins that are modified
builtStartPlugins = buildConfigPlugins vimOptions.startPlugins;
builtOptPlugins = map (package: package // {optional = true;}) (buildConfigPlugins vimOptions.optPlugins);
# additional Lua and Python3 packages, mapped to their respective functions
# to conform to the format mnw expects. end user should
# only ever need to pass a list of packages, which are modified
# here
extraLuaPackages = ps: map (x: ps.${x}) vimOptions.luaPackages;
extraPython3Packages = ps: map (x: ps.${x}) vimOptions.python3Packages;
# Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to
# generate a wrapped Neovim package.
neovim-wrapped = inputs.mnw.lib.wrap pkgs {
neovim = vimOptions.package;
plugins = builtStartPlugins ++ builtOptPlugins;
appName = "nvf";
extraBinPath = vimOptions.extraPackages;
initLua = vimOptions.builtLuaConfigRC;
luaFiles = vimOptions.extraLuaFiles;
inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3;
inherit extraLuaPackages extraPython3Packages;
};
dummyInit = pkgs.writeText "nvf-init.lua" vimOptions.builtLuaConfigRC;
# Additional helper scripts for printing and displaying nvf configuration
# in your commandline.
printConfig = pkgs.writers.writeDashBin "nvf-print-config" "cat ${dummyInit}";
printConfigPath = pkgs.writers.writeDashBin "nvf-print-config-path" "echo -n ${dummyInit}";
# Expose wrapped neovim-package for userspace
# or module consumption.
neovim = pkgs.symlinkJoin {
name = "nvf-with-helpers";
paths = [neovim-wrapped printConfig printConfigPath];
postBuild = "echo Helpers added";
# Allow evaluating vimOptions, i.e., config.vim from the packages' passthru
# attribute. For example, packages.x86_64-linux.neovim.passthru.neovimConfig
# will return the configuration in full.
passthru.neovimConfig = vimOptions;
meta =
neovim-wrapped.meta
// {
description = "Wrapped Neovim package with helper scripts to print the config (path)";
};
};
in {
config = {
vim.startPlugins = map (x: x.package) (attrValues cfg.extraPlugins);
config.vim.build = {
finalPackage = neovim;
};
}

View file

@ -1,6 +1,6 @@
{
imports = [
./config.nix
./options.nix
./config.nix
];
}

View file

@ -1,144 +1,12 @@
{
pkgs,
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.types) package bool str listOf attrsOf;
inherit (lib.nvim.types) pluginsOpt extraPluginType;
{lib, ...}: let
inherit (lib.types) package;
inherit (lib.options) mkOption;
in {
options.vim = {
package = mkOption {
options.vim.build = {
finalPackage = mkOption {
type = package;
default = pkgs.neovim-unwrapped;
description = ''
The neovim package to use for the wrapper. This
corresponds to the package that will be wrapped
with your plugins and settings.
::: {.warning}
You will need to use an unwrapped package for this
option to work as intended. Using an already wrapped
package here may yield undesirable results.
:::
'';
};
viAlias = mkOption {
type = bool;
default = true;
description = "Enable the `vi` alias for `nvim`";
};
vimAlias = mkOption {
type = bool;
default = true;
description = "Enable the `vim` alias for `nvim`";
};
startPlugins = pluginsOpt {
default = ["plenary-nvim"];
example = ''
[pkgs.vimPlugins.telescope-nvim]
'';
description = ''
List of plugins to load on startup. This is used
internally to add plugins to Neovim's runtime.
To add additional plugins to your configuration, consider
using the [{option}`vim.extraPlugins`](#opt-vim.extraPlugins)
option.
'';
};
optPlugins = pluginsOpt {
default = [];
example = ''
[pkgs.vimPlugins.vim-ghost]
'';
description = ''
List of plugins to optionally load on startup.
This option has the same type definition as {option}`vim.startPlugins`
and plugins in this list are appended to {option}`vim.startPlugins` by
the wrapper during the build process.
To avoid overriding packages and dependencies provided by startPlugins, you
are recommended to use this option or {option}`vim.extraPlugins` option.
'';
};
extraPlugins = mkOption {
type = attrsOf extraPluginType;
default = {};
description = ''
A list of plugins and their configurations that will be
set up after builtin plugins.
This option takes a special type that allows you to order
your custom plugins using nvf's modified DAG library.
'';
example = literalMD ''
```nix
with pkgs.vimPlugins; {
aerial = {
package = aerial-nvim;
setup = "require('aerial').setup {}";
};
harpoon = {
package = harpoon;
setup = "require('harpoon').setup {}";
after = ["aerial"]; # place harpoon configuration after aerial
};
}
```
'';
};
extraPackages = mkOption {
type = listOf package;
default = [];
example = ''[pkgs.fzf pkgs.ripgrep]'';
description = ''
List of additional packages to make available to the Neovim
wrapper.
'';
};
# this defaults to `true` in the wrapper
# and since we pass this value to the wrapper
# with an inherit, it should be `true` here as well
withRuby =
mkEnableOption ''
Ruby support in the Neovim wrapper.
''
// {
default = true;
};
withNodeJs = mkEnableOption ''
NodeJs support in the Neovim wrapper
'';
luaPackages = mkOption {
type = listOf str;
default = [];
example = ''["magick" "serpent"]'';
description = "List of lua packages to install";
};
withPython3 = mkEnableOption ''
Python3 support in the Neovim wrapper
'';
python3Packages = mkOption {
type = listOf str;
default = [];
example = ''["pynvim"]'';
description = "List of python packages to install";
readOnly = true;
description = "final output package";
};
};
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib.attrsets) attrValues;
cfg = config.vim;
in {
config = {
vim.startPlugins = map (x: x.package) (attrValues cfg.extraPlugins);
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./options.nix
];
}

View file

@ -0,0 +1,144 @@
{
pkgs,
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.types) package bool str listOf attrsOf;
inherit (lib.nvim.types) pluginsOpt extraPluginType;
in {
options.vim = {
package = mkOption {
type = package;
default = pkgs.neovim-unwrapped;
description = ''
The neovim package to use for the wrapper. This
corresponds to the package that will be wrapped
with your plugins and settings.
::: {.warning}
You will need to use an unwrapped package for this
option to work as intended. Using an already wrapped
package here may yield undesirable results.
:::
'';
};
viAlias = mkOption {
type = bool;
default = true;
description = "Enable the `vi` alias for `nvim`";
};
vimAlias = mkOption {
type = bool;
default = true;
description = "Enable the `vim` alias for `nvim`";
};
startPlugins = pluginsOpt {
default = ["plenary-nvim"];
example = ''
[pkgs.vimPlugins.telescope-nvim]
'';
description = ''
List of plugins to load on startup. This is used
internally to add plugins to Neovim's runtime.
To add additional plugins to your configuration, consider
using the [{option}`vim.extraPlugins`](#opt-vim.extraPlugins)
option.
'';
};
optPlugins = pluginsOpt {
default = [];
example = ''
[pkgs.vimPlugins.vim-ghost]
'';
description = ''
List of plugins to optionally load on startup.
This option has the same type definition as {option}`vim.startPlugins`
and plugins in this list are appended to {option}`vim.startPlugins` by
the wrapper during the build process.
To avoid overriding packages and dependencies provided by startPlugins, you
are recommended to use this option or {option}`vim.extraPlugins` option.
'';
};
extraPlugins = mkOption {
type = attrsOf extraPluginType;
default = {};
description = ''
A list of plugins and their configurations that will be
set up after builtin plugins.
This option takes a special type that allows you to order
your custom plugins using nvf's modified DAG library.
'';
example = literalMD ''
```nix
with pkgs.vimPlugins; {
aerial = {
package = aerial-nvim;
setup = "require('aerial').setup {}";
};
harpoon = {
package = harpoon;
setup = "require('harpoon').setup {}";
after = ["aerial"]; # place harpoon configuration after aerial
};
}
```
'';
};
extraPackages = mkOption {
type = listOf package;
default = [];
example = ''[pkgs.fzf pkgs.ripgrep]'';
description = ''
List of additional packages to make available to the Neovim
wrapper.
'';
};
# this defaults to `true` in the wrapper
# and since we pass this value to the wrapper
# with an inherit, it should be `true` here as well
withRuby =
mkEnableOption ''
Ruby support in the Neovim wrapper.
''
// {
default = true;
};
withNodeJs = mkEnableOption ''
NodeJs support in the Neovim wrapper
'';
luaPackages = mkOption {
type = listOf str;
default = [];
example = ''["magick" "serpent"]'';
description = "List of lua packages to install";
};
withPython3 = mkEnableOption ''
Python3 support in the Neovim wrapper
'';
python3Packages = mkOption {
type = listOf str;
default = [];
example = ''["pynvim"]'';
description = "List of python packages to install";
};
};
}