diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index e41911ba..36209ff7 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -3,25 +3,14 @@ [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 -- Add Haskell support under `vim.languages.haskell` using [haskell-tools.nvim]. - -[diniamo](https://github.com/diniamo): - -- Add Odin support under `vim.languages.odin`. - -- Disable the built-in format-on-save feature of zls. Use `vim.lsp.formatOnSave` - instead. +- Add Haskell support under `vim.languages.haskell` using [haskell-tools.nvim] diff --git a/flake.lock b/flake.lock index 0a7ee1a5..dc9cd81a 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1735150973, - "narHash": "sha256-OJhcCAoaMMXeD6o4qI/hxBCNELJp4dN8D5LJZc8w8XA=", + "lastModified": 1731821965, + "narHash": "sha256-QiGi/HBQRnIRGY4gQPuH7T3hr7NznOpEO7qNpF5ldmE=", "owner": "Gerg-L", "repo": "mnw", - "rev": "40cd0b006cc48dffd0f8698ad7f54cf1d56779a6", + "rev": "5fe5c41975ed0af55f55dc37cd28ba906a5d015e", "type": "github" }, "original": { @@ -98,11 +98,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735523292, - "narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=", + "lastModified": 1733024928, + "narHash": "sha256-n/DOfpKH1vkukuBnach91QBQId2dr5tkE7/7UrkV2zw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b", + "rev": "2c27ab2e60502d1ebb7cf38909de38663f762a79", "type": "github" }, "original": { @@ -114,14 +114,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", + "lastModified": 1730504152, + "narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" } }, "nixpkgs_2": { @@ -207,11 +207,11 @@ "plugin-catppuccin": { "flake": false, "locked": { - "lastModified": 1735299190, - "narHash": "sha256-lwQLmqm01FihJdad4QRMK23MTrouyOokyuX/3enWjzs=", + "lastModified": 1732428187, + "narHash": "sha256-Oogw5wmYkx/zsMlPE/r6Kt3cy5sC92rwVzf0P9rzqyw=", "owner": "catppuccin", "repo": "nvim", - "rev": "f67b886d65a029f12ffa298701fb8f1efd89295d", + "rev": "faf15ab0201b564b6368ffa47b56feefc92ce3f4", "type": "github" }, "original": { @@ -335,11 +335,11 @@ "plugin-cmp-nvim-lsp": { "flake": false, "locked": { - "lastModified": 1733823748, - "narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=", + "lastModified": 1715931395, + "narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=", "owner": "hrsh7th", "repo": "cmp-nvim-lsp", - "rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0", + "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d", "type": "github" }, "original": { @@ -415,11 +415,11 @@ "plugin-copilot-cmp": { "flake": false, "locked": { - "lastModified": 1733947099, - "narHash": "sha256-erRL8bY/zuwuCZfttw+avTrFV7pjv2H6v73NzY2bymM=", + "lastModified": 1718601710, + "narHash": "sha256-8w9go2SBkI+BrXNadWM8ZxDDfrAnZZJx6RbVHAK4+Pg=", "owner": "zbirenbaum", "repo": "copilot-cmp", - "rev": "15fc12af3d0109fa76b60b5cffa1373697e261d1", + "rev": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44", "type": "github" }, "original": { @@ -431,11 +431,11 @@ "plugin-copilot-lua": { "flake": false, "locked": { - "lastModified": 1734926641, - "narHash": "sha256-c2UE0dLBtoYMvMxg+jXzfsD+wN9sZLvftJq4gGmooZU=", + "lastModified": 1729295476, + "narHash": "sha256-UY6N2Q+egh+Cn4REZXrSGH9ElWQBedl0n8tWJvGe7vs=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9", + "rev": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0", "type": "github" }, "original": { @@ -463,11 +463,11 @@ "plugin-csharpls-extended": { "flake": false, "locked": { - "lastModified": 1734491815, - "narHash": "sha256-jO/vuNgP8JAOIturzPFvxMLL5y+6YTYsUxjWwX6Nyso=", + "lastModified": 1732674428, + "narHash": "sha256-d7ll3OlOLx/7E+6+uga26L/FAqd8pZ4XquMakxMsFwU=", "owner": "Decodetalkers", "repo": "csharpls-extended-lsp.nvim", - "rev": "4f56c06215d10c4fcfee8a7f04ba766c114aece0", + "rev": "c788fed627827238de348195c3f318cd090e8e77", "type": "github" }, "original": { @@ -511,11 +511,11 @@ "plugin-dracula": { "flake": false, "locked": { - "lastModified": 1734597715, - "narHash": "sha256-9iRI5NW3mcVzduitY4sr679dRWAWVbZuCAEfgM1OIOs=", + "lastModified": 1731308832, + "narHash": "sha256-3Tlk+utoF4QUjTIPszbyMDh5vUyNiBmq4bRW/leMjaU=", "owner": "Mofiqul", "repo": "dracula.nvim", - "rev": "515acae4fd294fcefa5b15237a333c2606e958d1", + "rev": "e6128ec3923b92bb2b16e81b4a0f04ed0308038e", "type": "github" }, "original": { @@ -527,11 +527,11 @@ "plugin-dressing-nvim": { "flake": false, "locked": { - "lastModified": 1734804193, - "narHash": "sha256-N4hB5wDgoqXrXxSfzDCrqmdDtdVvq+PtOS7FBPH7qXE=", + "lastModified": 1731521499, + "narHash": "sha256-O0sdxU+ZQnclnnC5IfBpgqlMxjsJKlmPYQYPP+S3cn8=", "owner": "stevearc", "repo": "dressing.nvim", - "rev": "3a45525bb182730fe462325c99395529308f431e", + "rev": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b", "type": "github" }, "original": { @@ -543,11 +543,11 @@ "plugin-elixir-tools": { "flake": false, "locked": { - "lastModified": 1735076861, - "narHash": "sha256-CoGTVSKifjqshk8hYaQfFYTYgEGsIb1hKdz6fIS81iU=", + "lastModified": 1727872243, + "narHash": "sha256-7gIvoV6myqbkjLnIhHuyNPix1DFkKEeeND2o6VDxDWc=", "owner": "elixir-tools", "repo": "elixir-tools.nvim", - "rev": "803fa69dbb457305cff98e3997bed2c4b51aea7c", + "rev": "b465f6aff50257fa466de3886fc3e7de2dcff0de", "type": "github" }, "original": { @@ -559,11 +559,11 @@ "plugin-fastaction-nvim": { "flake": false, "locked": { - "lastModified": 1734546047, - "narHash": "sha256-1GSxTyXqufjkRtNK3drWlCn/mGJ9mM9bHMR6ZwWT6X8=", + "lastModified": 1732135971, + "narHash": "sha256-Q+FX7XiX8LyTC4OZ43Q2pXIdSViDn65P9pkDp8jvbnA=", "owner": "Chaitanyabsprip", "repo": "fastaction.nvim", - "rev": "886e22d85e13115808e81ca367d5aaba02d9a25b", + "rev": "24255a74e0d35f1e1807aa78997f5c31ae419dbc", "type": "github" }, "original": { @@ -575,11 +575,11 @@ "plugin-fidget-nvim": { "flake": false, "locked": { - "lastModified": 1734334336, - "narHash": "sha256-o0za2NxFtzHZa7PRIm9U/P1/fwJrxS1G79ukdGLhJ4Q=", + "lastModified": 1730221432, + "narHash": "sha256-fQBrkHV54TaOeLYQJ1DE+lr7SFDPN1yqSlzhFm26NAY=", "owner": "j-hui", "repo": "fidget.nvim", - "rev": "9238947645ce17d96f30842e61ba81147185b657", + "rev": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f", "type": "github" }, "original": { @@ -591,11 +591,11 @@ "plugin-flutter-tools": { "flake": false, "locked": { - "lastModified": 1735420417, - "narHash": "sha256-xfSdPhrSUwBYdE9ZA8GgwFvR70nOp+snbNrFHeIfwOM=", + "lastModified": 1732910301, + "narHash": "sha256-iU0aTq3F5U2z8iKdUMxkvQ8ZopmWIGdx1I8ir0q7n0U=", "owner": "akinsho", "repo": "flutter-tools.nvim", - "rev": "a526c30f1941a7472509aaedda13758f943c968e", + "rev": "40f974b15f82f9af498adda8d93aabd637f3ab58", "type": "github" }, "original": { @@ -607,11 +607,11 @@ "plugin-friendly-snippets": { "flake": false, "locked": { - "lastModified": 1733106470, - "narHash": "sha256-I8SRZxnoNC6SOWW+scoA77Jwyxcb4eUczppLdyOiZe0=", + "lastModified": 1728273759, + "narHash": "sha256-H94Ryad0ZsSg/gioUgW+7sowij7GgtEUMNFi1IOZAys=", "owner": "rafamadriz", "repo": "friendly-snippets", - "rev": "efff286dd74c22f731cdec26a70b46e5b203c619", + "rev": "de8fce94985873666bd9712ea3e49ee17aadb1ed", "type": "github" }, "original": { @@ -751,11 +751,11 @@ "plugin-image-nvim": { "flake": false, "locked": { - "lastModified": 1735173549, - "narHash": "sha256-Sjbmf4BmjkjAorT3tojbC7JivJagFamAVgzwcCipa8k=", + "lastModified": 1732136347, + "narHash": "sha256-Az/jiHW/DtvHNlV+Wzw6U+p8b2Ic9pNJRQ6YGerL81c=", "owner": "3rd", "repo": "image.nvim", - "rev": "b991fc7f845bc6ab40c6ec00b39750dcd5190010", + "rev": "5f8fceca2d1be96a45b81de21c2f98bf6084fb34", "type": "github" }, "original": { @@ -767,11 +767,11 @@ "plugin-indent-blankline": { "flake": false, "locked": { - "lastModified": 1733296464, - "narHash": "sha256-H3lUQZDvgj3a2STYeMUDiOYPe7rfsy08tJ4SlDd+LuE=", + "lastModified": 1731320409, + "narHash": "sha256-WVDNi/woG0ohPEYzM83mmXDCRNYnQbqooSDVUtBsJbY=", "owner": "lukas-reineke", "repo": "indent-blankline.nvim", - "rev": "259357fa4097e232730341fa60988087d189193a", + "rev": "7871a88056f7144defca9c931e311a3134c5d509", "type": "github" }, "original": { @@ -799,11 +799,11 @@ "plugin-lsp-lines": { "flake": false, "locked": { - "lastModified": 1734793049, - "narHash": "sha256-jHiIZemneQACTDYZXBJqX2/PRTBoxq403ILvt1Ej1ZM=", + "lastModified": 1716108775, + "narHash": "sha256-QsvmPOer7JgO7Y+N/iaNJD7Kmy69gnlV4CeyaQesNvA=", "owner": "~whynothugo", "repo": "lsp_lines.nvim", - "rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d", + "rev": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055", "type": "sourcehut" }, "original": { @@ -831,11 +831,11 @@ "plugin-lspkind": { "flake": false, "locked": { - "lastModified": 1733408701, - "narHash": "sha256-OCvKUBGuzwy8OWOL1x3Z3fo+0+GyBMI9TX41xSveqvE=", + "lastModified": 1729872608, + "narHash": "sha256-/ifgjqqCQw67l3+gUs00tt860pa92M1WYdjdZ0lhxak=", "owner": "onsails", "repo": "lspkind-nvim", - "rev": "d79a1c3299ad0ef94e255d045bed9fa26025dab6", + "rev": "a700f1436d4a938b1a1a93c9962dc796afbaef4d", "type": "github" }, "original": { @@ -895,11 +895,11 @@ "plugin-luasnip": { "flake": false, "locked": { - "lastModified": 1733162004, - "narHash": "sha256-efDe3RXncnNVkj37AmIv8oj0DKurB50Dziao5FGTLP4=", + "lastModified": 1732967555, + "narHash": "sha256-iWivJ6dIOEqT3uLQA5KzvCHkDcjC62OlNWagEW680qc=", "owner": "L3MON4D3", "repo": "LuaSnip", - "rev": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", + "rev": "2592b91577136dbb355a4708be1e60619456b7f6", "type": "github" }, "original": { @@ -911,11 +911,11 @@ "plugin-lz-n": { "flake": false, "locked": { - "lastModified": 1735437369, - "narHash": "sha256-6NIXqwmX7RgwiZVEzmTnkJgmrPqFNx12ayIcRgNIaEs=", + "lastModified": 1733019070, + "narHash": "sha256-Go9FBjF3EBFy+/53lpC5AdKYpJBK+uFzInTk6lODxdQ=", "owner": "nvim-neorocks", "repo": "lz.n", - "rev": "32be28a221b9c98e56841458e4b20c150a4169c4", + "rev": "f308fa4dd81355fb5fddf3ca209847d679af6917", "type": "github" }, "original": { @@ -976,11 +976,11 @@ "plugin-modes-nvim": { "flake": false, "locked": { - "lastModified": 1734414076, - "narHash": "sha256-ShIK8ROowT1yFHgSIVHUFnnQOEMr3YPIqw4ixzR8w8M=", + "lastModified": 1717693302, + "narHash": "sha256-z1XD0O+gG2/+g/skdWGC64Zv4dXvvhWesaK/8DcPF/E=", "owner": "mvllow", "repo": "modes.nvim", - "rev": "c7a4b1b383606832aab150902719bd5eb5cdb2b0", + "rev": "326cff3282419b3bcc745061978c1e592cae055d", "type": "github" }, "original": { @@ -992,11 +992,11 @@ "plugin-neo-tree-nvim": { "flake": false, "locked": { - "lastModified": 1735302061, - "narHash": "sha256-tZMneZsEbB5bgZgYq4ZWwK25B3vcnn80Q7diKcRoEv4=", + "lastModified": 1732465535, + "narHash": "sha256-3wRojpFbdjcRQPv62/mHqQgyfytTqaBcsX1X0zCNgC8=", "owner": "nvim-neo-tree", "repo": "neo-tree.nvim", - "rev": "a9f8943b4c31f8460d25c71e0f463d65e9775f1c", + "rev": "42caaf5c3b7ca346ab278201151bb878006a6031", "type": "github" }, "original": { @@ -1008,11 +1008,11 @@ "plugin-neocord": { "flake": false, "locked": { - "lastModified": 1733429637, - "narHash": "sha256-g/pq6hFo7duonIl1wWoxbJUTh/IRTH3hHEoQUdoiqKE=", + "lastModified": 1729369963, + "narHash": "sha256-4dVaxigJ8eOXpgiqcxUYIF4SoC1CPFvNHYKT0zxIYo0=", "owner": "IogaMaster", "repo": "neocord", - "rev": "4d55d8dab2d5f2f272192add7a2c21982039c699", + "rev": "587e03390a355e9c364d48638e0e0db2a8431d73", "type": "github" }, "original": { @@ -1040,11 +1040,11 @@ "plugin-neorg": { "flake": false, "locked": { - "lastModified": 1734188232, - "narHash": "sha256-xH87caxEebrWLwY/v3xyyOy6PTG/ZqX2OfCdwg/RqDY=", + "lastModified": 1732289702, + "narHash": "sha256-8RQ+PFnIcjPoNJQB/qz+zv1fjVjFEwPhuAh+JL7GPL4=", "owner": "nvim-neorg", "repo": "neorg", - "rev": "6b945909d84b5aeadc875f9b3f529ec44b9bc60f", + "rev": "7a893a176a7d9c074a5371865b53c6aa4e223991", "type": "github" }, "original": { @@ -1088,11 +1088,11 @@ "plugin-noice-nvim": { "flake": false, "locked": { - "lastModified": 1734026622, - "narHash": "sha256-OpwgNTGunmy6Y7D/k0T+DFK/WJ8MeVTGWwjiPTQlvEY=", + "lastModified": 1732649160, + "narHash": "sha256-0RLMkThaE6AxYvUKx056Ac63Oc2NTJxvgyRnZJ5/D2g=", "owner": "folke", "repo": "noice.nvim", - "rev": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f", + "rev": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c", "type": "github" }, "original": { @@ -1121,11 +1121,11 @@ "plugin-nui-nvim": { "flake": false, "locked": { - "lastModified": 1733856815, - "narHash": "sha256-6U7E/i5FuNXQy+sF4C5DVxuTPqNKD5wxUgFohpOjm9Q=", + "lastModified": 1726376728, + "narHash": "sha256-90Wq+vT361mTaGU/SvAezqJkX9HHmZ2GI2fKBDxPn04=", "owner": "MunifTanjim", "repo": "nui.nvim", - "rev": "53e907ffe5eedebdca1cd503b00aa8692068ca46", + "rev": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f", "type": "github" }, "original": { @@ -1169,11 +1169,11 @@ "plugin-nvim-cmp": { "flake": false, "locked": { - "lastModified": 1734672427, - "narHash": "sha256-Z/Qy2ErbCa7dbjZVuJUkMmb4d24amNunNgRcbCGPfOg=", + "lastModified": 1732948484, + "narHash": "sha256-+0nflL0WCaxPuJgUviELhbXASNYYl/SKZ+nz70sEAXU=", "owner": "hrsh7th", "repo": "nvim-cmp", - "rev": "b555203ce4bd7ff6192e759af3362f9d217e8c89", + "rev": "ca4d3330d386e76967e53b85953c170658255ecb", "type": "github" }, "original": { @@ -1185,11 +1185,11 @@ "plugin-nvim-colorizer-lua": { "flake": false, "locked": { - "lastModified": 1735384185, - "narHash": "sha256-quqs3666vQc/4ticc/Z5BHzGxV6UUVE9jVGT07MEMQQ=", + "lastModified": 1732386340, + "narHash": "sha256-lAWeljYC17bmEs1Ss80o6eJYrJ9fsFlKvyJWu9e44XU=", "owner": "NvChad", "repo": "nvim-colorizer.lua", - "rev": "8a65c448122fc8fac9c67b2e857b6e830a4afd0b", + "rev": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb", "type": "github" }, "original": { @@ -1217,11 +1217,11 @@ "plugin-nvim-dap": { "flake": false, "locked": { - "lastModified": 1735568902, - "narHash": "sha256-5iaXim9bDvSAI6jUXgu2OEk/KivfAsMTRry+UTHs2Gk=", + "lastModified": 1732901614, + "narHash": "sha256-atsgMdPyAAbh4dIxZOAE3hHLLb/664112lHdXHcXtZQ=", "owner": "mfussenegger", "repo": "nvim-dap", - "rev": "ffb077e65259f13be096ea6d603e3575a76b214a", + "rev": "0a0daa796a5919a51e5e5019ffa91219c94c4fef", "type": "github" }, "original": { @@ -1249,11 +1249,11 @@ "plugin-nvim-dap-ui": { "flake": false, "locked": { - "lastModified": 1735324898, - "narHash": "sha256-psIBQpx3tV2UWm5hZTMPBANcXHPAX24dIuDq8Qcscxs=", + "lastModified": 1727897692, + "narHash": "sha256-kg7lyVBeuBqPCVzvt3pBoonQupgf1nGh3EvCF/astf4=", "owner": "rcarriga", "repo": "nvim-dap-ui", - "rev": "e94d98649dccb6a3884b66aabc2e07beb279e535", + "rev": "ffa89839f97bad360e78428d5c740fdad9a0ff02", "type": "github" }, "original": { @@ -1265,11 +1265,11 @@ "plugin-nvim-docs-view": { "flake": false, "locked": { - "lastModified": 1733658747, - "narHash": "sha256-b5aH8Tj+tMk0BjNCgdeCEeR26oQ9NCobj98P7IDgIPY=", + "lastModified": 1723781320, + "narHash": "sha256-6kd3IWsD72eYe+q1w78gcFcK9LalCQHCqtSwwqQR3Ew=", "owner": "amrbashir", "repo": "nvim-docs-view", - "rev": "1b97f8f954d74c46061bf289b6cea9232484c12c", + "rev": "365593534e0acd762bfddce6e8313315ffa4fa36", "type": "github" }, "original": { @@ -1281,11 +1281,11 @@ "plugin-nvim-lightbulb": { "flake": false, "locked": { - "lastModified": 1734997673, - "narHash": "sha256-byvgRJvvt5rhiUVWdreY2jELXoPVld5EKQlOXwjNgWE=", + "lastModified": 1729134062, + "narHash": "sha256-JfXSuOBwyxgH/PzzcBQ7OqoXHkLGZSCYutYHLocbTto=", "owner": "kosayoda", "repo": "nvim-lightbulb", - "rev": "3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea", + "rev": "33d4c95e0e853956bc9468b70b3064c87d5abaca", "type": "github" }, "original": { @@ -1297,11 +1297,11 @@ "plugin-nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1735439232, - "narHash": "sha256-6a1HjpLYdZ+ZmWM1B0tv631A3EHHstPrjaV15UnVtoY=", + "lastModified": 1733062298, + "narHash": "sha256-tLZYWbKSQxiRU1tQqRXAUSTfCS7a1tHNSIMbt0aOamU=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "8b15a1a597a59f4f5306fad9adfe99454feab743", + "rev": "90c1c6cc822b1836209514c096069b9bbeab63d9", "type": "github" }, "original": { @@ -1313,11 +1313,11 @@ "plugin-nvim-metals": { "flake": false, "locked": { - "lastModified": 1735386491, - "narHash": "sha256-G9V7fX65uW4z7kiuiP8mLtEjLoTJ1mkltj51OlN5/oM=", + "lastModified": 1728295172, + "narHash": "sha256-ja/+MNxZ3H9io9jDwm5rhE6iKNi86a22eCOY75g19O8=", "owner": "scalameta", "repo": "nvim-metals", - "rev": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c", + "rev": "f861db9fda55939797ac1b05238c49b0dcdc3bdb", "type": "github" }, "original": { @@ -1361,11 +1361,11 @@ "plugin-nvim-neoclip": { "flake": false, "locked": { - "lastModified": 1734898459, - "narHash": "sha256-RCMZi1DM9JFrXWQ5w2wOjFzpANkiukn+RvHB9swMtbk=", + "lastModified": 1725927226, + "narHash": "sha256-GHkTIGPgX5j1wUS9EW/fGOp3NSRjfVaz+6o1Aehy2Xw=", "owner": "AckslD", "repo": "nvim-neoclip.lua", - "rev": "5e5e010251281f4aea69cfc1d4976ffe6065cf0f", + "rev": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f", "type": "github" }, "original": { @@ -1393,11 +1393,11 @@ "plugin-nvim-notify": { "flake": false, "locked": { - "lastModified": 1735562588, - "narHash": "sha256-9jDpoLLto9WgTsV399WeE2XGrTJXWTYbcJ+zOFWldAA=", + "lastModified": 1727022370, + "narHash": "sha256-Sd7IR5roXHOKRCxhqtYMhWfEltyRJMDEMDO/ecSKenE=", "owner": "rcarriga", "repo": "nvim-notify", - "rev": "c3797193536711b5d8983975791c4b11dc35ab3a", + "rev": "fbef5d32be8466dd76544a257d3f3dce20082a07", "type": "github" }, "original": { @@ -1457,11 +1457,11 @@ "plugin-nvim-tree-lua": { "flake": false, "locked": { - "lastModified": 1734820548, - "narHash": "sha256-4PmP31vYPH9xw4AjV5rDSKvcvZGTnIaPfR4Bwc0lAiA=", + "lastModified": 1732428058, + "narHash": "sha256-HHgC7aH2m3gv2FtOK1jhjBgJOGWrdc+FQOEpMiEWe74=", "owner": "nvim-tree", "repo": "nvim-tree.lua", - "rev": "68fc4c20f5803444277022c681785c5edd11916d", + "rev": "ca7c4c33cac2ad66ec69d45e465379716ef0cc97", "type": "github" }, "original": { @@ -1473,11 +1473,11 @@ "plugin-nvim-treesitter-context": { "flake": false, "locked": { - "lastModified": 1734710732, - "narHash": "sha256-TIFMPKzD2ero1eK9aVfY1iKEvf/Sw8SL/9mk9omCQ3c=", + "lastModified": 1733041360, + "narHash": "sha256-wcz3F0vDrgMXJjB0Zz7naoVQ8YvHdd55gG4NHqQMYQY=", "owner": "nvim-treesitter", "repo": "nvim-treesitter-context", - "rev": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0", + "rev": "920999bf53daa63ddf12efdeb5137a7cea1cc201", "type": "github" }, "original": { @@ -1489,11 +1489,11 @@ "plugin-nvim-ts-autotag": { "flake": false, "locked": { - "lastModified": 1733164313, - "narHash": "sha256-v2NTFBIzKTYizUPWB3uhpnTGVZWaelhE3MT5+BDA6Do=", + "lastModified": 1732998473, + "narHash": "sha256-HtF0arW9cuE4yQN+1ccRaonqiH6fcoTpyuSecLPKtKc=", "owner": "windwp", "repo": "nvim-ts-autotag", - "rev": "1cca23c9da708047922d3895a71032bc0449c52d", + "rev": "f2d24aca1bcbbd2c0306fd93d52e3697027b77ff", "type": "github" }, "original": { @@ -1505,11 +1505,11 @@ "plugin-nvim-web-devicons": { "flake": false, "locked": { - "lastModified": 1735569123, - "narHash": "sha256-h9rY6F+2sBlG9PFN34/0ZTkY66oCeCIPe/HEadM03K4=", + "lastModified": 1732925137, + "narHash": "sha256-Sh+r54pTI60j5tOmSyEkTVS6MzMIt52nqjNdtMp8kpI=", "owner": "nvim-tree", "repo": "nvim-web-devicons", - "rev": "4adeeaa7a32d46cf3b5833341358c797304f950a", + "rev": "203da76ecfbb4b192cf830665b03eb651b635c94", "type": "github" }, "original": { @@ -1569,11 +1569,11 @@ "plugin-orgmode-nvim": { "flake": false, "locked": { - "lastModified": 1734770880, - "narHash": "sha256-E1YJeTay1tX2PgiXwV/DRgrlYHIGUe9/uTA+6ORIhBw=", + "lastModified": 1731656059, + "narHash": "sha256-uKJuJsxQhdh3NxZx1Uu72poQVFN7KEyyMFEHPUr7UgQ=", "owner": "nvim-orgmode", "repo": "orgmode", - "rev": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0", + "rev": "1d8c9b9417f8c8e9fb146d4f54fb1e90a4f7e534", "type": "github" }, "original": { @@ -1585,11 +1585,11 @@ "plugin-otter-nvim": { "flake": false, "locked": { - "lastModified": 1735130975, - "narHash": "sha256-NPBGcLi1lEmpGGbGs58Xzw1IriOyKTMQdwIdVFsbVDM=", + "lastModified": 1724585935, + "narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=", "owner": "jmbuhr", "repo": "otter.nvim", - "rev": "e8c662e1aefa8b483cfba6e00729a39a363dcecc", + "rev": "ca9ce67d0399380b659923381b58d174344c9ee7", "type": "github" }, "original": { @@ -1694,30 +1694,14 @@ "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": 1733845819, - "narHash": "sha256-ejh9UXQbLc8Ie6wF7zszzL1gaJzr16gcu0dUWqTo8AM=", + "lastModified": 1729724348, + "narHash": "sha256-/a4pwuVJ5odm3Iio2MeoqAm8GlWIPI91mM4cVnSy/gE=", "owner": "rose-pine", "repo": "neovim", - "rev": "91548dca53b36dbb9d36c10f114385f759731be1", + "rev": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e", "type": "github" }, "original": { @@ -1745,11 +1729,11 @@ "plugin-run-nvim": { "flake": false, "locked": { - "lastModified": 1735501787, - "narHash": "sha256-CFOyOARCLQiMOhFPeqz8n2ULyaaRxRZrOk0FCibjuIM=", + "lastModified": 1732918526, + "narHash": "sha256-kiszNmZZDXG8tAPMQKuGJDCkqCMzsWT7BkCvkVsH2lA=", "owner": "diniamo", "repo": "run.nvim", - "rev": "9015c9cece816ccf10a185b420f6e345fd990802", + "rev": "d867466e01b8fa4e54a589b9ef446cf43fb966de", "type": "github" }, "original": { @@ -1761,11 +1745,11 @@ "plugin-rustaceanvim": { "flake": false, "locked": { - "lastModified": 1735431742, - "narHash": "sha256-ucZXGbxHtbSKf5n11lL3vb6rD2BxJacIDOgcx32PLzA=", + "lastModified": 1732919014, + "narHash": "sha256-7UZ54b3IPS1cPyu+JCM/dHhJLHuqa16suaC2XlSw5Og=", "owner": "mrcjkb", "repo": "rustaceanvim", - "rev": "51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb", + "rev": "4ac7a3c6cca9e393229651cc90733afbdc7c6395", "type": "github" }, "original": { @@ -1777,11 +1761,11 @@ "plugin-smartcolumn": { "flake": false, "locked": { - "lastModified": 1734696989, - "narHash": "sha256-6RodA5BQnL6tB3RCE5G2RiXqBvM3VP3HYZ+T3AxIF7Q=", + "lastModified": 1710067624, + "narHash": "sha256-DHIeDNUF9n9s14GVeojIwc5QUPwJMYYl3gRvhvO/rdE=", "owner": "m4xshen", "repo": "smartcolumn.nvim", - "rev": "f14fbea6f86cd29df5042897ca9e3ba10ba4d27f", + "rev": "cefb17be095ad5526030a21bb2a80553cae09127", "type": "github" }, "original": { @@ -1793,11 +1777,11 @@ "plugin-sqls-nvim": { "flake": false, "locked": { - "lastModified": 1733090837, - "narHash": "sha256-o5uD6shPkweuE+k/goBX42W3I2oojXVijfJC7L50sGU=", + "lastModified": 1733003065, + "narHash": "sha256-VKN4ggWogAr+hwr/gtIDgY5j3afL9R7dZ2oJ4+qpEtE=", "owner": "nanotee", "repo": "sqls.nvim", - "rev": "a514379f5f89bf72955ed3bf5c1c31a40b8a1472", + "rev": "8d7b6010d276fdda494ede23df511eba120886b9", "type": "github" }, "original": { @@ -1841,11 +1825,11 @@ "plugin-tiny-devicons-auto-colors": { "flake": false, "locked": { - "lastModified": 1733445616, - "narHash": "sha256-klUZKvdYhwO3sq4Su4sBFDcNSAYXh53O72vg4+ZOrhI=", + "lastModified": 1724403745, + "narHash": "sha256-Ndkbvxn/x7+fxEYD7JIygqUiItuhoY+4+DaL/pJGKdc=", "owner": "rachartier", "repo": "tiny-devicons-auto-colors.nvim", - "rev": "c8f63933ee013c1e0a26091d58131e060546f01f", + "rev": "a39fa4c92268832f6034306793b8acbfec2a7549", "type": "github" }, "original": { @@ -1873,11 +1857,11 @@ "plugin-toggleterm-nvim": { "flake": false, "locked": { - "lastModified": 1735340326, - "narHash": "sha256-oeNIb+QHa/9yGZz/2u9LYIdKluel0bcQkaIqOuQUkis=", + "lastModified": 1731162901, + "narHash": "sha256-g1FwgCc3a8Fak0Nb0gQQ+SI44uyAGaH1tIk1qpaAPEY=", "owner": "akinsho", "repo": "toggleterm.nvim", - "rev": "344fc1810292785b3d962ddac2de57669e1a7ff9", + "rev": "87b2d6a3cab8e2bd9a0255427074285f0365398d", "type": "github" }, "original": { @@ -1889,11 +1873,11 @@ "plugin-tokyonight": { "flake": false, "locked": { - "lastModified": 1734211493, - "narHash": "sha256-TJ/a6N6Cc1T0wdMxMopma1NtwL7rMYbZ6F0zFI1zaIA=", + "lastModified": 1732026921, + "narHash": "sha256-vKXlFHzga9DihzDn+v+j3pMNDfvhYHcCT8GpPs0Uxgg=", "owner": "folke", "repo": "tokyonight.nvim", - "rev": "45d22cf0e1b93476d3b6d362d720412b3d34465c", + "rev": "c2725eb6d086c8c9624456d734bd365194660017", "type": "github" }, "original": { @@ -1937,11 +1921,11 @@ "plugin-typst-preview-nvim": { "flake": false, "locked": { - "lastModified": 1734839452, - "narHash": "sha256-d6Tv7xZRghYYDfABk/p2e9qTm4qnWHM+ejKDCcR0TfY=", + "lastModified": 1733120663, + "narHash": "sha256-uYMZ2PONiiI3UDvCgNvyy4+jhzmUDbAyxX0phKxELXw=", "owner": "chomosuke", "repo": "typst-preview.nvim", - "rev": "c1100e8788baabe8ca8f8cd7fd63d3d479e49e36", + "rev": "0cb5f5627312f50ce089f785ec42b55a85f30ce7", "type": "github" }, "original": { @@ -1969,11 +1953,11 @@ "plugin-vim-fugitive": { "flake": false, "locked": { - "lastModified": 1735457366, - "narHash": "sha256-45zsqKavWoclA67MC54bAel1nE8CLHtSdullHByiRS8=", + "lastModified": 1732036604, + "narHash": "sha256-RGS2T6tHuFPZROU0W4Z6j6wMEiJmd8xuKv3qqM3XHPI=", "owner": "tpope", "repo": "vim-fugitive", - "rev": "174230d6a7f2df94705a7ffd8d5413e27ec10a80", + "rev": "320b18fba2a4f2fe3c8225c778c687e0d2620384", "type": "github" }, "original": { @@ -2049,11 +2033,11 @@ "plugin-which-key": { "flake": false, "locked": { - "lastModified": 1734253151, - "narHash": "sha256-f/+sYMDEguB5ZDiYiQAsDvdF/2cVcWnLBU+9qwigk4s=", + "lastModified": 1732804356, + "narHash": "sha256-55RmbdN0rNG8946eIMFd5BlN82eY1GKqmHdUiC7BP+U=", "owner": "folke", "repo": "which-key.nvim", - "rev": "8ab96b38a2530eacba5be717f52e04601eb59326", + "rev": "9b365a6428a9633e3eeb34dbef1b791511c54f70", "type": "github" }, "original": { @@ -2186,7 +2170,6 @@ "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", diff --git a/flake.nix b/flake.nix index d5a7b709..161ba43f 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ }; homeManagerModules = { - nvf = import ./flake/modules/home-manager.nix {inherit lib self;}; + nvf = import ./flake/modules/home-manager.nix self.packages lib; default = self.homeManagerModules.nvf; neovim-flake = lib.warn '' @@ -42,7 +42,7 @@ }; nixosModules = { - nvf = import ./flake/modules/nixos.nix {inherit lib self;}; + nvf = import ./flake/modules/nixos.nix self.packages lib; default = self.nixosModules.nvf; neovim-flake = lib.warn '' @@ -488,11 +488,6 @@ flake = false; }; - plugin-render-markdown-nvim = { - url = "github:MeanderingProgrammer/render-markdown.nvim"; - flake = false; - }; - # Minimap plugin-minimap-vim = { url = "github:wfxr/minimap.vim"; diff --git a/flake/modules/home-manager.nix b/flake/modules/home-manager.nix index 715f7537..77b8448c 100644 --- a/flake/modules/home-manager.nix +++ b/flake/modules/home-manager.nix @@ -1,28 +1,22 @@ # Home Manager module -{ - self, - lib, -}: { +packages: 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) anything bool submoduleWith; + inherit (lib.types) attrsOf anything bool; + inherit (lib.nvim) neovimConfiguration; + inherit (lib.nvim.types) anythingConcatLists; cfg = config.programs.nvf; - nvfModule = submoduleWith { - description = "Nvf module"; - class = "nvf"; - specialArgs = { - inherit pkgs lib inputs; - }; - modules = import ../../modules/modules.nix {inherit pkgs lib;}; + neovimConfigured = neovimConfiguration { + inherit pkgs; + modules = [cfg.settings]; }; in { imports = [ @@ -61,7 +55,7 @@ in { }; settings = mkOption { - type = nvfModule; + type = attrsOf anythingConcatLists; default = {}; description = "Attribute set of nvf preferences."; example = literalExpression '' @@ -84,7 +78,7 @@ in { }; config = mkIf cfg.enable { - programs.nvf.finalPackage = cfg.settings.vim.build.finalPackage; + programs.nvf.finalPackage = neovimConfigured.neovim; home = { sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";}; diff --git a/flake/modules/nixos.nix b/flake/modules/nixos.nix index ecc173a1..022b3d94 100644 --- a/flake/modules/nixos.nix +++ b/flake/modules/nixos.nix @@ -1,28 +1,22 @@ # NixOS module -{ - self, - lib, -}: { +packages: 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) anything bool submoduleWith; + inherit (lib.types) attrsOf anything bool; + inherit (lib.nvim) neovimConfiguration; + inherit (lib.nvim.types) anythingConcatLists; cfg = config.programs.nvf; - nvfModule = submoduleWith { - description = "Nvf module"; - class = "nvf"; - specialArgs = { - inherit pkgs lib inputs; - }; - modules = import ../../modules/modules.nix {inherit pkgs lib;}; + neovimConfigured = neovimConfiguration { + inherit pkgs; + modules = [cfg.settings]; }; in { imports = [ @@ -61,7 +55,7 @@ in { }; settings = mkOption { - type = nvfModule; + type = attrsOf anythingConcatLists; default = {}; description = "Attribute set of nvf preferences."; example = literalExpression '' @@ -84,7 +78,7 @@ in { }; config = mkIf cfg.enable { - programs.nvf.finalPackage = cfg.settings.vim.build.finalPackage; + programs.nvf.finalPackage = neovimConfigured.neovim; environment = { variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim"); diff --git a/lib/types/custom.nix b/lib/types/custom.nix index c42cd2ce..3d4a2bcb 100644 --- a/lib/types/custom.nix +++ b/lib/types/custom.nix @@ -1,8 +1,57 @@ {lib}: let - inherit (lib.options) mergeEqualOption; - inherit (lib.strings) isString stringLength match; - inherit (lib.types) listOf mkOptionType; + 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; 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 ++ [""]) + (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 diff --git a/lib/types/default.nix b/lib/types/default.nix index c1c16715..73b35956 100644 --- a/lib/types/default.nix +++ b/lib/types/default.nix @@ -11,5 +11,5 @@ in { inherit (typesDag) dagOf; inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType; inherit (typesLanguage) diagnostics mkGrammarOption; - inherit (customTypes) char hexColor mergelessListOf; + inherit (customTypes) anythingConcatLists char hexColor mergelessListOf; } diff --git a/modules/default.nix b/modules/default.nix index a207e0d1..a2f8730d 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -9,8 +9,9 @@ extraModules ? [], configuration ? {}, }: let - inherit (lib.strings) toString; - inherit (lib.lists) concatLists; + inherit (pkgs) vimPlugins; + inherit (lib.strings) isString toString; + inherit (lib.lists) filter map concatLists; # import modules.nix with `check`, `pkgs` and `lib` as arguments # check can be disabled while calling this file is called @@ -20,12 +21,7 @@ # evaluate the extended library with the modules # optionally with any additional modules passed by the user module = lib.evalModules { - specialArgs = - extraSpecialArgs - // { - inherit inputs; - modulesPath = toString ./.; - }; + specialArgs = extraSpecialArgs // {modulesPath = toString ./.;}; modules = concatLists [ nvimModules modules @@ -40,11 +36,102 @@ 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 = module.config.vim.build.finalPackage; + 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)"; + }; + }; } diff --git a/modules/modules.nix b/modules/modules.nix index 6e05c592..bc441e96 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -49,7 +49,6 @@ # using the configuration passed in `neovim` and `plugins` modules. wrapper = map (p: ./wrapper + "/${p}") [ "build" - "environment" "rc" "warnings" "lazy" diff --git a/modules/plugins/filetree/nvimtree/config.nix b/modules/plugins/filetree/nvimtree/config.nix index 11fa9fed..e20a1458 100644 --- a/modules/plugins/filetree/nvimtree/config.nix +++ b/modules/plugins/filetree/nvimtree/config.nix @@ -77,9 +77,6 @@ in { -- buffer is a real file on the disk local real_file = vim.fn.filereadable(data.file) == 1 - -- buffer is a directory - local directory = vim.fn.isdirectory(data.file) == 1 - -- buffer is a [No Name] local no_name = data.file == "" and vim.bo[data.buf].buftype == "" @@ -87,7 +84,7 @@ in { local filetype = vim.bo[data.buf].ft -- only files please - if not real_file and not directory and not no_name then + if not real_file and not no_name then return end @@ -96,10 +93,6 @@ in { return end - -- cd if buffer is a directory - if directory then - vim.cmd.cd(data.file) - end -- open the tree but don't focus it require("nvim-tree.api").tree.toggle({ focus = false }) end diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index ee9f55e1..48945b38 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -37,7 +37,6 @@ in { ./csharp.nix ./julia.nix ./nu.nix - ./odin.nix ]; options.vim.languages = { diff --git a/modules/plugins/languages/haskell.nix b/modules/plugins/languages/haskell.nix index 62f4cd41..f8e17b75 100644 --- a/modules/plugins/languages/haskell.nix +++ b/modules/plugins/languages/haskell.nix @@ -92,7 +92,7 @@ in { cmd = ${ if isList cfg.dap.package then expToLua cfg.dap.package - else ''{"${cfg.dap.package}/bin/haskell-debug-adapter"}'' + else ''${cfg.dap.package}/bin/haskell-debug-adapter'' }, }, ''} diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index ab184835..e0164771 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -4,14 +4,13 @@ lib, ... }: let - inherit (builtins) attrNames; + inherit (builtins) attrNames concatLists; inherit (lib.modules) mkIf mkMerge; inherit (lib.options) mkEnableOption mkOption; - inherit (lib.lists) isList concatLists; + inherit (lib.lists) isList; inherit (lib.types) bool enum either package listOf str; - inherit (lib.nvim.lua) expToLua toLuaObject; - inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; - inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) expToLua; + inherit (lib.nvim.types) mkGrammarOption; cfg = config.vim.languages.markdown; defaultServer = "marksman"; @@ -99,29 +98,6 @@ 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 [ @@ -139,13 +115,5 @@ 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}) - ''; - }) ]); } diff --git a/modules/plugins/languages/odin.nix b/modules/plugins/languages/odin.nix deleted file mode 100644 index 7a32db93..00000000 --- a/modules/plugins/languages/odin.nix +++ /dev/null @@ -1,71 +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) either listOf package str enum; - inherit (lib.nvim.lua) expToLua; - inherit (lib.nvim.types) mkGrammarOption; - - defaultServer = "ols"; - servers = { - ols = { - package = pkgs.ols; - lspConfig = '' - lspconfig.ols.setup { - capabilities = capabilities, - on_attach = default_on_attach, - cmd = ${ - if isList cfg.lsp.package - then expToLua cfg.lsp.package - else "{'${cfg.lsp.package}/bin/ols'}" - } - } - ''; - }; - }; - - cfg = config.vim.languages.odin; -in { - options.vim.languages.odin = { - enable = mkEnableOption "Odin language support"; - - treesitter = { - enable = mkEnableOption "Odin treesitter" // {default = config.vim.languages.enableTreesitter;}; - package = mkGrammarOption pkgs "odin"; - }; - - lsp = { - enable = mkEnableOption "Odin LSP support" // {default = config.vim.languages.enableLSP;}; - - server = mkOption { - type = enum (attrNames servers); - default = defaultServer; - description = "Odin LSP server to use"; - }; - - package = mkOption { - description = "Ols package, or the command to run as a list of strings"; - type = either package (listOf str); - default = pkgs.ols; - }; - }; - }; - - 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.odin-lsp = servers.${cfg.lsp.server}.lspConfig; - }) - ]); -} diff --git a/modules/plugins/languages/zig.nix b/modules/plugins/languages/zig.nix index 1b9a588b..7ae8a5c2 100644 --- a/modules/plugins/languages/zig.nix +++ b/modules/plugins/languages/zig.nix @@ -6,7 +6,7 @@ }: let inherit (builtins) attrNames; inherit (lib.options) mkEnableOption mkOption; - inherit (lib.modules) mkIf mkMerge mkDefault; + inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.types) either listOf package str enum; inherit (lib.nvim.lua) expToLua; @@ -57,25 +57,15 @@ in { }; }; }; - config = mkIf cfg.enable (mkMerge [ (mkIf cfg.treesitter.enable { - vim.treesitter = { - enable = true; - grammars = [cfg.treesitter.package]; - }; + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; }) (mkIf cfg.lsp.enable { - vim = { - lsp.lspconfig = { - enable = true; - sources.zig-lsp = servers.${cfg.lsp.server}.lspConfig; - }; - - # nvf handles autosaving already - globals.zig_fmt_autosave = mkDefault 0; - }; + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.zig-lsp = servers.${cfg.lsp.server}.lspConfig; }) ]); } diff --git a/modules/plugins/runner/run-nvim/config.nix b/modules/plugins/runner/run-nvim/config.nix index 60989a1d..7667f5d0 100644 --- a/modules/plugins/runner/run-nvim/config.nix +++ b/modules/plugins/runner/run-nvim/config.nix @@ -20,9 +20,17 @@ in { cmd = "Run"; keys = [ - (mkKeymap "n" cfg.mappings.run "Run" {desc = mappings.run.description;}) - (mkKeymap "n" cfg.mappings.runOverride "Run!" {desc = mappings.runOverride.description;}) - (mkKeymap "n" cfg.mappings.runCommand "RunPrompt" {desc = mappings.run.description;}) + (mkKeymap "n" cfg.mappings.run "Run" {desc = mappings.run.description;}) + (mkKeymap "n" cfg.mappings.runOverride "Run!" {desc = mappings.runOverride.description;}) + (mkKeymap "n" cfg.mappings.runCommand '' + function() + local input = vim.fn.input("Run command: ") + if input ~= "" then require("run").run(input, false) end + end + '' { + desc = mappings.run.description; + lua = true; + }) ]; }; diff --git a/modules/plugins/ui/notifications/nvim-notify/config.nix b/modules/plugins/ui/notifications/nvim-notify/config.nix index 00f947ca..0ee23017 100644 --- a/modules/plugins/ui/notifications/nvim-notify/config.nix +++ b/modules/plugins/ui/notifications/nvim-notify/config.nix @@ -14,9 +14,17 @@ in { startPlugins = ["nvim-notify"]; pluginRC.nvim-notify = entryAnywhere '' - local notify = require("notify") - notify.setup(${toLuaObject cfg.setupOpts}) - vim.notify = notify.notify + require('notify').setup(${toLuaObject cfg.setupOpts}) + + -- required to fix offset_encoding errors + local notify = vim.notify + vim.notify = function(msg, ...) + if msg:match("warning: multiple different client offset_encodings") then + return + end + + notify(msg, ...) + end ''; }; }; diff --git a/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix b/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix index b09100da..f30d19cd 100644 --- a/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix +++ b/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix @@ -28,7 +28,7 @@ in { }; stages = mkOption { - type = enum ["fade_in_slide_out" "fade" "slide" "static"]; + type = enum ["fade_in_slide_out" "fade_in" "slide_out" "none"]; default = "fade_in_slide_out"; description = "The stages of the notification"; }; @@ -41,7 +41,7 @@ in { background_colour = mkOption { type = str; - default = "NotifyBackground"; + default = "#000000"; description = "The background colour of the notification"; }; diff --git a/modules/plugins/utility/preview/markdown-preview/config.nix b/modules/plugins/utility/preview/markdown-preview/config.nix index 50fec81a..8349d3fc 100644 --- a/modules/plugins/utility/preview/markdown-preview/config.nix +++ b/modules/plugins/utility/preview/markdown-preview/config.nix @@ -4,8 +4,8 @@ lib, ... }: let + inherit (lib.strings) concatMapStringsSep; inherit (lib.modules) mkIf; - cfg = config.vim.utility.preview.markdownPreview; in { config = mkIf cfg.enable { @@ -15,7 +15,7 @@ in { mkdp_auto_start = cfg.autoStart; mkdp_auto_close = cfg.autoClose; mkdp_refresh_slow = cfg.lazyRefresh; - mkdp_filetypes = cfg.filetypes; + mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)]; mkdp_command_for_global = cfg.alwaysAllowPreview; mkdp_open_to_the_world = cfg.broadcastServer; mkdp_open_ip = cfg.customIP; diff --git a/modules/plugins/utility/surround/config.nix b/modules/plugins/utility/surround/config.nix index 31b4033d..7161cf6b 100644 --- a/modules/plugins/utility/surround/config.nix +++ b/modules/plugins/utility/surround/config.nix @@ -4,33 +4,51 @@ ... }: let inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.utility.surround; mkLznKey = mode: key: { - inherit mode key; + inherit key mode; }; in { config = mkIf cfg.enable { vim = { + startPlugins = ["nvim-surround"]; + pluginRC.surround = entryAnywhere "require('nvim-surround').setup(${toLuaObject cfg.setupOpts})"; + lazy.plugins.nvim-surround = { package = "nvim-surround"; - setupModule = "nvim-surround"; inherit (cfg) setupOpts; - keys = [ - (mkLznKey "i" cfg.setupOpts.keymaps.insert) - (mkLznKey "i" cfg.setupOpts.keymaps.insert_line) - (mkLznKey "x" cfg.setupOpts.keymaps.visual) - (mkLznKey "x" cfg.setupOpts.keymaps.visual_line) - (mkLznKey "n" cfg.setupOpts.keymaps.normal) - (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur) - (mkLznKey "n" cfg.setupOpts.keymaps.normal_line) - (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur_line) - (mkLznKey "n" cfg.setupOpts.keymaps.delete) - (mkLznKey "n" cfg.setupOpts.keymaps.change) - (mkLznKey "n" cfg.setupOpts.keymaps.change_line) - ]; + keys = + [ + (mkLznKey ["i"] cfg.setupOpts.keymaps.insert) + (mkLznKey ["i"] cfg.setupOpts.keymaps.insert_line) + (mkLznKey ["x"] cfg.setupOpts.keymaps.visual) + (mkLznKey ["x"] cfg.setupOpts.keymaps.visual_line) + (mkLznKey ["n"] cfg.setupOpts.keymaps.normal) + (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_cur) + (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_line) + (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_cur_line) + (mkLznKey ["n"] cfg.setupOpts.keymaps.delete) + (mkLznKey ["n"] cfg.setupOpts.keymaps.change) + (mkLznKey ["n"] cfg.setupOpts.keymaps.change_line) + ] + ++ map (mkLznKey ["n" "i" "v"]) [ + "(nvim-surround-insert)" + "(nvim-surround-insert-line)" + "(nvim-surround-normal)" + "(nvim-surround-normal-cur)" + "(nvim-surround-normal-line)" + "(nvim-surround-normal-cur-line)" + "(nvim-surround-visual)" + "(nvim-surround-visual-line)" + "(nvim-surround-delete)" + "(nvim-surround-change)" + "(nvim-surround-change-line)" + ]; }; }; }; diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 1faa2ccc..97788bd4 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -1,111 +1,13 @@ { - inputs, - lib, config, - pkgs, + lib, ... -} -: let - inherit (pkgs) vimPlugins; - inherit (lib.strings) isString; - inherit (lib.lists) filter map; +}: let + inherit (lib.attrsets) attrValues; - # 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)"; - }; - }; + cfg = config.vim; in { - config.vim.build = { - finalPackage = neovim; + config = { + vim.startPlugins = map (x: x.package) (attrValues cfg.extraPlugins); }; } diff --git a/modules/wrapper/build/default.nix b/modules/wrapper/build/default.nix index 0ebefe45..fe9e1b8e 100644 --- a/modules/wrapper/build/default.nix +++ b/modules/wrapper/build/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./options.nix ./config.nix + ./options.nix ]; } diff --git a/modules/wrapper/build/options.nix b/modules/wrapper/build/options.nix index fa1db61e..6a8d085f 100644 --- a/modules/wrapper/build/options.nix +++ b/modules/wrapper/build/options.nix @@ -1,12 +1,144 @@ -{lib, ...}: let - inherit (lib.types) package; - inherit (lib.options) mkOption; +{ + 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.build = { - finalPackage = mkOption { + options.vim = { + package = mkOption { type = package; - readOnly = true; - description = "final output 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"; }; }; } diff --git a/modules/wrapper/environment/config.nix b/modules/wrapper/environment/config.nix deleted file mode 100644 index 97788bd4..00000000 --- a/modules/wrapper/environment/config.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib.attrsets) attrValues; - - cfg = config.vim; -in { - config = { - vim.startPlugins = map (x: x.package) (attrValues cfg.extraPlugins); - }; -} diff --git a/modules/wrapper/environment/default.nix b/modules/wrapper/environment/default.nix deleted file mode 100644 index fe9e1b8e..00000000 --- a/modules/wrapper/environment/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./config.nix - ./options.nix - ]; -} diff --git a/modules/wrapper/environment/options.nix b/modules/wrapper/environment/options.nix deleted file mode 100644 index 6a8d085f..00000000 --- a/modules/wrapper/environment/options.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ - 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"; - }; - }; -} diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 3468d5ec..6a9a6ea2 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -76,7 +76,6 @@ else mkLuaInline '' function() - ${optionalString (spec.beforeSetup != null) spec.beforeSetup} ${ optionalString (spec.setupModule != null) "require(${toJSON spec.setupModule}).setup(${toLuaObject spec.setupOpts})" diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 730bf267..e0dbea85 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -74,15 +74,6 @@ ''; }; - beforeSetup = mkOption { - type = nullOr lines; - default = null; - description = '' - Lua code to run after the plugin is loaded, but before the setup - function is called. - ''; - }; - setupModule = mkOption { type = nullOr str; default = null; diff --git a/modules/wrapper/build/patches/flutter-tools.patch b/patches/flutter-tools.patch similarity index 100% rename from modules/wrapper/build/patches/flutter-tools.patch rename to patches/flutter-tools.patch