Compare commits

..

1 commit

Author SHA1 Message Date
Ching Pei Yang
24aa928785
Merge 2cec6178ab into 12fd9d69dc 2024-05-07 01:08:41 -04:00
32 changed files with 791 additions and 617 deletions

View file

@ -19,6 +19,7 @@ jobs:
package:
- default
- nix
- tidal
- maximal
steps:
- uses: easimon/maximize-build-space@v10

View file

@ -15,6 +15,10 @@ inputs: let
configuration.imports = modules;
};
tidalConfig = {
config.vim.languages.tidal.enable = true;
};
mainConfig = isMaximal: {
config.vim = {
viAlias = true;
@ -54,16 +58,7 @@ inputs: let
enableTreesitter = true;
enableExtraDiagnostics = true;
# Nim LSP is broken on Darwin and therefore
# should be disabled by default. Users may still enable
# `vim.languages.vim` to enable it, this does not restrict
# that.
# See: <https://github.com/PMunch/nimlsp/issues/178#issue-2128106096>
nim.enable = false;
nix.enable = true;
markdown.enable = isMaximal;
html.enable = isMaximal;
css.enable = isMaximal;
sql.enable = isMaximal;
@ -71,11 +66,13 @@ inputs: let
ts.enable = isMaximal;
svelte.enable = isMaximal;
go.enable = isMaximal;
elixir.enable = isMaximal;
zig.enable = isMaximal;
python.enable = isMaximal;
dart.enable = isMaximal;
elixir.enable = isMaximal;
bash.enable = isMaximal;
terraform.enable = isMaximal;
nim.enable = false;
tailwind.enable = isMaximal;
typst.enable = isMaximal;
clang = {
@ -85,14 +82,14 @@ inputs: let
rust = {
enable = isMaximal;
crates.enable = isMaximal;
crates.enable = true;
};
};
visuals = {
enable = true;
nvimWebDevicons.enable = true;
scrollBar.enable = isMaximal;
scrollBar.enable = true;
smoothScroll.enable = true;
cellularAutomaton.enable = false;
fidget-nvim.enable = true;
@ -255,5 +252,5 @@ inputs: let
};
};
in {
inherit neovimConfiguration mainConfig;
inherit neovimConfiguration mainConfig tidalConfig;
}

View file

@ -5,6 +5,7 @@ Below are the commands you may run to try out different configurations provided
configurations are provided:
- Nix
- Tidal
- Maximal
You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed.
@ -21,6 +22,7 @@ once you garbage collect.
```console
$ nix run github:notashelf/nvf#nix
$ nix run github:notashelf/nvf#tidal
$ nix run github:notashelf/nvf#maximal
```
@ -31,6 +33,10 @@ $ nix run github:notashelf/nvf#maximal
`Nix` configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
By running `nix run .#`, which is the default package, you will build Neovim with this config.
#### Tidal {#sec-configs-tidal}
Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.
#### Maximal {#sec-configs-maximal}
`Maximal` is the ultimate configuration that will enable support for more commonly used language as well as additional

View file

@ -6,32 +6,15 @@ Release notes for release 0.7
[ItsSorae](https://github.com/ItsSorae):
- Added support for [typst](https://typst.app/) under `vim.languages.typst` This
will enable the `typst-lsp` language server, and the `typstfmt` formatter
- Added support for [typst](https://typst.app/) under `vim.languages.typst`.
This will enable the `typst-lsp` language server, and the `typstfmt` formatter.
[frothymarrow](https://github.com/frothymarrow):
- Modified type for
[](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) from
`anything` to a `submodule` for better type checking.
- Modified type for [](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides)
from `anything` to a `submodule` for better type checking.
- Fix null `vim.lsp.mappings` generating an error and not being filtered out.
[horriblename](https://github.com/horriblename):
- Fix broken treesitter-context keybinds in visual mode
[NotAShelf](https://github.com/notashelf)
- Add `deno fmt` as the default Markdown formatter. This will be enabled
automatically if you have autoformatting enabled, but can be disabled manually
if you choose to.
- Add `vim.extraLuaFiles` for optionally sourcing additional lua files in your
configuration.
- Refactor `programs.languages.elixir` to use lspconfig and none-ls for LSP and
formatter setups respectively. Diagnostics support is considered, and may be
added once the [credo](https://github.com/rrrene/credo) linter has been added
to nixpkgs. A pull request is currently open.
- Remove vim-tidal and friends

View file

@ -1,5 +1,22 @@
{
"nodes": {
"dirt-samples-src": {
"flake": false,
"locked": {
"lastModified": 1667426233,
"narHash": "sha256-Zl2bi9QofcrhU63eMtg+R6lhV9ExQS/0XNTJ+oq65Uo=",
"owner": "tidalcycles",
"repo": "dirt-samples",
"rev": "92f2145e661b397e62ca0ff3965819e7c7db0dad",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"ref": "master",
"repo": "dirt-samples",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -21,11 +38,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1714641030,
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
@ -99,11 +116,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1714571717,
"narHash": "sha256-o4tqlTzi9kcVub167kTGXgCac9jM3kW4+v9MH/ue4Hk=",
"lastModified": 1704611696,
"narHash": "sha256-4ZCgV5oHdEc3q+XaIzy//gh20uC/aSuAtMU9bsfgLZk=",
"owner": "oxalica",
"repo": "nil",
"rev": "2f3ed6348bbf1440fcd1ab0411271497a0fbbfa4",
"rev": "059d33a24bb76d2048740bcce936362bf54b5bc9",
"type": "github"
},
"original": {
@ -114,11 +131,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1715087517,
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
"lastModified": 1713895582,
"narHash": "sha256-cfh1hi+6muQMbi9acOlju3V1gl8BEaZBXBR9jQfQi4U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
"rev": "572af610f6151fd41c212f897c71f7056e3fb518",
"type": "github"
},
"original": {
@ -130,14 +147,20 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1714640452,
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
@ -157,6 +180,22 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1693844670,
"narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3c15feef7770eb5500a4b8792623e2d6f598c9c1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1702350026,
"narHash": "sha256-A+GNZFZdfl4JdDphYKBJ5Ef1HOiFsP18vQe9mqjmUis=",
@ -223,11 +262,11 @@
"plugin-catppuccin": {
"flake": false,
"locked": {
"lastModified": 1715167632,
"narHash": "sha256-aRrhVHQSCyo1Ti1j8ogWJ8e0eJWiTw5+abIpyUxky/M=",
"lastModified": 1713105352,
"narHash": "sha256-yTVou/WArEWygBBs2NFPI9Dm9iSGfwVftKFbOAGl8tk=",
"owner": "catppuccin",
"repo": "nvim",
"rev": "d97387aea8264f484bb5d5e74f2182a06c83e0d8",
"rev": "a1439ad7c584efb3d0ce14ccb835967f030450fe",
"type": "github"
},
"original": {
@ -239,11 +278,11 @@
"plugin-ccc": {
"flake": false,
"locked": {
"lastModified": 1714299582,
"narHash": "sha256-QRq9hQF5vLnOTzQGbOWC2ykMdMsQDlDlb6XC17dJG7Q=",
"lastModified": 1712580766,
"narHash": "sha256-G96++Bmuklb3eDfmyKPKFUDHuopTMmIFa/ILdf11N/I=",
"owner": "uga-rosa",
"repo": "ccc.nvim",
"rev": "f388f1981d222967c741fe9927edf9ba5fa3bcbe",
"rev": "1283eef5494c092a047baa34ed3e667f3cb2715e",
"type": "github"
},
"original": {
@ -303,11 +342,11 @@
"plugin-cinnamon-nvim": {
"flake": false,
"locked": {
"lastModified": 1714107684,
"narHash": "sha256-cMP9WRZzevxaWgpILyDh1JwNukm3Jl3JKJYPT2HnFns=",
"lastModified": 1711005384,
"narHash": "sha256-LNikkGldBpUsfyH8ThtX7RS1p/z3JzSPonT9qUU84jw=",
"owner": "declancm",
"repo": "cinnamon.nvim",
"rev": "a011e84b624cd7b609ea928237505d31b987748a",
"rev": "559fe02fae00ffd78377e9c242b2faa25a428592",
"type": "github"
},
"original": {
@ -463,11 +502,11 @@
"plugin-crates-nvim": {
"flake": false,
"locked": {
"lastModified": 1715069896,
"narHash": "sha256-AhjnPo3SM7o7foj5ppv0CW+jfJe6ACerq4YFgJfY3/8=",
"lastModified": 1713995074,
"narHash": "sha256-09+mBhh5hAXENPzrvwNNQEyM7ZtuPYAWrtAG/pzBOV8=",
"owner": "Saecki",
"repo": "crates.nvim",
"rev": "7d8541ec0e3b30ac2c43864d3ee13a632e1231ed",
"rev": "f00e11e8282b94f2a2e938d32712c99f0e0bdeb4",
"type": "github"
},
"original": {
@ -479,11 +518,11 @@
"plugin-dashboard-nvim": {
"flake": false,
"locked": {
"lastModified": 1714906999,
"narHash": "sha256-euIAtegnJTH2hpFP0OAuvl7VpEV0Xu91h+w9p1uC3+0=",
"lastModified": 1713420371,
"narHash": "sha256-zcWBgDM409n6rmb06FqVXbC+HU9HJN0+ADoTJDWHvbA=",
"owner": "glepnir",
"repo": "dashboard-nvim",
"rev": "a0a78099658c7d4be3714f657b18ca8285d5d106",
"rev": "6d06924b562de6f0bb136edf1bf549afbf6b7d00",
"type": "github"
},
"original": {
@ -540,14 +579,30 @@
"type": "github"
}
},
"plugin-elixir-ls": {
"flake": false,
"locked": {
"lastModified": 1713724318,
"narHash": "sha256-1kLMxznNRRJ7M10zkuWexA/sPFaN449M0SKUjLrnc8c=",
"owner": "elixir-lsp",
"repo": "elixir-ls",
"rev": "8486de473a219dcdb72408702f8d56d0227c7366",
"type": "github"
},
"original": {
"owner": "elixir-lsp",
"repo": "elixir-ls",
"type": "github"
}
},
"plugin-elixir-tools": {
"flake": false,
"locked": {
"lastModified": 1714657398,
"narHash": "sha256-U6db1n/RIpT7Dd54e9iI/PjO1BhDpMyNPfaph+dUk7k=",
"lastModified": 1713617654,
"narHash": "sha256-pJgtW51FLs+Yr+tlQckRmGkRnSUQNI3fEROn3D51mMs=",
"owner": "elixir-tools",
"repo": "elixir-tools.nvim",
"rev": "51eddb03a7a8c9f00d6415b356a4d3b75d8e75b6",
"rev": "3c4f8344a341818417b3d75c04eb96d894cb4640",
"type": "github"
},
"original": {
@ -591,11 +646,11 @@
"plugin-gesture-nvim": {
"flake": false,
"locked": {
"lastModified": 1715081943,
"narHash": "sha256-h6alx5TjskXYQ3H9fFfC4QyxsGbpjQkoZFVvLi1sgFI=",
"lastModified": 1713872849,
"narHash": "sha256-npryXJ92l65gOGltTd3jE3fdhiEgqbxCdK5w/C/BQV0=",
"owner": "notomo",
"repo": "gesture.nvim",
"rev": "591b350bfc87932a748f4838ad724eea6fb073e0",
"rev": "47175ed2741ba46fe7f14d6ee37ebbc5b9614c5a",
"type": "github"
},
"original": {
@ -607,11 +662,11 @@
"plugin-gitsigns-nvim": {
"flake": false,
"locked": {
"lastModified": 1715007445,
"narHash": "sha256-v21qTJfiv57vSUDGCJ4wM+L0Ixwh2b3pkoESFAHBrDM=",
"lastModified": 1713620636,
"narHash": "sha256-UK3DyvrQ0kLm9wrMQ6tLDoDunoThbY/Yfjn+eCZpuMw=",
"owner": "lewis6991",
"repo": "gitsigns.nvim",
"rev": "805610a9393fa231f2c2b49cb521bfa413fadb3d",
"rev": "035da036e68e509ed158414416c827d022d914bd",
"type": "github"
},
"original": {
@ -639,11 +694,11 @@
"plugin-gruvbox": {
"flake": false,
"locked": {
"lastModified": 1715085640,
"narHash": "sha256-2Ad5I+peKCD2BCm4m/QIjqpW08qQvrY+o3bK5UEy1x8=",
"lastModified": 1706538659,
"narHash": "sha256-jWnrRy/PT7D0UcPGL+XTbKHWvS0ixvbyqPtTzG9HY84=",
"owner": "ellisonleao",
"repo": "gruvbox.nvim",
"rev": "c442515506caa166118e157980f62a9ac24fa8c3",
"rev": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f",
"type": "github"
},
"original": {
@ -655,11 +710,11 @@
"plugin-highlight-undo": {
"flake": false,
"locked": {
"lastModified": 1714982601,
"narHash": "sha256-yGw1SxcUmGQxqKhMb2SJAai07g+rOpEJy2CqIX2h9dM=",
"lastModified": 1713721901,
"narHash": "sha256-5zYUpfSR56gCufR+Y18qo8ZpMRg8N3ejkRZNJswJ4wQ=",
"owner": "tzachar",
"repo": "highlight-undo.nvim",
"rev": "1ea1c79372d7d93c88fd97543880927b7635e3d2",
"rev": "a0dbc6afa19b438ca5a6f54bc7f1a10399f21a15",
"type": "github"
},
"original": {
@ -703,11 +758,11 @@
"plugin-image-nvim": {
"flake": false,
"locked": {
"lastModified": 1714464812,
"narHash": "sha256-UfJzROXnjaiF+kIaBYAt5GSL107vT5NrpXj+Gh535Yk=",
"lastModified": 1713989303,
"narHash": "sha256-UBrusfIYWURI1Auo3XayswA8NXgZhqwazg6wmmgWygA=",
"owner": "3rd",
"repo": "image.nvim",
"rev": "604692f493519128c58893c28273d4247bc71a4d",
"rev": "2d4b479c59fd70cc26f63d48b5cd76a44dda8873",
"type": "github"
},
"original": {
@ -735,11 +790,11 @@
"plugin-leap-nvim": {
"flake": false,
"locked": {
"lastModified": 1714857300,
"narHash": "sha256-RodnRoiQTH/+XoPk30neLiYIptPJnCvL94keIQXjq2g=",
"lastModified": 1712927908,
"narHash": "sha256-sSnofCInXuqaDEawT4vN1WdYl1cjK++BjSFnR1wXjr4=",
"owner": "ggandor",
"repo": "leap.nvim",
"rev": "f1f19fc268b406b00b50091f51f16d9634fbe449",
"rev": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b",
"type": "github"
},
"original": {
@ -911,11 +966,11 @@
"plugin-noice-nvim": {
"flake": false,
"locked": {
"lastModified": 1714737209,
"narHash": "sha256-jR9tX6AhY+DXPqGXqGqCkG/sL9+mLxpwOqfwjHHN0Ac=",
"lastModified": 1711471279,
"narHash": "sha256-y6gHNkWVsIuwBf7MblCTKTZSqjGDxqeFeQZWexzwk94=",
"owner": "folke",
"repo": "noice.nvim",
"rev": "f4decbc7a80229ccc9f86026b74bdcf0c39e38a7",
"rev": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12",
"type": "github"
},
"original": {
@ -944,11 +999,11 @@
"plugin-nui-nvim": {
"flake": false,
"locked": {
"lastModified": 1714991123,
"narHash": "sha256-W5w8mWjZhf8rhFYDJX4vPAszxKX6uLgT7+8xg3dY4Ok=",
"lastModified": 1710740032,
"narHash": "sha256-Zr5CNx6BIM6naCXW8YBc/Oj1qOtWV/3tuMoaaZjoSZA=",
"owner": "MunifTanjim",
"repo": "nui.nvim",
"rev": "a3597dc88b53489d3fddbddbbd13787355253bb0",
"rev": "cbd2668414331c10039278f558630ed19b93e69b",
"type": "github"
},
"original": {
@ -960,11 +1015,11 @@
"plugin-nvim-autopairs": {
"flake": false,
"locked": {
"lastModified": 1714895218,
"narHash": "sha256-LMRt1XEoeHB3blfjI0SsQr4goMUmwjoMGS2LcR3ye20=",
"lastModified": 1712441622,
"narHash": "sha256-ta+0jw7P0ESThP8q2c+CD+nCzPMyHH2Cy3kjjysH0TE=",
"owner": "windwp",
"repo": "nvim-autopairs",
"rev": "14e97371b2aab6ee70054c1070a123dfaa3e217e",
"rev": "4f41e5940bc0443fdbe5f995e2a596847215cd2a",
"type": "github"
},
"original": {
@ -992,11 +1047,11 @@
"plugin-nvim-cmp": {
"flake": false,
"locked": {
"lastModified": 1715160812,
"narHash": "sha256-/zTOFwCSBETBgkILpP8h82ZjN7LiMV0Uk5d2TEnQVU4=",
"lastModified": 1713837627,
"narHash": "sha256-rz+JMd/hsUEDNVan2sCuEGtbsOVi6oRmPtps+7qSXQE=",
"owner": "hrsh7th",
"repo": "nvim-cmp",
"rev": "cd2cf0c124d3de577fb5449746568ee8e601afc8",
"rev": "8f3c541407e691af6163e2447f3af1bd6e17f9a3",
"type": "github"
},
"original": {
@ -1072,11 +1127,11 @@
"plugin-nvim-dap-ui": {
"flake": false,
"locked": {
"lastModified": 1714314733,
"narHash": "sha256-26g4dlxzTGaR5OrXpPo4A2erM/eSkgedb0Bl2pK362M=",
"lastModified": 1710867604,
"narHash": "sha256-KAwCt8E3lC0fzXQ9GpPsdb9wdWC6G2P4C/YFQFY9AAM=",
"owner": "rcarriga",
"repo": "nvim-dap-ui",
"rev": "5934302d63d1ede12c0b22b6f23518bb183fc972",
"rev": "edfa93f60b189e5952c016eee262d0685d838450",
"type": "github"
},
"original": {
@ -1120,11 +1175,11 @@
"plugin-nvim-lspconfig": {
"flake": false,
"locked": {
"lastModified": 1715152811,
"narHash": "sha256-LMzLDbkKVmRRhwaUaroCRGUsKe/fwzgwV1gbvr/t6WQ=",
"lastModified": 1713908193,
"narHash": "sha256-VdIoInJj2u49WHN4+WX0kNHdbXgh0AqIPU+OAiUaBck=",
"owner": "neovim",
"repo": "nvim-lspconfig",
"rev": "a3d9395455f2b2e3b50a0b0f37b8b4c23683f44a",
"rev": "cfa386fc4027e847156ee16141ea1f4c0bc2f0a4",
"type": "github"
},
"original": {
@ -1184,11 +1239,11 @@
"plugin-nvim-nio": {
"flake": false,
"locked": {
"lastModified": 1714664267,
"narHash": "sha256-VfoJOXXtMhalFcnfhVzweq7TVmB8WjRP+Z5Z5Z24Pzc=",
"lastModified": 1712221544,
"narHash": "sha256-ZRYclqsgAvlRBwb59XHlqVat7CxUJTH1rD6QLwh1ang=",
"owner": "nvim-neotest",
"repo": "nvim-nio",
"rev": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90",
"rev": "5800f585def265d52f1d8848133217c800bcb25d",
"type": "github"
},
"original": {
@ -1216,11 +1271,11 @@
"plugin-nvim-session-manager": {
"flake": false,
"locked": {
"lastModified": 1714905094,
"narHash": "sha256-VduhmnnRPIdi6GZ+TZUnZfpY4Lt8z5JBTKgl7oobtdY=",
"lastModified": 1708284146,
"narHash": "sha256-+TDWY8mprJfUp9ZFKbz83to7XW8iiovja22jHms+N1A=",
"owner": "Shatur",
"repo": "neovim-session-manager",
"rev": "892c55f7256fe170301a1fdd21752982c75c3507",
"rev": "d8e1ba3bbcf3fdc6a887bcfbd94c48ae4707b457",
"type": "github"
},
"original": {
@ -1232,11 +1287,11 @@
"plugin-nvim-surround": {
"flake": false,
"locked": {
"lastModified": 1714506343,
"narHash": "sha256-PJdkmTzuRldPTdaoerdddOL0/+V/KyNSzFBBee6P4kU=",
"lastModified": 1712807644,
"narHash": "sha256-gXWSCAJhOJKzTFi6QiDqDWPNgBtG5KgyF2t4gposqSY=",
"owner": "kylechui",
"repo": "nvim-surround",
"rev": "6d0dc3dbb557bcc6a024969da461df4ba803fc48",
"rev": "a4e30d33add8a9743b4f518b3a788b3c8e5def71",
"type": "github"
},
"original": {
@ -1248,11 +1303,11 @@
"plugin-nvim-tree-lua": {
"flake": false,
"locked": {
"lastModified": 1714794673,
"narHash": "sha256-rY4FbuqBM4zOUkaA3QBc+UrpfTha8uGtp+lIzrYK+cg=",
"lastModified": 1713946472,
"narHash": "sha256-iD8c/dXt/UcTYDK8/zkTkFW/1Ial8ulCUWojjyXpG8k=",
"owner": "nvim-tree",
"repo": "nvim-tree.lua",
"rev": "64f61e4c913047a045ff90bd188dd3b54ee443cf",
"rev": "62008e5cf2e8745c9d23bb599ef642963131057e",
"type": "github"
},
"original": {
@ -1264,11 +1319,11 @@
"plugin-nvim-treesitter-context": {
"flake": false,
"locked": {
"lastModified": 1714689136,
"narHash": "sha256-gHbLt0ApyPPQU8Q+lde0Zv8XBR6pESKzvIzIXHkd5eI=",
"lastModified": 1713984790,
"narHash": "sha256-QAudKglQGDRJKrsEcMSjbrxTgQRXO60ZcfOvEnPLUoE=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "2650e6431f7daba5d9c2c64134fa5eb2312eb3d7",
"rev": "4fe0a54e86859744968e1a5c7867b49c86855774",
"type": "github"
},
"original": {
@ -1296,11 +1351,11 @@
"plugin-nvim-web-devicons": {
"flake": false,
"locked": {
"lastModified": 1715028064,
"narHash": "sha256-DSUTxUFCesXuaJjrDNvurILUt1IrO5MI5ukbZ8D87zQ=",
"lastModified": 1713675782,
"narHash": "sha256-AW2W6H7OTv52hfZCcYQc5UjFArBWKLeVclrwMt13HOM=",
"owner": "nvim-tree",
"repo": "nvim-web-devicons",
"rev": "5b9067899ee6a2538891573500e8fd6ff008440f",
"rev": "beb6367ab8496c9e43f22e0252735fdadae1872d",
"type": "github"
},
"original": {
@ -1312,11 +1367,11 @@
"plugin-obsidian-nvim": {
"flake": false,
"locked": {
"lastModified": 1715192893,
"narHash": "sha256-lGnEEFp/MU5sciq6bH5YKAiFx7kf9tTYqE+eB8zvf7A=",
"lastModified": 1713538455,
"narHash": "sha256-nIAaQa0DBYBQyfTEJi3Lzqs7QJqyw0Cemq6Hm704K60=",
"owner": "epwalsh",
"repo": "obsidian.nvim",
"rev": "2e1f03416583232899dc1b6e27673da5e705abef",
"rev": "ec0f44e1921d2701bd99a542031d280f1e3930b5",
"type": "github"
},
"original": {
@ -1344,11 +1399,11 @@
"plugin-orgmode-nvim": {
"flake": false,
"locked": {
"lastModified": 1715114055,
"narHash": "sha256-SmofuYt4fLhtl5qedYlmCRgOmZaw3nmlnMg0OMzyKnM=",
"lastModified": 1713539113,
"narHash": "sha256-0Ayu2kVpnsxu/ER0nx+t7nyU9oNN8URLrGQtAKKb7Ls=",
"owner": "nvim-orgmode",
"repo": "orgmode",
"rev": "cda615fa7c8607bfb7aaf7d2c9424dd5969f2625",
"rev": "389e91f6f935aa845bc0cd13dd80f75431c34751",
"type": "github"
},
"original": {
@ -1376,11 +1431,11 @@
"plugin-plenary-nvim": {
"flake": false,
"locked": {
"lastModified": 1714083960,
"narHash": "sha256-vy0MXEoSM4rvYpfwbc2PnilvMOA30Urv0FAxjXuvqQ8=",
"lastModified": 1713788468,
"narHash": "sha256-orGs1npIGIk7MUYadatYrcEXygK7JTj6OqQwy2TLDn0=",
"owner": "nvim-lua",
"repo": "plenary.nvim",
"rev": "08e301982b9a057110ede7a735dd1b5285eb341f",
"rev": "5129a3693c482fcbc5ab99a7706ffc4360b995a0",
"type": "github"
},
"original": {
@ -1520,11 +1575,11 @@
"plugin-telescope": {
"flake": false,
"locked": {
"lastModified": 1714700089,
"narHash": "sha256-SoEetPE7f7Y0kUa4+7dH+EOs/0WBsMDxeOkbVNuoSjE=",
"lastModified": 1713665692,
"narHash": "sha256-wlRiwT1TCtwPXnIwnzqa6ZABUzJYn+lSRyvkqe6Dbsw=",
"owner": "nvim-telescope",
"repo": "telescope.nvim",
"rev": "fac83a556e7b710dc31433dec727361ca062dbe9",
"rev": "7d1698f3d88b448e0639974248cc17f49b7b8acf",
"type": "github"
},
"original": {
@ -1616,11 +1671,11 @@
"plugin-vim-fugitive": {
"flake": false,
"locked": {
"lastModified": 1714601825,
"narHash": "sha256-0ujueJ226zEmjkFwodSukO1Zu5gMvTmx/dCtT5VBhek=",
"lastModified": 1712554826,
"narHash": "sha256-pmY1EQbupKvsqok9O5omkOWi0BEZ8df7HL0F7ubdY9Q=",
"owner": "tpope",
"repo": "vim-fugitive",
"rev": "ce882460cf3db12e99f8bf579cbf99e331f6dd4f",
"rev": "dac8e5c2d85926df92672bf2afb4fc48656d96c7",
"type": "github"
},
"original": {
@ -1774,6 +1829,7 @@
"plugin-diffview-nvim": "plugin-diffview-nvim",
"plugin-dracula": "plugin-dracula",
"plugin-dressing-nvim": "plugin-dressing-nvim",
"plugin-elixir-ls": "plugin-elixir-ls",
"plugin-elixir-tools": "plugin-elixir-tools",
"plugin-fidget-nvim": "plugin-fidget-nvim",
"plugin-flutter-tools": "plugin-flutter-tools",
@ -1850,6 +1906,7 @@
"plugin-which-key": "plugin-which-key",
"rnix-lsp": "rnix-lsp",
"systems": "systems_2",
"tidalcycles": "tidalcycles",
"zig": "zig"
}
},
@ -1865,11 +1922,11 @@
]
},
"locked": {
"lastModified": 1714529851,
"narHash": "sha256-YMKJW880f7LHXVRzu93xa6Ek+QLECIu0IRQbXbzZe38=",
"lastModified": 1704593904,
"narHash": "sha256-nDoXZDTRdgF3b4n3m011y99nYFewvOl9UpzFvP8Rb3c=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9ca720fdcf7865385ae3b93ecdf65f1a64cb475e",
"rev": "c36fd70a99decfa6e110c86f296a97613034a680",
"type": "github"
},
"original": {
@ -1878,6 +1935,23 @@
"type": "github"
}
},
"superdirt-src": {
"flake": false,
"locked": {
"lastModified": 1611740180,
"narHash": "sha256-GtnqZeMFqFkVhgx2Exu0wY687cHa7mNnVCgjQd6fiIA=",
"owner": "musikinformatik",
"repo": "superdirt",
"rev": "7abb62e89649daa1232b9cbd6427241868abd30e",
"type": "github"
},
"original": {
"owner": "musikinformatik",
"ref": "master",
"repo": "superdirt",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -1908,6 +1982,62 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tidal-src": {
"flake": false,
"locked": {
"lastModified": 1654350756,
"narHash": "sha256-tONM5SYYBca0orTLH1EUOilSC1FCluWrFt8AetUx+YQ=",
"owner": "tidalcycles",
"repo": "tidal",
"rev": "fda9c1ecb3722698935245e5409ef8ccdfca16c8",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"ref": "main",
"repo": "tidal",
"type": "github"
}
},
"tidalcycles": {
"inputs": {
"dirt-samples-src": "dirt-samples-src",
"nixpkgs": "nixpkgs_3",
"superdirt-src": "superdirt-src",
"tidal-src": "tidal-src",
"utils": "utils_2",
"vim-tidal-src": "vim-tidal-src",
"vowel-src": "vowel-src"
},
"locked": {
"lastModified": 1694087816,
"narHash": "sha256-GMV5ONQhLwa6xRYhZkmwc2W2jbjAfHfB/OR9vR0+PFA=",
"owner": "mitchmindtree",
"repo": "tidalcycles.nix",
"rev": "1b1c4df5303e07930d23e8361ab8253ebec0c7bb",
"type": "github"
},
"original": {
"owner": "mitchmindtree",
"repo": "tidalcycles.nix",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1656928814,
@ -1923,18 +2053,69 @@
"type": "github"
}
},
"utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1692799911,
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"vim-tidal-src": {
"flake": false,
"locked": {
"lastModified": 1685703852,
"narHash": "sha256-8gyk17YLeKpLpz3LRtxiwbpsIbZka9bb63nK5/9IUoA=",
"owner": "tidalcycles",
"repo": "vim-tidal",
"rev": "e440fe5bdfe07f805e21e6872099685d38e8b761",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"repo": "vim-tidal",
"type": "github"
}
},
"vowel-src": {
"flake": false,
"locked": {
"lastModified": 1641306144,
"narHash": "sha256-zfF6cvAGDNYWYsE8dOIo38b+dIymd17Pexg0HiPFbxM=",
"owner": "supercollider-quarks",
"repo": "vowel",
"rev": "ab59caa870201ecf2604b3efdd2196e21a8b5446",
"type": "github"
},
"original": {
"owner": "supercollider-quarks",
"ref": "master",
"repo": "vowel",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1715170163,
"narHash": "sha256-EuRzY3HI9sMMqPX7Yb7xkZaBoznP0mtS2O/Kk/r6fYk=",
"lastModified": 1713960597,
"narHash": "sha256-WAryNIrMfZ48iZSTh8hcHIX9vwh78LMFUtewgY7kp1Y=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "9c0a853edcab5d60d28784c10b13392d7fabb9d7",
"rev": "71894accd2dd096f5a84166a628b1f075311aafe",
"type": "github"
},
"original": {

View file

@ -76,7 +76,6 @@
# Flake inputs
inputs = {
## Basic Inputs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-utils.url = "github:numtide/flake-utils";
@ -99,7 +98,13 @@
inputs.flake-utils.follows = "flake-utils";
};
## Plugins
### Plugins
# Tidal cycles
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix";
inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal";
};
# LSP plugins
plugin-nvim-lspconfig = {
url = "github:neovim/nvim-lspconfig";
@ -178,11 +183,26 @@
flake = false;
};
plugin-elixir-ls = {
url = "github:elixir-lsp/elixir-ls";
flake = false;
};
plugin-elixir-tools = {
url = "github:elixir-tools/elixir-tools.nvim";
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
# Copying/Registers
plugin-registers = {
url = "github:tversteeg/registers.nvim";
@ -482,16 +502,6 @@
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
# Note-taking
plugin-obsidian-nvim = {
url = "github:epwalsh/obsidian.nvim";

View file

@ -1,11 +1,21 @@
{lib, ...}: let
inherit (lib.meta) getExe;
in {
perSystem = {config, ...}: {
apps = {
nix.program = getExe config.packages.nix;
maximal.program = getExe config.packages.maximal;
default = config.apps.nix;
};
{lib, ...}: {
perSystem = {
system,
config,
...
}: {
apps =
{
nix.program = lib.getExe config.packages.nix;
maximal.program = lib.getExe config.packages.maximal;
default = config.apps.nix;
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {
tidal.program = lib.getExe config.packages.tidal;
}
else {}
);
};
}

View file

@ -7,6 +7,7 @@
legacyPackages = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.tidalcycles.overlays.default
inputs.self.overlays.default
(_: _: {
rnix-lsp = inputs'.rnix-lsp.defaultPackage;

View file

@ -9,11 +9,13 @@
nixConfig = mainConfig false;
maximalConfig = mainConfig true;
tidalConfig = {config.vim.tidal.enable = true;};
in {
flake.overlays.default = _final: prev: {
inherit neovimConfiguration;
neovim-nix = buildPkg prev [nixConfig];
neovim-maximal = buildPkg prev [maximalConfig];
neovim-tidal = buildPkg prev [tidalConfig];
devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}];
};
}

View file

@ -7,50 +7,56 @@
}: let
docs = import ../docs {inherit pkgs inputs;};
in {
packages = {
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
docs-manpages = docs.manPages;
docs-json = docs.options.json;
packages =
{
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
docs-manpages = docs.manPages;
docs-json = docs.options.json;
# Build and open the built manual in your system browser
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
#!${pkgs.stdenv.shell}
# use xdg-open to open the docs in the browser
${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html}
'';
# Build and open the built manual in your system browser
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
#!${pkgs.stdenv.shell}
# use xdg-open to open the docs in the browser
${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html}
'';
# Exposed neovim configurations
nix = config.legacyPackages.neovim-nix;
maximal = config.legacyPackages.neovim-maximal;
default = config.legacyPackages.neovim-nix;
# Exposed neovim configurations
nix = config.legacyPackages.neovim-nix;
maximal = config.legacyPackages.neovim-maximal;
default = config.legacyPackages.neovim-nix;
# Published docker images
docker-nix = let
inherit (pkgs) bash gitFull buildEnv dockerTools;
inherit (config.legacyPackages) neovim-nix;
in
dockerTools.buildImage {
name = "nvf";
tag = "latest";
# Published docker images
docker-nix = let
inherit (pkgs) bash gitFull buildEnv dockerTools;
inherit (config.legacyPackages) neovim-nix;
in
dockerTools.buildImage {
name = "nvf";
tag = "latest";
copyToRoot = buildEnv {
name = "neovim-root";
pathsToLink = ["/bin"];
paths = [
neovim-nix
gitFull
bash
];
copyToRoot = buildEnv {
name = "neovim-root";
pathsToLink = ["/bin"];
paths = [
neovim-nix
gitFull
bash
];
};
config = {
Cmd = ["${neovim-nix}/bin/nvim"];
WorkingDir = "/home/neovim/demo";
Volumes = {"/home/neovim/demo" = {};};
};
};
config = {
Cmd = ["${neovim-nix}/bin/nvim"];
WorkingDir = "/home/neovim/demo";
Volumes = {"/home/neovim/demo" = {};};
};
};
};
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {tidal = config.legacyPackages.neovim-tidal;}
else {}
);
};
}

View file

@ -1,11 +0,0 @@
{lib, ...}: let
inherit (lib.modules) mkRemovedOptionModule;
in {
imports = [
# 2024-06-06
(mkRemovedOptionModule ["vim" "tidal"] ''
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
you depended on this functionality, please open an issue.
'')
];
}

View file

@ -53,13 +53,7 @@
"warnings"
];
# Extra modules, such as deprecation warnings
# or renames in one place.
extra = map (p: ./extra + "/${p}") [
"deprecations.nix"
];
allModules = concatLists [neovim plugins wrapper extra];
allModules = concatLists [neovim plugins wrapper];
pkgsModule = {config, ...}: {
config = {

View file

@ -1,17 +1,15 @@
{
config,
pkgs,
config,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either package listOf str bool;
inherit (lib.nvim.languages) diagnosticsToLua;
inherit (lib.nvim.types) diagnostics mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) diagnostics mkGrammarOption;
cfg = config.vim.languages.bash;
@ -57,7 +55,6 @@
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
diagnostics_format = "#{m} [#{c}]"
})
)
'';
@ -117,30 +114,4 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View file

@ -0,0 +1,83 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
cfg = config.vim.languages.bash;
diagnosticsProviders = {
shellcheck = {
package = pkgs.shellcheck;
nullConfig = pkg: ''
table.insert(
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
})
)
'';
};
};
formats = {
shfmt = {
package = pkgs.shfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.shfmt.with({
command = "${pkgs.shfmt}/bin/shfmt",
})
)
'';
};
};
servers = {
bash-ls = {
package = pkgs.nodePackages.bash-language-server;
lspConfig = ''
lspconfig.bashls.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/bash-language-server", "start"}''
};
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View file

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

View file

@ -0,0 +1,76 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
servers = {
dart = {
package = pkgs.dart;
lspConfig = ''
lspconfig.dartls.setup{
capabilities = capabilities;
on_attach=default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/dart", "language-server", "--protocol=lsp"}''
};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.luaConfigRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View file

@ -1,23 +1,18 @@
{
config,
pkgs,
lib,
pkgs,
...
}: let
inherit (builtins) attrNames;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) enum either listOf package nullOr str bool;
inherit (lib.strings) optionalString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
defaultServer = "dart";
servers = {
dart = {
@ -53,16 +48,15 @@ in {
default = defaultServer;
};
package = mkOption {
description = "Dart LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
description = "Dart LSP server package, or the command to run as a list of strings";
};
opts = mkOption {
description = "Options to pass to Dart LSP server";
type = nullOr str;
default = null;
description = "Options to pass to Dart LSP server";
};
};
@ -76,26 +70,23 @@ in {
flutter-tools = {
enable = mkOption {
description = "Enable flutter-tools for flutter support";
type = bool;
default = config.vim.languages.enableLSP;
description = "Enable flutter-tools for flutter support";
};
enableNoResolvePatch = mkOption {
description = ''
Patch flutter-tools so that it doesn't resolve symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source and encounter the error "`dart` missing from PATH", disable this option.
'';
type = bool;
default = true;
description = ''
Whether to patch flutter-tools so that it doesn't resolve
symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source
and encounter the error "`dart` missing from PATH", disable this option.
'';
};
color = {
enable = mkEnableOption "highlighting color variables";
enable = mkEnableOption "Whether or mot to highlight color variables at all";
highlightBackground = mkOption {
type = bool;
@ -121,47 +112,4 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.luaConfigRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View file

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

View file

@ -2,16 +2,18 @@
inherit (lib.nvim.languages) mkEnable;
in {
imports = [
./bash.nix
./dart.nix
./bash
./dart
./elixir
./markdown
./tidal
./clang.nix
./css.nix
./elixir.nix
./go.nix
./html.nix
./java.nix
./lua.nix
./markdown.nix
./nim.nix
./nix.nix
./php.nix

View file

@ -1,138 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
defaultServer = "elixirls";
servers = {
elixirls = {
package = pkgs.elixir-ls;
lspConfig = ''
-- elixirls setup
lspconfig.elixirls.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/elixir-ls"}''
}
}
'';
};
};
defaultFormat = "mix";
formats = {
mix = {
package = pkgs.elixir;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.mix.with({
command = "${cfg.format.package}/bin/mix",
})
)
'';
};
};
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
treesitter = {
enable = mkEnableOption "Elixir treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "elixir";
};
lsp = {
enable = mkEnableOption "Elixir LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Elixir LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "Elixir LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
format = {
enable = mkEnableOption "Elixir formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Elixir formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Elixir formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
elixir-tools = {
enable = mkEnableOption "Elixir tools";
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.elixir-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.elixir-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.elixir-tools.enable {
vim.startPlugins = ["elixir-tools"];
vim.luaConfigRC.elixir-tools = entryAnywhere ''
local elixir-tools = require("elixir")
local elixirls = require("elixir-tools.elixirls")
-- disable imperative insstallations of various
-- elixir related tools installed by elixir-tools
elixir-tools.setup {
nextls = {
enable = false -- defaults to false
},
credo = {
enable = false -- defaults to true
},
elixirls = {
enable = false, -- defaults to true
}
}
'';
})
]);
}

View file

@ -0,0 +1,67 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.meta) getExe;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"elixir-tools"
];
vim.luaConfigRC.elixir-tools = entryAnywhere ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
elixir.setup {
elixirls = {
-- alternatively, point to an existing elixir-ls installation (optional)
-- not currently supported by elixirls, but can be a table if you wish to pass other args `{"path/to/elixirls", "--foo"}`
cmd = "${getExe pkgs.elixir-ls}",
-- default settings, use the `settings` function to override settings
settings = elixirls.settings {
dialyzerEnabled = true,
fetchDeps = false,
enableTestLenses = false,
suggestSpecs = false,
},
on_attach = function(client, bufnr)
local map_opts = { buffer = true, noremap = true}
-- run the codelens under the cursor
vim.keymap.set("n", "<space>r", vim.lsp.codelens.run, map_opts)
-- remove the pipe operator
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", map_opts)
-- add the pipe operator
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", map_opts)
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", map_opts)
-- bindings for standard LSP functions.
vim.keymap.set("n", "<space>df", "<cmd>lua vim.lsp.buf.format()<cr>", map_opts)
vim.keymap.set("n", "<space>gd", "<cmd>lua vim.diagnostic.open_float()<cr>", map_opts)
vim.keymap.set("n", "<space>dt", "<cmd>lua vim.lsp.buf.definition()<cr>", map_opts)
vim.keymap.set("n", "<space>K", "<cmd>lua vim.lsp.buf.hover()<cr>", map_opts)
vim.keymap.set("n", "<space>gD","<cmd>lua vim.lsp.buf.implementation()<cr>", map_opts)
vim.keymap.set("n", "<space>1gD","<cmd>lua vim.lsp.buf.type_definition()<cr>", map_opts)
-- keybinds for fzf-lsp.nvim: https://github.com/gfanto/fzf-lsp.nvim
-- you could also use telescope.nvim: https://github.com/nvim-telescope/telescope.nvim
-- there are also core vim.lsp functions that put the same data in the loclist
vim.keymap.set("n", "<space>gr", ":References<cr>", map_opts)
vim.keymap.set("n", "<space>g0", ":DocumentSymbols<cr>", map_opts)
vim.keymap.set("n", "<space>gW", ":WorkspaceSymbols<cr>", map_opts)
vim.keymap.set("n", "<leader>d", ":Diagnostics<cr>", map_opts)
end
}
}
'';
};
}

View file

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

View file

@ -0,0 +1,7 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
};
}

View file

@ -0,0 +1,40 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.nvim.lua) expToLua;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
cfg = config.vim.languages.markdown;
servers = {
marksman = {
package = pkgs.marksman;
lspConfig = ''
lspconfig.marksman.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/marksman", "server"}''
},
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
]);
}

View file

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

View file

@ -4,8 +4,7 @@
lib,
...
}: let
inherit (builtins) attrNames concatLists;
inherit (lib.modules) mkIf mkMerge;
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.lists) isList;
inherit (lib.types) bool enum either package listOf str;
@ -30,31 +29,15 @@
'';
};
};
defaultFormat = "denofmt";
formats = {
denofmt = {
package = pkgs.deno;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.deno_fmt.with({
filetypes = ${expToLua (concatLists [cfg.format.extraFiletypes ["markdown"]])},
command = "${cfg.format.package}/bin/deno",
})
)
'';
};
};
in {
options.vim.languages.markdown = {
enable = mkEnableOption "Markdown markup language support";
treesitter = {
enable = mkOption {
description = "Enable Markdown treesitter";
type = bool;
default = config.vim.languages.enableTreesitter;
description = "Enable Markdown treesitter";
};
mdPackage = mkGrammarOption pkgs "markdown";
mdInlinePackage = mkGrammarOption pkgs "markdown-inline";
@ -64,56 +47,17 @@ in {
enable = mkEnableOption "Enable Markdown LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Markdown LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
description = "Markdown LSP server to use";
};
package = mkOption {
description = "Markdown LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
description = "Markdown LSP server package, or the command to run as a list of strings";
};
};
format = {
enable = mkEnableOption "Markdown formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
type = enum (attrNames formats);
default = defaultFormat;
description = "Markdown formatter to use";
};
package = mkOption {
type = package;
default = formats.${cfg.format.type}.package;
description = "Markdown formatter package";
};
extraFiletypes = mkOption {
type = listOf str;
default = [];
description = "Extra filetypes to format with the Markdown formatter";
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.markdown-format = formats.${cfg.format.type}.nullConfig;
})
]);
}

View file

@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.tidal;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
# From tidalcycles flake
pkgs.vimPlugins.vim-tidal
];
vim.globals = {
"tidal_target" = "terminal";
"tidal_flash_duration" = 150;
"tidal_sc_enable" = cfg.openSC;
};
};
}

View file

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

View file

@ -0,0 +1,24 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) int bool;
in {
options.vim.tidal = {
enable = mkEnableOption "tidalcycles tools and plugins";
flash = mkOption {
description = ''When sending a paragraph or a single line, vim-tidal will "flash" the selection for some milliseconds'';
type = int;
default = 150;
};
openSC = mkOption {
description = "Automatically run the supercollider CLI, sclang, alongside the Tidal GHCI terminal.";
type = bool;
default = true;
};
};
}

View file

@ -4,59 +4,20 @@
...
}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf enum nullOr submodule bool;
inherit (lib.types) attrsOf enum nullOr submodule;
inherit (lib.modules) mkRenamedOptionModule;
inherit (lib.nvim.config) mkBool;
settingSubmodule = submodule {
options = {
RGB = mkOption {
description = "Colorize #RGB hex codes";
default = null;
type = nullOr bool;
};
RRGGBB = mkOption {
description = "Colorize #RRGGBB hex codes";
default = null;
type = nullOr bool;
};
names = mkOption {
description = ''Colorize "Name" codes like Blue'';
default = null;
type = nullOr bool;
};
RRGGBBAA = mkOption {
description = "Colorize #RRGGBBAA hex codes";
default = null;
type = nullOr bool;
};
rgb_fn = mkOption {
description = "Colorize CSS rgb() and rgba() functions";
default = null;
type = nullOr bool;
};
hsl_fn = mkOption {
description = "Colorize CSS hsl() and hsla() functions";
default = null;
type = nullOr bool;
};
css = mkOption {
description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
default = null;
type = nullOr bool;
};
css_fn = mkOption {
description = "Enable all CSS *functions*: rgb_fn, hsl_fn";
default = null;
type = nullOr bool;
};
RGB = mkBool true "Colorize #RGB hex codes";
RRGGBB = mkBool true "Colorize #RRGGBB hex codes";
names = mkBool true ''Colorize "Name" codes like Blue'';
RRGGBBAA = mkBool false "Colorize #RRGGBBAA hex codes";
rgb_fn = mkBool false "Colorize CSS rgb() and rgba() functions";
hsl_fn = mkBool false "Colorize CSS hsl() and hsla() functions";
css = mkBool false "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
css_fn = mkBool false "Enable all CSS *functions*: rgb_fn, hsl_fn";
mode = mkOption {
description = "Set the display mode";
type = nullOr (enum ["foreground" "background"]);

View file

@ -133,14 +133,6 @@ in {
configRC = {
globalsScript = entryAnywhere (concatStringsSep "\n" globalsScript);
# Call additional lua files with :luafile in Vimscript
# section of the configuration, only after
# the luaScript section has been evaluated
extraLuaFiles = let
callLuaFiles = map (file: "luafile ${file}") cfg.extraLuaFiles;
in
entryAfter ["globalScript"] (concatStringsSep "\n" callLuaFiles);
# wrap the lua config in a lua block
# using the wrapLuaConfic function from the lib
luaScript = let
@ -156,7 +148,7 @@ in {
inherit mapResult;
};
in
entryAnywhere luaConfig;
entryAfter ["globalsScript"] luaConfig;
extraPluginConfigs = let
mapResult = result: (wrapLuaConfig {

View file

@ -37,8 +37,8 @@ in {
To avoid leaking imperative user configuration into your
configuration, this is enabled by default. If you wish
to load configuration from user configuration directories
(e.g. {file}`$HOME/.config/nvim`, {file}`$HOME/.config/nvim/after`
and {file}`$HOME/.local/share/nvim/site`) you may set this
(e.g. `$HOME/.config/nvim`, `$HOME/.config/nvim/after`
and `$HOME/.local/share/nvim/site`) you may set this
option to true.
:::
'';
@ -68,52 +68,16 @@ in {
active runtimepath of the Neovim. This can be used to
add additional lookup paths for configs, plugins, spell
languages and other things you would generally place in
your {file}`$HOME/.config/nvim`.
your `$HOME/.config/nvim`.
This is meant as a declarative alternative to throwing
files into {file}`~/.config/nvim` and having the Neovim
files into `~/.config/nvim` and having the Neovim
wrapper pick them up. For more details on
`vim.o.runtimepath`, and what paths to use; please see
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath')
'';
};
extraLuaFiles = mkOption {
type = listOf (either path str);
default = [];
example = literalExpression ''
[
# absolute path, as a string - impure
"$HOME/.config/nvim/my-lua-file.lua"
# relative path, as a path - pure
./nvim/my-lua-file.lua
# source type path - pure and reproducible
(builtins.source {
path = ./nvim/my-lua-file.lua;
name = "my-lua-file";
})
]
'';
description = ''
Additional lua files that will be sourced by Neovim.
Takes both absolute and relative paths, all of which
will be called via the `luafile` command in Neovim.
See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands)
on the Neovim documentation for more details.
::: {.warning}
All paths passed to this option must be valid. If Neovim cannot
resolve the path you are attempting to sourcee, then your configuration
will error, and Neovim will not start. Please ensure that all paths
are correct before using this option.
:::
'';
};
globals = mkOption {
type = attrs;
default = {};