diff --git a/.github/README.md b/.github/README.md index 82f470c..7418d27 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,41 +1,40 @@
- neovim-flake Logo + nvf Logo
- -

❄️ neovim-flake

- -
- - A highly modular, configurable, extensible and easy to use Neovim configuration wrapper written in Nix. Designed for flexibility and ease of use and with code quality in mind. - -
-
- +

❄️ nvf

- - Latest release + + Latest release - - Last commit + + Last commit - - License + + License - - Stars + + Stars - - Issues + + Issues - - Repo Size + + Repo Size

- +

+ +
+ + A highly modular, configurable, extensible and easy to use Neovim configuration + framework in Nix. Designed for flexibility and ease of use, this flake + allows you to easily configure your Neovim instance with a few lines of + Nix code. +

@@ -72,109 +71,81 @@ ### Using `nix` CLI -If you would like to try out the configuration before even thinking about installing it, you can run the following command +If you would like to try out the configuration before even thinking about +installing it, you can run the following command ```console -nix run github:notashelf/neovim-flake +nix run github:notashelf/nvf ``` -This will get you a feel for the base configuration and UI design. The flake exposes `#nix` as the default package, providing minimal language support and various -utilities.You may also use `#nix`, `#tidal` or `#maximal` to get try out different configurations. +This will get you a feel for the base configuration and UI design. +The flake exposes `#nix` as the default package, providing minimal +language support and various utilities.You may also use `#nix`, +`#tidal` or `#maximal` to get try out different configurations. -It is as simple as changing the target output to get a different configuration. For example, to get a configuration with `tidal` support, run: +It is as simple as changing the target output to get a different +configuration. For example, to get a configuration with `tidal` support, run: ```console -nix run github:notashelf/neovim-flake#tidal +nix run github:notashelf/nvf#tidal ``` -Similar instructions will apply for `nix profile install`. However, you are recommended to instead use the module system as described in the manual. +Similar instructions will apply for `nix profile install`. However, you are +recommended to instead use the module system as described in the manual. > [!NOTE] > The `maximal` configuration is _massive_ and will take a while to build. -> To get a feel for the configuration, use the default `nix` or `tidal` configurations. -> Should you choose to try out the `maximal` configuration, using the binary cache as described -> in the manual is _strongly_ recommended. - -### Docker - -As of version 0.5, an image for the `nix` output is published to Dockerhub and GitHub packages with each tagged release. If you do not have Docker installed -on your system, you may run neovim within a container using your favorite tool. You are still recommended to use `nix` instead of Docker. - -The following command will open the current directory in neovim with necessary tools bootstrapped. - -```console -docker run -v `pwd`:/home/neovim/demo --rm -it notashelf/neovim-flake:latest -``` - -The available registeres are `ghcr.io` and `dockerhub` for the time being. Adjust to your liking. +> To get a feel for the configuration, use the default `nix` or `tidal` +> configurations. Should you choose to try out the `maximal` configuration, +> using the binary cache as described in the manual is _strongly_ recommended. ## Documentation -See the [neovim-flake Manual](https://notashelf.github.io/neovim-flake/) for detailed installation guides, configurations, available options, release notes -and more. +See the [**nvf** Manual](https://notashelf.github.io/nvf/) for +detailed installation guides, configurations, available options, release notes +and more. Tips for installing userspace plugins is also contained in the +documentation. -If you want to dive right into trying **neovim-flake** you can get a fully featured configuration with `nix` -language support by running: +If you want to dive right into trying **nvf** you can get a fully +featured configuration with `nix` language support by running: ```console -nix run github:notashelf/neovim-flake +nix run github:notashelf/nvf#nix ``` -Please create an issue on the [issue tracker](../../../issues) if you find the documentation lacking or confusing. -I also appreciate any contributions to the documentation. +Please create an issue on the [issue tracker](../../../issues) if you find +the documentation lacking or confusing. I also appreciate any contributions +to the documentation. ## Help -You can create an issue on the [issue tracker](../../../issues) to ask questions or report bugs. -I am not yet on spaces like matrix or IRC, so please use the issue tracker for now. +You can create an issue on the [issue tracker](../../../issues) to ask questions +or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue +tracker for now. ## Contributing -I am always looking for new ways to help improve this flake. If you would like to contribute, please read -the [contributing guide](CONTRIBUTING.md) before submitting a pull request. You can also create an -issue on the [issue tracker](../../../issues) before submitting a pull request if you would like to discuss -a feature or bug fix. - -## Philosophy - -The philosophy behind this flake configuration is to create an easily configurable and reproducible Neovim environment. -While it does sacrifice in size (which I know some users will find _disagreeable_), it offers a lot of flexibility and customizability in -exchange for the large size of the flake inputs. The "KISS" (Keep it simple, stupid) principle has mostly been abandoned here, however, you _can_ -ultimately leverage the flexibility of this flake to declare a configuration that follows KISS principles, as it is very easy to bring your -own plugins and configurations from non-nix. What this flake is meant to be does eventually fall into your hands. Whether you are a -developer, writer, or live coder, you can quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that you have -full control over. A distribution that takes advantage of pinning vim plugins and third party dependencies (such as tree-sitter grammars, language servers, and more). - -One should never get a broken config when setting options. If setting multiple options results in a broken Neovim, file an issue! -Each plugin knows when another plugin which allows for smart configuration of keybindings and automatic setup of things -like completion sources and languages. +I am always looking for new ways to help improve this flake. If you would like +to contribute, please read the [contributing guide](CONTRIBUTING.md) before +submitting a pull request. You can also create an issue on the +[issue tracker](../../../issues) before submitting a pull request if you would +like to discuss a feature or bug fix. ## FAQ -**Q**: Why is this flake so big? -
-**A**: I have sacrificed in size in order to provide a highly configurable and reproducible Neovim environment. A binary cache is provided to -eleminate the need to build the flake from source, but it is still a large flake. If you do not need all the features, you can use the default `nix` output -instead of the `maximal` output. This will reduce size by a lot, but you will lose some language specific features. -

- -**Q**: Will you try to make this flake smaller? -
-**A**: Yes. As a matter of fact, I am actively working on making this flake smaller. Unfortunately the process of providing everything -possible by itself makes the flake large. Best I can do is to optimize the flake as much as possible by selecting plugins that -are small and fast. And the binary cache, so at least you don't have to build it from source. -

- -**Q**: Will you use a plugin manager/language server installer? -
-**A**: No. If you feel the need to ask that question, then you have missed the whole point of using nix and ultimately this flake. -The whole reason we use nix is to be able to handle EVERYTHING declaratively, well including the LSP and plugin installations. -

- **Q**: Can you add _X_?
-**A**: Maybe. Open an issue using the appropriate template and I will consider it. I do not intend to -add _every plugin that is in existence_, but I will consider it, should it offer something useful to the flake. +**A**: Maybe! It is not one of our goals to support each and every Neovim +plugin, however, I am always open to new modules and plugin setup additions +to **nvf**. Use the [appropritate issue +template](https://github.com/NotAShelf/nvf/issues/new/choose) and I will +consider a module addition. + +**Q**: A plugin I need is not available in **nvf**. What to do? +
+**A**: **nvf** exposes several APIs for you to be able to add your own +plugin configurations! Please see the documentation on how you may do +this. ## Credits @@ -186,23 +157,31 @@ Special thanks to - [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to work - [@n3oney](https://github.com/n3oney) - For making custom keybinds finally possible - [@horriblename](https://github.com/horriblename) - For actively implementing planned features and quality of life updates -- [@Yavko](https://github.com/Yavko) - For the amazing neovim-flake logo +- [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo - [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I could not and everyone who has submitted issues or pull requests! ### Inspiration -This configuration borrows from and is based on a few other configurations, including: +This configuration borrows from and is based on a few other configurations, +including: - [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake is originally based on. - [@sioodmy's](https://github.com/sioodmy) [dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design choices. - [@wiltaylor's](https://github.com/wiltaylor) [neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and design ideas. - [@gvolpe's](https://github.com/gvolpe) [neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and nix concepts. -I am grateful for their previous work and inspiration, and I wholeheartedly recommend checking their work out. +I am grateful for their previous work and inspiration, and I wholeheartedly +recommend checking their work out.
+## License + +Following the [original neovim-flake](https://github.com/jordanisaacs/neovim-flake) +**nvf** has been made available under the **MIT License**. However, all assets +are published under the [CC BY License]. + ---
diff --git a/.github/assets/LICENSE b/.github/assets/LICENSE new file mode 100644 index 0000000..10fabd9 --- /dev/null +++ b/.github/assets/LICENSE @@ -0,0 +1,395 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public licenses. +Notwithstanding, Creative Commons may elect to apply one of its public +licenses to material it publishes and in those instances will be +considered the “Licensor.” The text of the Creative Commons public +licenses is dedicated to the public domain under the CC0 Public Domain +Dedication. Except for the limited purpose of indicating that material +is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the public +licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/assets/neovim-flake-logo-work.svg b/.github/assets/nvf-logo-work.svg similarity index 100% rename from assets/neovim-flake-logo-work.svg rename to .github/assets/nvf-logo-work.svg diff --git a/LICENSE b/LICENSE index 342db3f..0e03fa9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 NotAShelf +Copyright (c) 2023-2024 NotAShelf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/configuration.nix b/configuration.nix index 1875eaa..9532046 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,9 +7,11 @@ inputs: let lib ? pkgs.lib, check ? true, extraSpecialArgs ? {}, + extraModules ? [], + ... }: modulesWithInputs { - inherit pkgs lib check extraSpecialArgs; + inherit pkgs lib check extraSpecialArgs extraModules; configuration.imports = modules; }; @@ -18,18 +20,20 @@ inputs: let }; mainConfig = isMaximal: { - config = { - vim = { - viAlias = true; - vimAlias = true; - debugMode = { - enable = false; - level = 20; - logFile = "/tmp/nvim.log"; - }; + config.vim = { + viAlias = true; + vimAlias = true; + debugMode = { + enable = false; + level = 16; + logFile = "/tmp/nvim.log"; }; - vim.lsp = { + spellcheck = { + enable = isMaximal; + }; + + lsp = { formatOnSave = true; lspkind.enable = false; lightbulb.enable = true; @@ -41,14 +45,14 @@ inputs: let nvim-docs-view.enable = isMaximal; }; - vim.debugger = { + debugger = { nvim-dap = { enable = true; ui.enable = true; }; }; - vim.languages = { + languages = { enableLSP = true; enableFormat = true; enableTreesitter = true; @@ -81,7 +85,7 @@ inputs: let }; }; - vim.visuals = { + visuals = { enable = true; nvimWebDevicons.enable = true; scrollBar.enable = true; @@ -105,70 +109,71 @@ inputs: let }; }; - vim.statusline = { + statusline = { lualine = { enable = true; theme = "catppuccin"; }; }; - vim.theme = { + theme = { enable = true; name = "catppuccin"; style = "mocha"; transparent = false; }; - vim.autopairs.enable = true; - vim.autocomplete = { + autopairs.enable = true; + + autocomplete = { enable = true; type = "nvim-cmp"; }; - vim.filetree = { + filetree = { nvimTree = { enable = true; }; }; - vim.tabline = { + tabline = { nvimBufferline.enable = true; }; - vim.treesitter.context.enable = true; + treesitter.context.enable = true; - vim.binds = { + binds = { whichKey.enable = true; cheatsheet.enable = true; }; - vim.telescope.enable = true; + telescope.enable = true; - vim.git = { + git = { enable = true; gitsigns.enable = true; - gitsigns.codeActions = false; # throws an annoying debug message + gitsigns.codeActions.enable = false; # throws an annoying debug message }; - vim.minimap = { + minimap = { minimap-vim.enable = false; codewindow.enable = isMaximal; # lighter, faster, and uses lua for configuration }; - vim.dashboard = { + dashboard = { dashboard-nvim.enable = false; alpha.enable = isMaximal; }; - vim.notify = { + notify = { nvim-notify.enable = true; }; - vim.projects = { + projects = { project-nvim.enable = isMaximal; }; - vim.utility = { + utility = { ccc.enable = isMaximal; vim-wakatime.enable = isMaximal; icon-picker.enable = isMaximal; @@ -178,23 +183,27 @@ inputs: let hop.enable = true; leap.enable = true; }; + + images = { + image-nvim.enable = false; + }; }; - vim.notes = { - obsidian.enable = false; # FIXME neovim fails to build if obsidian is enabled + notes = { + obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled orgmode.enable = false; mind-nvim.enable = isMaximal; todo-comments.enable = true; }; - vim.terminal = { + terminal = { toggleterm = { enable = true; lazygit.enable = true; }; }; - vim.ui = { + ui = { borders.enable = true; noice.enable = true; colorizer.enable = true; @@ -206,7 +215,7 @@ inputs: let }; smartcolumn = { enable = true; - columnAt.languages = { + setupOpts.custom_colorcolumn = { # this is a freeform module, it's `buftype = int;` for configuring column position nix = 110; ruby = 120; @@ -216,27 +225,28 @@ inputs: let }; }; - vim.assistant = { + assistant = { + chatgpt.enable = false; copilot = { - enable = isMaximal; + enable = false; cmp.enable = isMaximal; }; }; - vim.session = { + session = { nvim-session-manager.enable = false; }; - vim.gestures = { + gestures = { gesture-nvim.enable = false; }; - vim.comments = { + comments = { comment-nvim.enable = true; }; - vim.presence = { - neocord.enable = true; + presence = { + neocord.enable = false; }; }; }; diff --git a/docs/default.nix b/docs/default.nix index a597fb2..5d521d6 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -1,21 +1,46 @@ { + inputs, pkgs, - lib ? import ../lib/stdlib-extended.nix pkgs.lib, - nmdSrc, + lib ? import ../lib/stdlib-extended.nix pkgs.lib inputs, + manpageUrls ? pkgs.path + "/doc/manpage-urls.json", ... }: let - nmd = import nmdSrc { - inherit lib; - # The DocBook output of `nixos-render-docs` doesn't have the change - # `nmd` uses to work around the broken stylesheets in - # `docbook-xsl-ns`, so we restore the patched version here. - pkgs = - pkgs - // { - docbook-xsl-ns = - pkgs.docbook-xsl-ns.override {withManOptDedupPatch = true;}; - }; - }; + inherit (lib.modules) mkForce evalModules; + inherit (lib.strings) hasPrefix removePrefix; + inherit (lib.attrsets) isAttrs mapAttrs optionalAttrs recursiveUpdate isDerivation; + inherit (builtins) fromJSON readFile; + + # release data + release-config = fromJSON (readFile ../release.json); + revision = release-config.release; + + # From home-manager: + # + # Recursively replace each derivation in the given attribute set + # with the same derivation but with the `outPath` attribute set to + # the string `"\${pkgs.attribute.path}"`. This allows the + # documentation to refer to derivations through their values without + # establishing an actual dependency on the derivation output. + # + # This is not perfect, but it seems to cover a vast majority of use + # cases. + # + # Caveat: even if the package is reached by a different means, the + # path above will be shown and not e.g. + # `${config.services.foo.package}`. + scrubDerivations = prefixPath: attrs: let + scrubDerivation = name: value: let + pkgAttrName = prefixPath + "." + name; + in + if isAttrs value + then + scrubDerivations pkgAttrName value + // optionalAttrs (isDerivation value) { + outPath = "\${${pkgAttrName}}"; + } + else value; + in + mapAttrs scrubDerivation attrs; # Make sure the used package is scrubbed to avoid actually # instantiating derivations. @@ -23,46 +48,51 @@ imports = [ { _module.args = { - pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs); - pkgs_i686 = lib.mkForce {}; + pkgs = mkForce (scrubDerivations "pkgs" pkgs); + pkgs_i686 = mkForce {}; }; } ]; }; - dontCheckDefinitions = {_module.check = false;}; - - githubDeclaration = user: repo: subpath: let - urlRef = "main"; - in { - url = "https://github.com/${user}/${repo}/blob/${urlRef}/${subpath}"; - name = "<${repo}/${subpath}>"; - }; - + # Specify the path to the module entrypoint nvimPath = toString ./..; - buildOptionsDocs = args @ { modules, includeModuleSystemOptions ? true, + warningsAreErrors ? true, ... }: let - inherit ((lib.evalModules {inherit modules;})) options; + inherit ((evalModules {inherit modules;})) options; + + # Declaration of the Github site URL. + # Takes a user, repo, and subpath, and returns a declaration site + # as a string. + githubDeclaration = user: repo: subpath: let + urlRef = "github.com"; + branch = "main"; + in { + url = "https://${urlRef}/${user}/${repo}/blob/${branch}/${subpath}"; + name = "<${repo}/${subpath}>"; + }; in pkgs.buildPackages.nixosOptionsDoc ({ + inherit warningsAreErrors; + options = if includeModuleSystemOptions then options else builtins.removeAttrs options ["_module"]; + transformOptions = opt: - opt - // { - # Clean up declaration sites to not refer to the Home Manager + recursiveUpdate opt { + # Clean up declaration sites to not refer to the nvf # source tree. declarations = map (decl: - if lib.hasPrefix nvimPath (toString decl) + if hasPrefix nvimPath (toString decl) then - githubDeclaration "notashelf" "neovim-flake" - (lib.removePrefix "/" (lib.removePrefix nvimPath (toString decl))) + githubDeclaration "notashelf" "nvf" + (removePrefix "/" (removePrefix nvimPath (toString decl))) else if decl == "lib/modules.nix" then # TODO: handle this in a better way (may require upstream @@ -75,61 +105,65 @@ // builtins.removeAttrs args ["modules" "includeModuleSystemOptions"]); nvimModuleDocs = buildOptionsDocs { + variablelistId = "nvf-options"; + modules = import ../modules/modules.nix { inherit lib pkgs; check = false; } ++ [scrubbedPkgsModule]; - variablelistId = "neovim-flake-options"; }; - release-config = builtins.fromJSON (builtins.readFile ../release.json); - revision = "release-${release-config.release}"; # Generate the `man home-configuration.nix` package nvf-configuration-manual = - pkgs.runCommand "neovim-flake-reference-manpage" { + pkgs.runCommand "nvf-reference-manpage" { nativeBuildInputs = [pkgs.buildPackages.installShellFiles pkgs.nixos-render-docs]; allowedReferences = ["out"]; } '' # Generate manpages. mkdir -p $out/share/man/man5 mkdir -p $out/share/man/man1 + nixos-render-docs -j $NIX_BUILD_CORES options manpage \ --revision ${revision} \ + --header ${./man/header.5} \ + --footer ${./man/footer.5} \ ${nvimModuleDocs.optionsJSON}/share/doc/nixos/options.json \ - $out/share/man/man5/neovim-flake.5 - cp ${./neovim-flake.1} $out/share/man/man1/neovim-flake.1 + $out/share/man/man5/nvf.5 + + cp ${./man/nvf.1} $out/share/man/man1/nvf.1 ''; + # Generate the HTML manual pages - neovim-flake-manual = pkgs.callPackage ./manual.nix { - inherit revision; - outputPath = "share/doc/neovim-flake"; - nmd = nmdSrc; + nvf-manual = pkgs.callPackage ./manual.nix { + inherit revision manpageUrls; + outputPath = "share/doc/nvf"; options = { - neovim-flake = nvimModuleDocs.optionsJSON; + nvf = nvimModuleDocs.optionsJSON; }; }; - html = neovim-flake-manual; + + html = nvf-manual; htmlOpenTool = pkgs.callPackage ./html-open-tool.nix {} {inherit html;}; in { - inherit nmdSrc; + inherit (inputs) nmd; options = { # TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream # `nixosOptionsDoc` is more customizable. json = pkgs.runCommand "options.json" { - meta.description = "List of Home Manager options in JSON format"; + meta.description = "List of nvf options in JSON format"; } '' mkdir -p $out/{share/doc,nix-support} - cp -a ${nvimModuleDocs.optionsJSON}/share/doc/nixos $out/share/doc/neovim-flake + cp -a ${nvimModuleDocs.optionsJSON}/share/doc/nixos $out/share/doc/nvf substitute \ ${nvimModuleDocs.optionsJSON}/nix-support/hydra-build-products \ $out/nix-support/hydra-build-products \ --replace \ '${nvimModuleDocs.optionsJSON}/share/doc/nixos' \ - "$out/share/doc/neovim-flake" + "$out/share/doc/nvf" ''; }; diff --git a/docs/footer.5 b/docs/footer.5 deleted file mode 100644 index f2c7cfd..0000000 --- a/docs/footer.5 +++ /dev/null @@ -1,3 +0,0 @@ -.SH "AUTHORS" -.PP -neovim-flake contributors diff --git a/docs/highlight-style.css b/docs/highlight-style.css deleted file mode 100644 index d5fbcef..0000000 --- a/docs/highlight-style.css +++ /dev/null @@ -1,8 +0,0 @@ -pre { - padding: 0; -} - -pre code.hljs { - border: none; - margin: 0; -} diff --git a/docs/html-open-tool.nix b/docs/html-open-tool.nix index 0eeb9fe..756feba 100644 --- a/docs/html-open-tool.nix +++ b/docs/html-open-tool.nix @@ -4,7 +4,7 @@ symlinkJoin, }: { html, - pathName ? "neovim-flake", + pathName ? "nvf", projectName ? pathName, name ? "${pathName}-help", }: let diff --git a/docs/man/footer.5 b/docs/man/footer.5 new file mode 100644 index 0000000..f73fbeb --- /dev/null +++ b/docs/man/footer.5 @@ -0,0 +1,3 @@ +.SH "AUTHORS" +.PP +nvf contributors diff --git a/docs/header.5 b/docs/man/header.5 similarity index 53% rename from docs/header.5 rename to docs/man/header.5 index e3307ed..a28fc3d 100644 --- a/docs/header.5 +++ b/docs/man/header.5 @@ -1,4 +1,4 @@ -.TH "neovim-flake" "5" "01/01/1980" "neovim-flake" +.TH "nvf" "5" "01/01/1980" "nvf" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -6,9 +6,8 @@ .\" enable line breaks after slashes .cflags 4 / .SH "NAME" -neovim-flake configuration specification +nvf configuration specification .SH "OPTIONS" .PP -You can use the following options in -home\-configuration\&.nix: +You can use the following options to configure nvf: .PP diff --git a/docs/neovim-flake.1 b/docs/man/nvf.1 similarity index 50% rename from docs/neovim-flake.1 rename to docs/man/nvf.1 index 54aab90..0f1e36d 100644 --- a/docs/neovim-flake.1 +++ b/docs/man/nvf.1 @@ -1,6 +1,6 @@ .Dd January 1, 1980 -.Dt neovim-flake 1 -.Os neovim-flake +.Dt nvf 1 +.Os nvf .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -8,22 +8,26 @@ .\" enable line breaks after slashes .cflags 4 / .Sh NAME -.Nm neovim-flake -.Nd a extensible and distro-agonistic Neovim configuration wrapper in Nix +.Nm nvf +.Nd A highly modular, extensible and distro-agnostic Neovim configuration framework for Nix/NixOS. . .Sh BUGS .Pp -Please report any bugs on the +Please report any bugs that you might encounter on the \m[blue]\fBproject issue tracker\fR\m[]\&. +.Sh SEE ALSO +.Pp +\fBnvf\fR(5) + .Sh AUTHOR .Pp -\fBneovim-flake contributors\fR +\fBnvf contributors\fR .RS 4 Author. .RE .Sh COPYRIGHT .br -Copyright \(co 2017\(en2022 neovim-flake contributors +Copyright \(co 2023\(en2024 nvf contributors .br diff --git a/docs/manual.nix b/docs/manual.nix index 6455e73..14e8ae2 100644 --- a/docs/manual.nix +++ b/docs/manual.nix @@ -1,54 +1,57 @@ { - stdenv, lib, - documentation-highlighter, - nmd, - revision, - outputPath ? "share/doc/neovim-flake", - options, + stdenvNoCC, + # build inputs nixos-render-docs, + documentation-highlighter, + # nrd configuration + manpageUrls, + revision, + options, + outputPath ? "share/doc/nvf", }: -stdenv.mkDerivation { - name = "neovim-flake-manual"; - src = ./manual; +stdenvNoCC.mkDerivation { + name = "nvf-manual"; + src = builtins.path { + path = lib.sourceFilesBySuffices ./manual [".md"]; + name = "nvf-manual"; + }; nativeBuildInputs = [nixos-render-docs]; buildPhase = '' - mkdir -p out/media + mkdir -p out/{highlightjs,media} - mkdir -p out/highlightjs - cp -t out/highlightjs \ + cp -vt out/highlightjs \ ${documentation-highlighter}/highlight.pack.js \ ${documentation-highlighter}/LICENSE \ ${documentation-highlighter}/mono-blue.css \ ${documentation-highlighter}/loader.js substituteInPlace ./options.md \ - --replace \ - '@OPTIONS_JSON@' \ - ${options.neovim-flake}/share/doc/nixos/options.json + --subst-var-by \ + OPTIONS_JSON \ + ${options.nvf}/share/doc/nixos/options.json substituteInPlace ./manual.md \ - --replace \ - '@VERSION@' \ + --subst-var-by \ + NVF_VERSION \ ${revision} - cp -v ${nmd}/static/style.css out/style.css - cp -vt out/highlightjs ${nmd}/static/highlightjs/tomorrow-night.min.css - cp -v ${./highlight-style.css} out/highlightjs/highlight-style.css + # copy stylesheet + cp ${./static/style.css} out/style.css + # copy release notes cp -vr ${./release-notes} release-notes + # generate manual from nixos-render-docs manual html \ - --manpage-urls ./manpage-urls.json \ + --manpage-urls ${manpageUrls} \ --revision ${lib.trivial.revisionWithDefault revision} \ --stylesheet style.css \ - --stylesheet highlightjs/tomorrow-night.min.css \ - --stylesheet highlightjs/highlight-style.css \ --script highlightjs/highlight.pack.js \ --script highlightjs/loader.js \ - --toc-depth 1 \ + --toc-depth 2 \ --section-toc-depth 1 \ manual.md \ out/index.xhtml diff --git a/docs/manual/configuring.md b/docs/manual/configuring.md new file mode 100644 index 0000000..8f5e240 --- /dev/null +++ b/docs/manual/configuring.md @@ -0,0 +1,8 @@ +# Configuring nvf {#ch-configuring} + +```{=include=} chapters +configuring/custom-package.md +configuring/custom-plugins.md +configuring/languages.md +configuring/dags.md +``` diff --git a/docs/manual/configuring/custom-package.md b/docs/manual/configuring/custom-package.md new file mode 100644 index 0000000..51d996b --- /dev/null +++ b/docs/manual/configuring/custom-package.md @@ -0,0 +1,22 @@ +# Custom Neovim Package {#ch-custom-package} + +As of v0.5, you may now specify the Neovim package that will be wrapped with +your configuration. This is done with the `vim.package` option. + +```nix +{inputs, pkgs, ...}: { + # using the neovim-nightly overlay + vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim; +} +``` + +The neovim-nightly-overlay always exposes an unwrapped package. If using a +different source, you are highly recommended to get an "unwrapped" version of +the neovim package, similar to `neovim-unwrapped` in nixpkgs. + +```nix +{ pkgs, ...}: { + # using the neovim-nightly overlay + vim.package = pkgs.neovim-unwrapped; +} +``` diff --git a/docs/manual/configuring/custom-plugins.md b/docs/manual/configuring/custom-plugins.md new file mode 100644 index 0000000..3bcd324 --- /dev/null +++ b/docs/manual/configuring/custom-plugins.md @@ -0,0 +1,25 @@ +# Custom Plugins {#ch-custom-plugins} + +**nvf**, by default, exposes a wide variety of plugins as module options +for your convience and bundles necessary dependencies into **nvf**'s runtime. +In case a plugin is not available in **nvf**, you may consider making a pull +request to **nvf** to include it as a module or you may add it to your +configuration locally. + +## Adding Plugins {#ch-adding-plugins} + +There are multiple ways of adding custom plugins to your **nvf** configuration. + +You can use custom plugins, before they are implemented in the flake. To add a +plugin to the runtime, you need to add it to the `vim.startPlugins` list in +your configuration. + +Adding a plugin to `startPlugins` will not allow you to configure the plugin +that you have adeed, but **nvf** provides multiple way of configuring any +custom plugins that you might have added to your configuration. + +```{=include=} sections +custom-plugins/configuring.md +custom-plugins/new-method.md +custom-plugins/old-method.md +``` diff --git a/docs/manual/configuring/custom-plugins/configuring.md b/docs/manual/configuring/custom-plugins/configuring.md new file mode 100644 index 0000000..da6274d --- /dev/null +++ b/docs/manual/configuring/custom-plugins/configuring.md @@ -0,0 +1,26 @@ +# Configuring {#sec-configuring-plugins} + +Just making the plugin to your Neovim configuration available might not always +be enough. In that case, you can write custom vimscript or lua config, using +either `config.vim.configRC` or `config.vim.luaConfigRC` respectively. Both of +these options are attribute sets, and you need to give the configuration you're +adding some name, like this: + +```nix +{ + # this will create an "aquarium" section in your init.vim with the contents of your custom config + # which will be *appended* to the rest of your configuration, inside your init.vim + config.vim.configRC.aquarium = "colorscheme aquiarum"; +} +``` + +:::{.note} +If your configuration needs to be put in a specific place in the config, you +can use functions from `inputs.nvf.lib.nvim.dag` to order it. Refer to +https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix +to find out more about the DAG system. +::: + +If you successfully made your plugin work, please feel free to create a PR to +add it to **nvf** or open an issue with your findings so that we can make it +available for everyone easily. diff --git a/docs/manual/custom-plugins/new-method.md b/docs/manual/configuring/custom-plugins/new-method.md similarity index 66% rename from docs/manual/custom-plugins/new-method.md rename to docs/manual/configuring/custom-plugins/new-method.md index 66523fd..200ba5e 100644 --- a/docs/manual/custom-plugins/new-method.md +++ b/docs/manual/configuring/custom-plugins/new-method.md @@ -1,8 +1,8 @@ # New Method {#sec-new-method} -As of version 0.5, we have a more extensive API for configuring plugins, under `vim.extraPlugins`. - -Instead of using DAGs exposed by the library, you may use the extra plugin module as follows: +As of version **0.5**, we have a more extensive API for configuring plugins, +under `vim.extraPlugins`. Instead of using DAGs exposed by the library, you may +use the extra plugin module as follows: ```nix { diff --git a/docs/manual/configuring/custom-plugins/old-method.md b/docs/manual/configuring/custom-plugins/old-method.md new file mode 100644 index 0000000..3b9d090 --- /dev/null +++ b/docs/manual/configuring/custom-plugins/old-method.md @@ -0,0 +1,35 @@ +# Old Method {#sec-old-method} + +Prior to version 0.5, the method of adding new plugins was adding the plugin +package to `vim.startPlugins` and add its configuration as a DAG under one of +`vim.configRC` or `vim.luaConfigRC`. Users who have not yet updated to 0.5, or +prefer a more hands-on approach may use the old method where the load order of +the plugins is determined by DAGs. + +## Adding plugins {#sec-adding-plugins} + +To add a plugin to **nvf**'s runtime, you may add it + +```nix +{pkgs, ...}: { + # add a package from nixpkgs to startPlugins + vim.startPlugins = [ + pkgs.vimPlugins.aerial-nvim ]; +} +``` + +And to configure the added plugin, you can use the `luaConfigRC` option to +provide configuration as a DAG using the **nvf** extended library. + +```nix +{inputs, ...}: let + # assuming you have an input called nvf pointing at the nvf repository + inherit (inputs.nvf.lib.nvim.dag) entryAnywhere; +in { + vim.luaConfigRC.aerial-nvim= entryAnywhere '' + require('aerial').setup { + -- your configuration here + } + ''; +} +``` diff --git a/docs/manual/configuring/dags.md b/docs/manual/configuring/dags.md new file mode 100644 index 0000000..77817cb --- /dev/null +++ b/docs/manual/configuring/dags.md @@ -0,0 +1,185 @@ +# Using DAGs {#ch-using-dags} + +We conform to the NixOS options types for the most part, however, a noteworthy +addition for certain options is the [**DAG +(Directed acyclic graph)**](https://en.wikipedia.org/wiki/Directed_acyclic_graph) +type which is borrowed from home-manager's extended library. This type is most +used for topologically sorting strings. The DAG type allows the attribute set +entries to express dependency relations among themselves. This can, for +example, be used to control the order of configuration sections in your +`configRC` or `luaConfigRC`. + +The below section, mostly taken from the [home-manager +manual](https://raw.githubusercontent.com/nix-community/home-manager/master/docs/manual/writing-modules/types.md) +explains in more detail the overall usage logic of the DAG type. + +## entryAnywhere {#sec-types-dag-entryAnywhere} + +> `lib.dag.entryAnywhere (value: T) : DagEntry` + +Indicates that `value` can be placed anywhere within the DAG. +This is also the default for plain attribute set entries, that +is + +```nix +foo.bar = { + a = lib.dag.entryAnywhere 0; +} +``` + +and + +```nix +foo.bar = { + a = 0; +} +``` + +are equivalent. + +## entryAfter {#ch-types-dag-entryAfter} + +> `lib.dag.entryAfter (afters: list string) (value: T) : DagEntry` + +Indicates that `value` must be placed _after_ each of the +attribute names in the given list. For example + +```nix +foo.bar = { + a = 0; + b = lib.dag.entryAfter [ "a" ] 1; +} +``` + +would place `b` after `a` in the graph. + +## entryBefore {#ch-types-dag-entryBefore} + +> `lib.dag.entryBefore (befores: list string) (value: T) : DagEntry` + +Indicates that `value` must be placed _before_ each of the +attribute names in the given list. For example + +```nix +foo.bar = { + b = lib.dag.entryBefore [ "a" ] 1; + a = 0; +} +``` + +would place `b` before `a` in the graph. + +## entryBetween {#sec-types-dag-entryBetween} + +> `lib.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry` + +Indicates that `value` must be placed _before_ the attribute +names in the first list and _after_ the attribute names in the +second list. For example + +```nix +foo.bar = { + a = 0; + c = lib.dag.entryBetween [ "b" ] [ "a" ] 2; + b = 1; +} +``` + +would place `c` before `b` and after `a` in the graph. + +There are also a set of functions that generate a DAG from a list. +These are convenient when you just want to have a linear list of DAG +entries, without having to manually enter the relationship between +each entry. Each of these functions take a `tag` as argument and the +DAG entries will be named `${tag}-${index}`. + +## entriesAnywhere {#sec-types-dag-entriesAnywhere} + +> `lib.dag.entriesAnywhere (tag: string) (values: [T]) : Dag` + +Creates a DAG with the given values with each entry labeled +using the given tag. For example + +```nix +foo.bar = lib.dag.entriesAnywhere "a" [ 0 1 ]; +``` + +is equivalent to + +```nix +foo.bar = { + a-0 = 0; + a-1 = lib.dag.entryAfter [ "a-0" ] 1; +} +``` + +## entriesAfter {#sec-types-dag-entriesAfter} + +> `lib.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag` + +Creates a DAG with the given values with each entry labeled +using the given tag. The list of values are placed are placed +_after_ each of the attribute names in `afters`. For example + +```nix +foo.bar = + { b = 0; } // lib.dag.entriesAfter "a" [ "b" ] [ 1 2 ]; +``` + +is equivalent to + +```nix +foo.bar = { + b = 0; + a-0 = lib.dag.entryAfter [ "b" ] 1; + a-1 = lib.dag.entryAfter [ "a-0" ] 2; +} +``` + +## entriesBefore {#sec-types-dag-entriesBefore} + +> `lib.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag` + +Creates a DAG with the given values with each entry labeled +using the given tag. The list of values are placed _before_ each +of the attribute names in `befores`. For example + +```nix + foo.bar = + { b = 0; } // lib.dag.entriesBefore "a" [ "b" ] [ 1 2 ]; +``` + +is equivalent to + +```nix +foo.bar = { + b = 0; + a-0 = 1; + a-1 = lib.dag.entryBetween [ "b" ] [ "a-0" ] 2; +} +``` + +## entriesBetween {#sec-types-dag-entriesBetween} + +> `lib.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag` + +Creates a DAG with the given values with each entry labeled +using the given tag. The list of values are placed _before_ each +of the attribute names in `befores` and _after_ each of the +attribute names in `afters`. For example + +```nix +foo.bar = + { b = 0; c = 3; } // lib.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ]; +``` + +is equivalent to + +```nix +foo.bar = { + b = 0; + c = 3; + a-0 = lib.dag.entryAfter [ "c" ] 1; + a-1 = lib.dag.entryBetween [ "b" ] [ "a-0" ] 2; +} +``` diff --git a/docs/manual/languages.md b/docs/manual/configuring/languages.md similarity index 79% rename from docs/manual/languages.md rename to docs/manual/configuring/languages.md index 1508318..0e54342 100644 --- a/docs/manual/languages.md +++ b/docs/manual/configuring/languages.md @@ -1,6 +1,10 @@ # Language Support {#ch-languages} -Language specific support means there is a combination of language specific plugins, `treesitter` support, `nvim-lspconfig` language servers, and `null-ls` integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have sections under the `vim.languages` attribute. See the configuration docs for details. +Language specific support means there is a combination of language specific +plugins, `treesitter` support, `nvim-lspconfig` language servers, and `null-ls` +integration. This gets you capabilities ranging from autocompletion to formatting +to diagnostics. The following languages have sections under the `vim.languages` +attribute. - Rust: [vim.languages.rust.enable](#opt-vim.languages.rust.enable) - Nix: [vim.languages.nix.enable](#opt-vim.languages.nix.enable) diff --git a/docs/manual/configuring/languages/lsp.md b/docs/manual/configuring/languages/lsp.md new file mode 100644 index 0000000..b7a9d07 --- /dev/null +++ b/docs/manual/configuring/languages/lsp.md @@ -0,0 +1,18 @@ +# LSP Custom Packages/Command {#sec-languages-custom-lsp-packages} + +In any of the `opt.languages..lsp.package` options you can provide +your own LSP package, or provide the command to launch the language server, as +a list of strings. You can use this to skip automatic installation of a language +server, and instead use the one found in your `$PATH` during runtime, for +example: + +```nix +vim.languages.java = { + lsp = { + enable = true; + # this expects jdt-language-server to be in your PATH + # or in `vim.extraPackages` + package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"]; + }; +} +``` diff --git a/docs/manual/custom-configs.md b/docs/manual/custom-configs.md deleted file mode 100644 index d2b3dc5..0000000 --- a/docs/manual/custom-configs.md +++ /dev/null @@ -1,63 +0,0 @@ -# Custom Configuration {#ch-custom-configuration} - -Custom configuration is done with the `neovimConfiguration` while using the flake as a standalone package. -It takes in the configuration as a module. The output of the configuration function is an attrset. - -```nix -{ - options = "The options that were available to configure"; - config = "The outputted configuration"; - pkgs = "The package set used to evaluate the module"; - neovim = "The built neovim package"; -} -``` - -The following is an example of a barebones vim configuration with the default theme enabled. - -```nix -{ - inputs.neovim-flake = { - url = "github:notashelf/neovim-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = {nixpkgs, neovim-flake, ...}: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - configModule = { - # Add any custom options (and feel free to upstream them!) - # options = ... - - config.vim = { - theme.enable = true; - }; - }; - - customNeovim = neovim-flake.lib.neovimConfiguration { - modules = [configModule]; - inherit pkgs; - }; - in { - # this will make the package available as a flake input - packages.${system}.neovim = customNeovim.neovim; - - # this is an example nixosConfiguration using the built neovim package - nixosConfigurations = { - yourHostName = nixpkgs.lib.nixosSystem { - # ... - modules = [ - ./configuration.nix # or whatever your configuration is - - # this will make wrapped neovim available in your system packages - {environment.systemPackages = [customNeovim.neovim];} - ]; - # ... - }; - }; - }; -} -``` - -Your built neovim configuration can be exposed as a flake output, or be added to your system packages to make -it available across your system. You may also consider passing the flake output to home-manager to make it available -to a specific user _without_ using the home-manager module. diff --git a/docs/manual/custom-package.md b/docs/manual/custom-package.md deleted file mode 100644 index 8fc0048..0000000 --- a/docs/manual/custom-package.md +++ /dev/null @@ -1,12 +0,0 @@ -# Custom Neovim Package {#ch-custom-package} - -As of v0.5, you may now specify the neovim package that will be wrapped with your configuration. This is done with the `vim.package` option. - -```nix -{inputs, pkgs, ...}: { - # using the neovim-nightly overlay - config.vim.package = inputs.neovim-overlay.packages.${pkgs.system}.neovim; -} -``` - -The neovim-nightly-overlay always exposes an unwrapped package. If using a different source, you are highly recommended to get an "unwrapped" version of the neovim package,similar to `neovim-unwrapped` in nixpkgs. diff --git a/docs/manual/custom-plugins.md b/docs/manual/custom-plugins.md deleted file mode 100644 index e377918..0000000 --- a/docs/manual/custom-plugins.md +++ /dev/null @@ -1,10 +0,0 @@ -# Custom Plugins {#ch-custom-plugins} - -You can use custom plugins, before they are implemented in the flake. -To add a plugin, you need to add it to your config's `config.vim.startPlugins` array. - -```{=include=} sections -custom-plugins/new-method.md -custom-plugins/old-method.md -custom-plugins/configuring.md -``` diff --git a/docs/manual/custom-plugins/configuring.md b/docs/manual/custom-plugins/configuring.md deleted file mode 100644 index 2217ce8..0000000 --- a/docs/manual/custom-plugins/configuring.md +++ /dev/null @@ -1,23 +0,0 @@ -# Configuring {#configuring-plugins} - -Just making the plugin to your neovim configuration available might not always be enough. -In that case, you can write custom vimscript or lua config, using `config.vim.configRC` or `config.vim.luaConfigRC` -respectively. These options are attribute sets, and you need to give the configuration you're adding some name, like this: - -```nix -{ - # this will create an "aquarium" section in your init.vim with the contents of your custom config - # which will be *appended* to the rest of your configuration, inside your init.vim - config.vim.configRC.aquarium = "colorscheme aquiarum"; -} -``` - -:::{.note} -If your configuration needs to be put in a specific place in the config, you can use functions from -`inputs.neovim-flake.lib.nvim.dag` to order it. -Refer to https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix to find out more about -the DAG system. -::: - -Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue -with your findings so that we can make it available for everyone easily. diff --git a/docs/manual/custom-plugins/old-method.md b/docs/manual/custom-plugins/old-method.md deleted file mode 100644 index 0984338..0000000 --- a/docs/manual/custom-plugins/old-method.md +++ /dev/null @@ -1,18 +0,0 @@ -# Old Method {#sec-old-method} - -Users who have not yet updated to 0.5, or prefer a more hands-on approach may use the old method where the load order -of the plugins is determined by DAGs. - -```nix -{ - # fetch plugin source from GitHub and add it to startPlugins - config.vim.startPlugins = [ - (pkgs.fetchFromGitHub { - owner = "FrenzyExists"; - repo = "aquarium-vim"; - rev = "d09b1feda1148797aa5ff0dbca8d8e3256d028d5"; - sha256 = "CtyEhCcGxxok6xFQ09feWpdEBIYHH+GIFVOaNZx10Bs="; - }) - ]; -} -``` diff --git a/docs/manual/default-configs.md b/docs/manual/default-configs.md index fff6a19..60f3d69 100644 --- a/docs/manual/default-configs.md +++ b/docs/manual/default-configs.md @@ -1,10 +1,9 @@ # Default Configs {#ch-default-configs} -While you can configure neovim-flake yourself using the builder, you can also use the pre-built configs that are available. +While you can configure **nvf** yourself using the builder, you can also use the pre-built configs that are available. Here are a few default configurations you can use. -```{=include=} sections +```{=include=} chapters default-configs/maximal.md default-configs/nix.md -default-configs/tidal.md ``` diff --git a/docs/manual/default-configs/maximal.md b/docs/manual/default-configs/maximal.md index 78b8e25..49f9569 100644 --- a/docs/manual/default-configs/maximal.md +++ b/docs/manual/default-configs/maximal.md @@ -1,13 +1,13 @@ # Maximal {#sec-default-maximal} ```bash -$ nix shell github:notashelf/neovim-flake#maximal test.nix +$ nix shell github:notashelf/nvf#maximal test.nix ``` -It is the same fully configured neovim as with the [Nix](#sec-default-nix) config, but with every supported language enabled. - -:::{.note} - -Running the maximal config will download _a lot_ of packages as it is downloading language servers, formatters, and more. +It is the same fully configured Neovim as with the [Nix](#sec-default-nix) +configuration, but with every supported language enabled. +::: {.note} +Running the maximal config will download _a lot_ of packages as it is +downloading language servers, formatters, and more. ::: diff --git a/docs/manual/default-configs/nix.md b/docs/manual/default-configs/nix.md index 6afe386..5210ef3 100644 --- a/docs/manual/default-configs/nix.md +++ b/docs/manual/default-configs/nix.md @@ -1,7 +1,9 @@ # Nix {#sec-default-nix} ```bash -$ nix run github:notashelf/neovim-flake#nix test.nix +$ nix run github:notashelf/nvf#nix test.nix ``` -Enables all the of neovim plugins, with language support for specifically Nix. This lets you see what a fully configured neovim setup looks like without downloading a whole bunch of language servers and associated tools. +Enables all the of Neovim plugins, with language support for specifically Nix. +This lets you see what a fully configured neovim setup looks like without +downloading a whole bunch of language servers and associated tools. diff --git a/docs/manual/default-configs/tidal.md b/docs/manual/default-configs/tidal.md deleted file mode 100644 index f931fd3..0000000 --- a/docs/manual/default-configs/tidal.md +++ /dev/null @@ -1,12 +0,0 @@ -# Tidal Cycles {#sec-default-tidal} - -```bash -$ nix run github:notashelf/neovim-flake#tidal file.tidal -``` - -Utilizing [vim-tidal](https://github.com/tidalcycles/vim-tidal) and mitchmindtree's fantastic -[tidalcycles.nix](https://github.com/mitchmindtree/tidalcycles.nix) start playing with tidal cycles in a single command. - -In your tidal file, type a cycle e.g. `d1 $ s "drum"` and then press _ctrl+enter_. Super collider with superdirt, and a -modified GHCI with tidal will start up and begin playing. Note, you need jack enabled on your system. If you are using -pipewire, its as easy as setting `services.pipewire.jack.enable = true` in your configuration. diff --git a/docs/manual/hacking.md b/docs/manual/hacking.md index b9a223c..394022b 100644 --- a/docs/manual/hacking.md +++ b/docs/manual/hacking.md @@ -1,14 +1,14 @@ -# Hacking neovim-flake {#ch-hacking} +# Hacking nvf {#ch-hacking} -neovim-flake is designed for developers as much as it is for the end user. I would like any potential contributor +**nvf** is designed for developers as much as it is for the end user. I would like any potential contributor to be able to propagate their desired changes into the repository without the extra effort. As such, below are guides (and guidelines) to streamline the contribution process and ensure that your valuable input seamlessly integrates -into neovim-flake's development without leaving question marks in your head. +into **nvf**'s development without leaving question marks in your head. -This section is mainly directed towards those who wish to contribute code into neovim-flake. If you wish to instead +This section is mainly directed towards those who wish to contribute code into **nvf**. If you wish to instead report a bug or discuss a potential feature implementation, first look among the -already [open issues](https://github.com/notashelf/neovim-flake/issues) and if no matching issue exists you may open -a [new issue](https://github.com/notashelf/neovim-flake/issues/new) and describe your problem/request. While creating an +already [open issues](https://github.com/notashelf/nvf/issues) and if no matching issue exists you may open +a [new issue](https://github.com/notashelf/nvf/issues/new) and describe your problem/request. While creating an issue, please try to include as much information as you can, ideally also include relevant context in which an issue occurs or a feature should be implemented. diff --git a/docs/manual/hacking/additional-plugins.md b/docs/manual/hacking/additional-plugins.md index c70727d..7c80215 100644 --- a/docs/manual/hacking/additional-plugins.md +++ b/docs/manual/hacking/additional-plugins.md @@ -1,13 +1,14 @@ # Adding Plugins {#sec-additional-plugins} -To add a new neovim plugin, first add the source url in the inputs section of `flake.nix` +To add a new Neovim plugin, first add the source url in the inputs section of `flake.nix` +with the prefix `plugin-` ```nix { inputs = { # ... - neodev-nvim = { + plugin-neodev-nvim = { url = "github:folke/neodev.nvim"; flake = false; }; @@ -16,18 +17,110 @@ To add a new neovim plugin, first add the source url in the inputs section of `f } ``` -Then add the name of the plugin into the `availablePlugins` variable in `lib/types/plugins.nix`: +The addition of the `plugin-` prefix will allow **nvf** to autodiscover the +input from the flake inputs automatically, allowing you to refer to it in areas +that require a very specific plugin type as defined in `lib/types/plugins.nix` -```nix -# ... -availablePlugins = [ - # ... - "neodev-nvim" -]; -``` - -You can now reference this plugin using its string name: +You can now reference this plugin using its string name, the plugin will be +built with the name and source URL from the flake input, allowing you to +refer to it as a **string**. ```nix config.vim.startPlugins = ["neodev-nvim"]; ``` + +## Modular setup options {#sec-modular-setup-options} + +Most plugins is initialized with a call to `require('plugin').setup({...})`. + +We use a special function that lets you easily add support for such setup options in a modular way: +`mkPluginSetupOption`. + +Once you have added the source of the plugin as shown above, you can define the setup options like +this: + +```nix +# in modules/.../your-plugin/your-plugin.nix + +{lib, ...}: +let + inherit (lib.types) bool int; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.your-plugin = { + setupOpts = mkPluginSetupOption "plugin name" { + enable_feature_a = mkOption { + type = bool; + default = false; + # ... + }; + + number_option = mkOption { + type = int; + default = 3; + # ... + }; + }; + }; +} +``` + +```nix +# in modules/.../your-plugin/config.nix +{lib, config, ...}: +let + cfg = config.vim.your-plugin; +in { + vim.luaConfigRC = lib.nvim.dag.entryAnywhere '' + require('plugin-name').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts}) + ''; +} +``` + +This above config will result in this lua script: + +```lua +require('plugin-name').setup({ + enable_feature_a = false, + number_option = 3, +}) +``` + +Now users can set any of the pre-defined option field, and can also add their own fields! + +```nix +# in user's config +{ + vim.your-plugin.setupOpts = { + enable_feature_a = true; + number_option = 4; + another_field = "hello"; + size = { # nested fields work as well + top = 10; + }; + }; +} +``` + +## Details of toLuaObject {#sec-details-of-toluaobject} + +As you've seen above, `toLuaObject` is used to convert our nix attrSet +`cfg.setupOpts`, into a lua table. Here are some rules of the conversion: + +1. nix `null` converts to lua `nil` +2. number and strings convert to their lua counterparts +3. nix attrSet/list convert into lua tables +4. you can write raw lua code using `lib.generators.mkLuaInline`. This + function is part of nixpkgs. + +Example: + +```nix +vim.your-plugin.setupOpts = { + on_init = lib.generators.mkLuaInline '' + function() + print('we can write lua!') + end + ''; +} +``` diff --git a/docs/manual/hacking/getting-started.md b/docs/manual/hacking/getting-started.md index 8d16681..72927dc 100644 --- a/docs/manual/hacking/getting-started.md +++ b/docs/manual/hacking/getting-started.md @@ -1,10 +1,16 @@ # Getting Started {#sec-contrib-getting-started} -You naturally would like to start by forking the repository. If you are new to git, have a look at GitHub's -[Fork a repo guide](https://help.github.com/articles/fork-a-repo/) for instructions on how you can do this. Once you have a fork of neovim-flake -you should create a branch starting at the most recent `main` branch. -Give your branch a reasonably descriptive name, suffixed by its type - i.e `feature/debugger` or `fix/pesky-bug`. +You, naturally, would like to start by forking the repository to get started. If +you are new to Git and GitHub, do have a look at GitHub's [Fork a repo guide](https://help.github.com/articles/fork-a-repo/) +for instructions on how you can do this. Once you have a fork of **nvf**, you +should create a separate branch based on the msot recent `main` branch. Give +your branch a reasonably descriptive name (e.g. `feature/debugger` or +`fix/pesky-bug`) and you are ready to work on your changes -Implement your changes and commit them to the newly created branch and when you are happy with the result and positive -that it fulfills [Guidelines](#sec-guidelines). Once you are confident everything is in order, push the branch to GitHub and -[create a pull request](https://help.github.com/articles/creating-a-pull-request), following the template that you will be prompted to fill. +Implement your changes and commit them to the newly created branch and when you +are happy with the result, and positive that it fullfills our [Contributing +Guidelines](#sec-guidelines), push the branch to GitHub and [create a pull +request](https://help.github.com/articles/creating-a-pull-request). The default +pull request template available on the **nvf** repository will guide you through +the rest of the process, and we'll gently nudge you in the correct direction if +there are any mistakes. diff --git a/docs/manual/hacking/guidelines.md b/docs/manual/hacking/guidelines.md index 3b57852..e0afe25 100644 --- a/docs/manual/hacking/guidelines.md +++ b/docs/manual/hacking/guidelines.md @@ -1,55 +1,65 @@ # Guidelines {#sec-guidelines} -If your contribution tightly follows the guidelines, then there is a good chance it will be merged without too much -trouble. Some of the guidelines will be strictly enforced, others will remain as gentle nudges towards the correct -direction. As we have no automated system enforcing those guidelines, please try to double check your changes before -making your pull request in order to avoid "faulty" code slipping by. +If your contribution tightly follows the guidelines, then there is a good chance +it will be merged without too much trouble. Some of the guidelines will be +strictly enforced, others will remain as gentle nudges towards the correct +direction. As we have no automated system enforcing those guidelines, please +try to double check your changes before making your pull request in order to +avoid "faulty" code slipping by. -If you are uncertain how these rules affect the change you would like to make then feel free to start a -discussion in the [discussions tab](https://github.com/NotAShelf/neovim-flake/discussions) ideally (but not necessarily) -before you start developing. +If you are uncertain how these rules affect the change you would like to make +then feel free to start a discussion in the [discussions tab](https://github.com/NotAShelf/nvf/discussions) +ideally (but not necessarily) before you start developing. ## Adding Documentation {#sec-guidelines-documentation} -Most, if not all, changes warrant changes to the documentation. Module options should be documented with -[Nixpkgs-flavoured Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup), albeit with exceptions. - -:::{.note} - -As of v0.5, neovim-flake is itself documented using full markdown in both module options and the manual. With -v0.6, this manual has also been converted to markdown in full. +Most, if not all, changes warrant changes to the documentation. Module options +should be documented with [Nixpkgs-flavoured Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup), +albeit with exceptions. +::: {.note} +As of **v0.5**, **nvf** is itself documented using full markdown in both module +options and the manual. With **v0.6**, this manual has also been converted to +markdown in full. ::: -The HTML version of this manual containing both the module option descriptions and the documentation of neovim-flake -(such as this page) can be generated and opened by typing the following in a shell within a clone of the -neovim-flake Git repository: +The HTML version of this manual containing both the module option descriptions +and the documentation of **nvf** (such as this page) can be generated and +opened by typing the following in a shell within a clone of the **nvf** Git +repository: ```console $ nix build .#docs-html -$ xdg-open $PWD/result/share/doc/neovim-flake/index.html +$ xdg-open $PWD/result/share/doc/nvf/index.html ``` ## Formatting Code {#sec-guidelines-formatting} -Make sure your code is formatted as described in [code-style section](#sec-guidelines-code-style). To maintain consistency throughout -the project you are encouraged to browse through existing code and adopt its style also in new code. +Make sure your code is formatted as described in [code-style +section](#sec-guidelines-code-style). To maintain consistency throughout the +project you are encouraged to browse through existing code and adopt its style +also in new code. ## Formatting Commits {#sec-guidelines-commit-message-style} -Similar to [code style guidelines](#sec-guidelines-code-style) we encourage a consistent commit message format as described -in [commit style guidelines](#sec-guidelines-commit-style). +Similar to [code style guidelines](#sec-guidelines-code-style) we encourage a +consistent commit message format as described in [commit style +guidelines](#sec-guidelines-commit-style). ## Commit Style {#sec-guidelines-commit-style} -The commits in your pull request should be reasonably self-contained. Which means each and every commit in -a pull request should make sense both on its own and in general context. That is, a second commit should not resolve -an issue that is introduced in an earlier commit. In particular, you will be asked to amend any commit that -introduces syntax errors or similar problems even if they are fixed in a later commit. +The commits in your pull request should be reasonably self-contained. Which +means each and every commit in a pull request should make sense both on its +own and in general context. That is, a second commit should not resolve an +issue that is introduced in an earlier commit. In particular, you will be +asked to amend any commit that introduces syntax errors or similar problems +even if they are fixed in a later commit. -The commit messages should follow the [seven rules](https://chris.beams.io/posts/git-commit/#seven-rule), -except for "Capitalize the subject line". We also ask you to include the affected code component or module in -the first line. A commit message ideally, but not necessarily, follow the given template from home-manager's own documentation +The commit messages should follow the [seven +rules](https://chris.beams.io/posts/git-commit/#seven-rule), except for +"Capitalize the subject line". We also ask you to include the affected code +component or module in the first line. A commit message ideally, but not +necessarily, follow the given template from home-manager's own documentation ``` {component}: {description} @@ -57,47 +67,63 @@ the first line. A commit message ideally, but not necessarily, follow the given {long description} ``` -where `{component}` refers to the code component (or module) your change affects, `{description}` is a very brief -description of your change, and `{long description}` is an optional clarifying description. As a rare exception, if -there is no clear component, or your change affects many components, then the `{component}` part is optional. -See [example commit message](#sec-guidelines-ex-commit-message) for a commit message that fulfills these requirements. +where `{component}` refers to the code component (or module) your change +affects, `{description}` is a very brief description of your change, and +`{long description}` is an optional clarifying description. As a rare +exception, if there is no clear component, or your change affects many +components, then the `{component}` part is optional. See [example commit +message](#sec-guidelines-ex-commit-message) for a commit message that +fulfills these requirements. ## Example Commit {#sec-guidelines-ex-commit-message} -The commit [69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef) contains the commit message +The commit [69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef) +in home-manager contains the following commit message. ``` - starship: allow running in Emacs if vterm is used The vterm buffer is backed by libvterm and can handle Starship prompts without issues. - ``` -Long description can be ommitted if the change is too simple to warrant it. A minor fix in spelling or a formatting -change does not warrant long description, however, a module addition or removal does as you would like to provide the -relevant context for your changes. +Similarly, if you are contributing to **nvf**, you would include the scope of +the commit followed by the description: -Finally, when adding a new module, say `modules/foo.nix`, we use the fixed commit format `foo: add module`. -You can, of course, still include a long description if you wish. +``` +languages/ruby: init module -In case of nested modules, i.e `modules/languages/java.nix` you are recommended to contain the parent as well - for -example `languages/java: some major change`. +Adds a language module for Ruby, adds appropriate formatters and Treesitter grammers +``` + +Long description can be ommitted if the change is too simple to warrant it. A +minor fix in spelling or a formatting change does not warrant long description, +however, a module addition or removal does as you would like to provide the +relevant context, i.e. the reasoning behind it, for your commit. + +Finally, when adding a new module, say `modules/foo.nix`, we use the fixed +commit format `foo: add module`. You can, of course, still include a long +description if you wish. + +In case of nested modules, i.e `modules/languages/java.nix` you are recommended +to contain the parent as well - for example `languages/java: some major change`. ## Code Style {#sec-guidelines-code-style} -**Treewide** -Keep lines at a reasonable width, ideally 80 characters or less. This also applies to string literals and module -descriptions and documentation. +### Treewide {#sec-code-style-treewide} -**Nix** -neovim-flake is formatted by the [alejandra](https://github.com/kamadorueda/alejandra) tool and the formatting is checked in the pull -request and push workflows. Run the `nix fmt` command inside the project repository before submitting your -pull request. +Keep lines at a reasonable width, ideally 80 characters or less. This also applies +to string literals and module descriptions and documentation. -While Alejandra is mostly opinionated on how code looks after formatting, certain changes are done at the -user's discretion based on how the original code was structured. +### Nix {#sec-code-style-nix} + +**nvf** is formatted by the [alejandra](https://github.com/kamadorueda/alejandra) +tool and the formatting is checked in the pull request and push workflows. Run the +`nix fmt` command inside the project repository before submitting your pull request. + +While Alejandra is mostly opinionated on how code looks after formatting, +certain changes are done at the user's discretion based on how the original +code was structured. Please use one line code for attribute sets that contain only one subset. For example: @@ -120,8 +146,8 @@ module = { } ``` -If you move a line down after the merge operator, Alejandra will automatically unfold the whole merged attrset -for you, which we **do not** want. +If you move a line down after the merge operator, Alejandra will automatically +unfold the whole merged attrset for you, which we **do not** want. ```nix module = { @@ -131,13 +157,12 @@ module = { } ``` -For lists, it is mostly up to your own discretion how you want to format them, but please try to unfold lists if -they contain multiple items and especially if they are to include comments. +For lists, it is mostly up to your own discretion how you want to format them, +but please try to unfold lists if they contain multiple items and especially +if they are to include comments. ```nix - # this is ok - acceptableList = [ item1 # comment item2 @@ -149,10 +174,12 @@ acceptableList = [ listToBeAvoided = [item1 item2 /* comment */ item3 item4]; # this is ok -acceptableList = [item1]; +acceptableList = [item1 item2]; -# this is not ok -listToBeAvoided = [ +# this is also ok if the list is expected to contain more elements +acceptableList= [ item1 + item2 + # more items if needed... ]; ``` diff --git a/docs/manual/hacking/keybinds.md b/docs/manual/hacking/keybinds.md index 6114274..f4a5149 100644 --- a/docs/manual/hacking/keybinds.md +++ b/docs/manual/hacking/keybinds.md @@ -1,8 +1,9 @@ # Keybinds {#sec-keybinds} -As of 0.4, there exists an API for writing your own keybinds and a couple of useful utility functions are available in -the [extended standard library](https://github.com/NotAShelf/neovim-flake/tree/main/lib). The following section contains -a general overview to how you may utilize said functions. +As of 0.4, there exists an API for writing your own keybinds and a couple of +useful utility functions are available in the [extended standard +library](https://github.com/NotAShelf/nvf/tree/main/lib). The following +section contains a general overview to how you may utilize said functions. ## Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings} @@ -36,44 +37,58 @@ An example, simple keybinding, can look like this: ``` There are many settings available in the options. Please refer to the -[documentation](https://notashelf.github.io/neovim-flake/options.html#opt-vim.maps.command._name_.action) +[documentation](https://notashelf.github.io/nvf/options.html#opt-vim.maps.command._name_.action) to see a list of them. -`neovim-flake` provides a list of helper commands, so that you don't have to write the mapping attribute sets every -time: +**nvf** provides a list of helper commands, so that you don't have to write the +mapping attribute sets every time: -- `mkBinding = key: action: desc:` - makes a basic binding, with `silent` set to true. -- `mkExprBinding = key: action: desc:` - makes an expression binding, with `lua`, `silent`, and `expr` set to true. -- `mkLuaBinding = key: action: desc:` - makes an expression binding, with `lua`, and `silent` set to true. +- `mkBinding = key: action: desc:` - makes a basic binding, with `silent` set + to true. +- `mkExprBinding = key: action: desc:` - makes an expression binding, with + `lua`, `silent`, and `expr` set to true. +- `mkLuaBinding = key: action: desc:` - makes an expression binding, with + `lua`, and `silent` set to true. -Note that the Lua in these bindings is actual Lua, not pasted into a `:lua` command. -Therefore, you either pass in a function like `require('someplugin').some_function`, without actually calling it, -or you define your own function, like `function() require('someplugin').some_function() end`. +Do note that the Lua in these bindings is actual Lua, and not pasted into a +`:lua` command. Therefore, you should either pass in a function like +`require('someplugin').some_function`, without actually calling it, or you +should define your own functions, for example -Additionally, to not have to repeat the descriptions, there's another utility function with its own set of functions: +```lua +function() + require('someplugin').some_function() +end +``` -Utility function that takes two attrsets: +Additionally, to not have to repeat the descriptions, there's another utility +function with its own set of functions: Utility function that takes two +attribute sets: - `{ someKey = "some_value" }` - `{ someKey = { description = "Some Description"; }; }` and merges them into `{ someKey = { value = "some_value"; description = "Some Description"; }; }` -``` +```nix addDescriptionsToMappings = actualMappings: mappingDefinitions: ``` -This function can be used in combination with the same `mkBinding` functions as above, except they only take two -arguments - `binding` and `action`, and have different names: +This function can be used in combination with the same `mkBinding` functions as +above, except they only take two arguments - `binding` and `action`, and have +different names: -- `mkSetBinding = binding: action:` - makes a basic binding, with `silent` set to true. -- `mkSetExprBinding = binding: action:` - makes an expression binding, with `lua`, `silent`, and `expr` set to true. -- `mkSetLuaBinding = binding: action:` - makes an expression binding, with `lua`, and `silent` set to true. +- `mkSetBinding = binding: action:` - makes a basic binding, with `silent` + set to true. +- `mkSetExprBinding = binding: action:` - makes an expression binding, with + `lua`, `silent`, and `expr` set to true. +- `mkSetLuaBinding = binding: action:` - makes an expression binding, with + `lua`, and `silent` set to true. -You can read the source code of some modules to see them in action, but their usage should look something like this: +You can read the source code of some modules to see them in action, but their +usage should look something like this: ```nix - # plugindefinition.nix {lib, ...}: with lib; { options.vim.plugin = { @@ -96,15 +111,13 @@ You can read the source code of some modules to see them in action, but their us }; } - ``` ```nix - # config.nix { - pkgs, config, + pkgs, lib, ... }: @@ -158,9 +171,8 @@ in { ``` -:::{.note} - -If you have come across a plugin that has an API that doesn't seem to easily allow custom keybindings, -don't be scared to implement a draft PR. We'll help you get it done. - +::: {.note} +If you have come across a plugin that has an API that doesn't seem to easily +allow custom keybindings, don't be scared to implement a draft PR. We'll help +you get it done. ::: diff --git a/docs/manual/hacking/testing.md b/docs/manual/hacking/testing.md index 2568ceb..10830b6 100644 --- a/docs/manual/hacking/testing.md +++ b/docs/manual/hacking/testing.md @@ -1,11 +1,15 @@ # Testing Changes {#sec-testing-changes} -Once you have made your changes, you will need to test them throughly. If it is a module, add your module option to -`configuration.nix` (located in the root of this project) inside `neovimConfiguration`. Enable it, and then run the -maximal configuration with `nix run .#maximal -Lv` to check for build errors. If neovim opens in the current directory -without any error messages (you can check the output of `:messages` inside neovim to see if there are any errors), then -your changes are good to go. Open your pull request, and it will be reviewed as soon as posssible. +Once you have made your changes, you will need to test them throughly. If it is +a module, add your module option to `configuration.nix` (located in the root of +this project) inside `neovimConfiguration`. Enable it, and then run the maximal +configuration with `nix run .#maximal -Lv` to check for build errors. If neovim +opens in the current directory without any error messages (you can check the +output of `:messages` inside neovim to see if there are any errors), then your +changes are good to go. Open your pull request, and it will be reviewed as soon +as posssible. -If it is not a new module, but a change to an existing one, then make sure the module you have changed is enabled in the -maximal configuration by editing `configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same procedure as -adding a new module will apply here. +If it is not a new module, but a change to an existing one, then make sure the +module you have changed is enabled in the maximal configuration by editing +`configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same procedure +as adding a new module will apply here. diff --git a/docs/manual/home-manager.md b/docs/manual/home-manager.md deleted file mode 100644 index 63c88ff..0000000 --- a/docs/manual/home-manager.md +++ /dev/null @@ -1,75 +0,0 @@ -# Home Manager {#ch-hm-module} - -The Home Manager module allows us to customize the different `vim` options from inside the home-manager configuration -and it is the preferred way of configuring neovim-flake, both on NixOS and non-NixOS systems. - -To use it, we first add the input flake. - -```nix -{ - neovim-flake = { - url = github:notashelf/neovim-flake; - # you can override input nixpkgs - inputs.nixpkgs.follows = "nixpkgs"; - # you can also override individual plugins - # i.e inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- obsidian nvim needs to be in your inputs - }; -} -``` - -Followed by importing the home-manager module somewhere in your configuration. - -```nix -{ - # assuming neovim-flake is in your inputs and inputs is in the argset - imports = [ inputs.neovim-flake.homeManagerModules.default ]; -} -``` - -An example installation for standalone home-manager would look like this: - -```nix -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - stylix.url = "github:notashelf/neovim-flake"; - }; - - outputs = { nixpkgs, home-manager, neovim-flake ... }: let - system = "x86_64-linux"; in { - # ↓ this is the home-manager output in the flake schema - homeConfigurations."yourUsername»" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - modules = [ - neovim-flake.homeManagerModules.default # <- this imports the home-manager module that provides the options - ./home.nix # your home-manager configuration, probably where you will want to add programs.neovim-flake options - ]; - }; - }; -} -``` - -Once the module is imported, we will be able to define the following options (and much more) from inside the -home-manager configuration. - -```nix{ - programs.neovim-flake = { - - enable = true; - # your settings need to go into the settings attribute set - # most settings are documented in the appendix - settings = { - vim.viAlias = false; - vim.vimAlias = true; - vim.lsp = { - enable = true; - }; - }; - }; -} -``` - -:::{.note} -You may find all avaliable options in the [appendix](https://notashelf.github.io/neovim-flake/options) -::: diff --git a/docs/manual/installation.md b/docs/manual/installation.md new file mode 100644 index 0000000..afe60d1 --- /dev/null +++ b/docs/manual/installation.md @@ -0,0 +1,11 @@ +# Installing nvf {#ch-installation} + +There are multiple ways of installing nvf on your system. You may either choose +the standalone installation method, which does not depend on a module system and may +be done on any system that has the Nix package manager or the appropriate modules +for NixOS and home-manager as described in the [module installation section](#ch-module-installation) + +```{=include=} chapters +installation/custom-configuration.md +installation/modules.md +``` diff --git a/docs/manual/installation/custom-configuration.md b/docs/manual/installation/custom-configuration.md new file mode 100644 index 0000000..408b039 --- /dev/null +++ b/docs/manual/installation/custom-configuration.md @@ -0,0 +1,19 @@ +# Standalone Installation {#ch-standalone-installation} + +It is possible to install **nvf** without depending on NixOS or home-manager as the parent +module system, using the `neovimConfiguration` function exposed by **nvf** extended library. +It takes in the configuration as a module, and returns an attribute set as a result. + +```nix +{ + options = "The options that were available to configure"; + config = "The outputted configuration"; + pkgs = "The package set used to evaluate the module"; + neovim = "The built neovim package"; +} +``` + +```{=include=} chapters +standalone/nixos.md +standalone/home-manager.md +``` diff --git a/docs/manual/installation/modules.md b/docs/manual/installation/modules.md new file mode 100644 index 0000000..d8462e9 --- /dev/null +++ b/docs/manual/installation/modules.md @@ -0,0 +1,6 @@ +# Module Installation {#ch-module-installation} + +```{=include=} chapters +modules/nixos.md +modules/home-manager.md +``` diff --git a/docs/manual/installation/modules/home-manager.md b/docs/manual/installation/modules/home-manager.md new file mode 100644 index 0000000..6764f79 --- /dev/null +++ b/docs/manual/installation/modules/home-manager.md @@ -0,0 +1,83 @@ +# Home-Manager Module {#ch-hm-module} + +The home-manager module allows us to customize the different `vim` options from +inside the home-manager configuration without having to call for the wrapper +yourself. It is the recommended way to use **nvf** alongside the NixOS module +depending on your needs. + +To use it, we first add the input flake. + +```nix +{ + inputs = { + obsidian-nvim.url = "github:epwalsh/obsidian.nvim"; + nvf = { + url = "github:notashelf/nvf"; + # you can override input nixpkgs + inputs.nixpkgs.follows = "nixpkgs"; + # you can also override individual plugins + # for example: + inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs + }; + }; +} +``` + +Followed by importing the home-manager module somewhere in your configuration. + +```nix +{ + # assuming nvf is in your inputs and inputs is in the argset + # see example below + imports = [ inputs.nvf.homeManagerModules.default ]; +} +``` + +## Example Installation {#sec-example-installation-hm} + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + nvf.url = "github:notashelf/nvf"; + }; + + outputs = { nixpkgs, home-manager, nvf, ... }: let + system = "x86_64-linux"; in { + # ↓ this is your home output in the flake schema, expected by home-manager + "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration + modules = [ + nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options + ./home.nix # <- your home entrypoint + ]; + }; + }; +} +``` + +Once the module is properly imported by your host, you will be able to use the +`programs.nvf` module option anywhere in your configuration in order to +configure **nvf**. + +```nix{ + programs.nvf = { + enable = true; + # your settings need to go into the settings attribute set + # most settings are documented in the appendix + settings = { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + }; + }; + }; +} +``` + +::: {.note} +**nvf** exposes a lot of options, most of which are not referenced in the +installation sections of the manual. You may find all avaliable options +in the [appendix](https://notashelf.github.io/nvf/options) +::: diff --git a/docs/manual/installation/modules/nixos.md b/docs/manual/installation/modules/nixos.md new file mode 100644 index 0000000..9cbc144 --- /dev/null +++ b/docs/manual/installation/modules/nixos.md @@ -0,0 +1,82 @@ +# NixOS Module {#ch-nixos-module} + +The NixOS module allows us to customize the different `vim` options from inside +the NixOS configuration without having to call for the wrapper yourself. It is +the recommended way to use **nvf** alongside the home-manager module depending +on your needs. + +To use it, we first add the input flake. + +```nix +{ + inputs = { + obsidian-nvim.url = "github:epwalsh/obsidian.nvim"; + nvf = { + url = "github:notashelf/nvf"; + # you can override input nixpkgs + inputs.nixpkgs.follows = "nixpkgs"; + # you can also override individual plugins + # for example: + inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs + }; + }; +} +``` + +Followed by importing the NixOS module somewhere in your configuration. + +```nix +{ + # assuming nvf is in your inputs and inputs is in the argset + # see example below + imports = [ inputs.nvf.nixosModules.default ]; +} +``` + +## Example Installation {#sec-example-installation-nixos} + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nvf.url = "github:notashelf/nvf"; + }; + + outputs = { nixpkgs, nvf, ... }: let + system = "x86_64-linux"; in { + # ↓ this is your host output in the flake schema + nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem { + modules = [ + nvf.nixosModules.default # <- this imports the NixOS module that provides the options + ./configuration.nix # <- your host entrypoint + ]; + }; + }; +} +``` + +Once the module is properly imported by your host, you will be able to use the +`programs.nvf` module option anywhere in your configuration in order to +configure **nvf**. + +```nix{ + programs.nvf = { + enable = true; + # your settings need to go into the settings attribute set + # most settings are documented in the appendix + settings = { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + }; + }; + }; +} +``` + +::: {.note} +**nvf** exposes a lot of options, most of which are not referenced in the +installation sections of the manual. You may find all avaliable options +in the [appendix](https://notashelf.github.io/nvf/options) +::: diff --git a/docs/manual/installation/standalone/home-manager.md b/docs/manual/installation/standalone/home-manager.md new file mode 100644 index 0000000..db1ae63 --- /dev/null +++ b/docs/manual/installation/standalone/home-manager.md @@ -0,0 +1,56 @@ +# Standalone Installation on Home-Manager {#ch-standalone-hm} + +Your built Neoevim configuration can be exposed as a flake output to make it +easier to share across machines, repositories and so on. Or it can be added to +your system packages to make it available across your system. + +The following is an example installation of `nvf` as a standalone package with +the default theme enabled. You may use other options inside `config.vim` in +`configModule`, but this example will not cover that. + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + nvf.url = "github:notashelf/nvf"; + }; + + outputs = {nixpkgs, home-manager, nvf, ...}: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + configModule = { + # Add any custom options (and do feel free to upstream them!) + # options = { ... }; + + config.vim = { + theme.enable = true; + # and more options as you see fit... + }; + }; + + customNeovim = nvf.lib.neovimConfiguration { + modules = [configModule]; + inherit pkgs; + }; + in { + # this will make the package available as a flake input + packages.${system}.my-neovim = customNeovim.neovim; + + # this is an example home-manager configuration + # using the built neovim package + homeConfigurations = { + "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration { + # ... + modules = [ + ./home.nix + + # this will make wrapped neovim available in your system packages + {environment.systemPackages = [customNeovim.neovim];} + ]; + # ... + }; + }; + }; +} +``` diff --git a/docs/manual/installation/standalone/nixos.md b/docs/manual/installation/standalone/nixos.md new file mode 100644 index 0000000..2e6343a --- /dev/null +++ b/docs/manual/installation/standalone/nixos.md @@ -0,0 +1,55 @@ +# Standalone Installation on NixOS {#ch-standalone-nixos} + +Your built Neoevim configuration can be exposed as a flake output to make it +easier to share across machines, repositories and so on. Or it can be added to +your system packages to make it available across your system. + +The following is an example installation of `nvf` as a standalone package with +the default theme enabled. You may use other options inside `config.vim` in +`configModule`, but this example will not cover that. + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + nvf.url = "github:notashelf/nvf"; + }; + + outputs = {nixpkgs, nvf, ...}: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + configModule = { + # Add any custom options (and do feel free to upstream them!) + # options = { ... }; + + config.vim = { + theme.enable = true; + # and more options as you see fit... + }; + }; + + customNeovim = nvf.lib.neovimConfiguration { + modules = [configModule]; + inherit pkgs; + }; + in { + # this will make the package available as a flake input + packages.${system}.my-neovim = customNeovim.neovim; + + # this is an example nixosConfiguration using the built neovim package + nixosConfigurations = { + yourHostName = nixpkgs.lib.nixosSystem { + # ... + modules = [ + ./configuration.nix # or whatever your configuration is + + # this will make wrapped neovim available in your system packages + {environment.systemPackages = [customNeovim.neovim];} + ]; + # ... + }; + }; + }; +} +``` diff --git a/docs/manual/languages/lsp.md b/docs/manual/languages/lsp.md deleted file mode 100644 index 8d72f11..0000000 --- a/docs/manual/languages/lsp.md +++ /dev/null @@ -1,16 +0,0 @@ -# LSP Custom Packages/Command {#sec-languages-custom-lsp-packages} - -In any of the `opt.languages..lsp.package` options you can provide your own LSP package, or provide -the command to launch the language server, as a list of strings. - -You can use this to skip automatic installation of a language server, and instead -use the one found in your `$PATH` during runtime, for example: - -```nix -vim.languages.java = { - lsp = { - enable = true; - package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"]; - }; -} -``` diff --git a/docs/manual/manpage-urls.json b/docs/manual/manpage-urls.json deleted file mode 100644 index fba2bdd..0000000 --- a/docs/manual/manpage-urls.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nix.conf(5)": "https://nixos.org/manual/nix/stable/command-ref/conf-file.html" -} diff --git a/docs/manual/manual.md b/docs/manual/manual.md index c9d1043..3d80b0c 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -1,6 +1,6 @@ -# neovim-flake-manual {#neovim-flake-manual} +# nvf manual {#nvf-manual} -## Version @VERSION@ +## Version @NVF_VERSION@ ```{=include=} preface preface.md @@ -8,12 +8,12 @@ try-it-out.md ``` ```{=include=} parts -custom-configs.md -custom-package.md -custom-plugins.md default-configs.md -home-manager.md -languages.md +installation.md +configuring.md +``` + +```{=include=} chapters hacking.md ``` diff --git a/docs/manual/options.md b/docs/manual/options.md index 6bd41f9..748e318 100644 --- a/docs/manual/options.md +++ b/docs/manual/options.md @@ -1,7 +1,11 @@ # Neovim Flake Configuration Options {#ch-options} +Below are the options provided by nvf provided in no particular order. +They may include useful comments and warnings, or examples on how a module option +is meant to be used. + ```{=include=} options id-prefix: opt- -list-id: neovim-flake-options +list-id: nvf-options source: @OPTIONS_JSON@ ``` diff --git a/docs/manual/preface.md b/docs/manual/preface.md index 9aa02ea..26e3070 100644 --- a/docs/manual/preface.md +++ b/docs/manual/preface.md @@ -1,6 +1,7 @@ -# Preface {#sec-preface} +# Preface {#ch-preface} -If you noticed a bug caused by neovim-flake then please consider reporting it over -[the neovim-flake issue tracker](https://github.com/notashelf/neovim-flake/issues). -Bugfixes, feature additions and upstreamed changes are welcome over -[the neovim-flake pull requests tab](https://github.com/notashelf/neovim-flake/pulls). +If you noticed a bug caused by **nvf** then please consider reporting it over +[the issue tracker](https://github.com/notashelf/nvf/issues). + +Bugfixes, feature additions and upstreamed changes from your local configurations +are always welcome in the [the pull requests tab](https://github.com/notashelf/nvf/pulls). diff --git a/docs/manual/try-it-out.md b/docs/manual/try-it-out.md index 8b17005..70aee50 100644 --- a/docs/manual/try-it-out.md +++ b/docs/manual/try-it-out.md @@ -1,6 +1,6 @@ # Try it out {#ch-try-it-out} -Thanks to the portability of Nix, you can try out neovim-flake without actually installing it to your machine. +Thanks to the portability of Nix, you can try out nvf without actually installing it to your machine. Below are the commands you may run to try out different configurations provided by this flake. As of v0.5, three configurations are provided: @@ -11,21 +11,19 @@ configurations are provided: You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed. ```console -$ cachix use neovim-flake # Optional: it'll save you CPU resources and time -$ nix run github:notashelf/neovim-flake#nix # will run the default minimal configuration +$ cachix use nvf # Optional: it'll save you CPU resources and time +$ nix run github:notashelf/nvf#nix # will run the default minimal configuration ``` Do keep in mind that this is **susceptible to garbage collection** meaning it will be removed from your Nix store -once you garbage collect. If you wish to install neovim-flake, please take a look at -[custom-configuration](#ch-custom-configuration) or [home-manager](#ch-hm-module) sections for installation -instructions. +once you garbage collect. ## Using Prebuilt Configs {#sec-using-prebuild-configs} ```console -$ nix run github:notashelf/neovim-flake#nix -$ nix run github:notashelf/neovim-flake#tidal -$ nix run github:notashelf/neovim-flake#maximal +$ nix run github:notashelf/nvf#nix +$ nix run github:notashelf/nvf#tidal +$ nix run github:notashelf/nvf#maximal ``` ### Available Configs {#sec-available-configs} @@ -33,7 +31,7 @@ $ nix run github:notashelf/neovim-flake#maximal #### Nix {#sec-configs-nix} `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. +By running `nix run .#`, which is the default package, you will build Neovim with this config. #### Tidal {#sec-configs-tidal} diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index 6784727..ae115bf 100644 --- a/docs/release-notes/release-notes.md +++ b/docs/release-notes/release-notes.md @@ -1,6 +1,7 @@ # Release Notes {#ch-release-notes} -This section lists the release notes for tagged version of neovim-flake and current main. +This section lists the release notes for tagged version of **nvf** and +the current main current main branch ```{=include=} chapters rl-0.1.md diff --git a/docs/release-notes/rl-0.6.md b/docs/release-notes/rl-0.6.md index 01fbe62..437c916 100644 --- a/docs/release-notes/rl-0.6.md +++ b/docs/release-notes/rl-0.6.md @@ -2,53 +2,157 @@ Release notes for release 0.6 +## Breaking Changes and Migration Guide {#sec-breaking-changes-and-migration-guide} + +In v0.6 we are introducing `setupOpts`: many plugin related options are moved into their respective `setupOpts` +submodule, e.g. `nvimTree.disableNetrw` is renamed to `nvimTree.setupOpts.disable_netrw`. + +_Why?_ in short, you can now pass in anything to setupOpts and it will be passed to your `require'plugin'.setup{...}`. +No need to wait for us to support every single plugin option. + +The warnings when you rebuild your config should be enough to guide you through what you need to do, if there's an +option that was renamed but wasn't listed in the warning, please file a bug report! + +To make your migration process less annoying, here's a keybind that will help you with renaming stuff from camelCase to +snake_case (you'll be doing that a lot): + +```lua +-- paste this in a temp.lua file and load it in vim with :source /path/to/temp.lua +function camelToSnake() + -- Get the current word under the cursor + local word = vim.fn.expand("") + -- Replace each capital letter with an underscore followed by its lowercase equivalent + local snakeCase = string.gsub(word, "%u", function(match) + return "_" .. string.lower(match) + end) + -- Remove the leading underscore if present + if string.sub(snakeCase, 1, 1) == "_" then + snakeCase = string.sub(snakeCase, 2) + end + vim.fn.setreg(vim.v.register, snakeCase) + -- Select the word under the cursor and paste + vim.cmd("normal! viwP") +end + +vim.api.nvim_set_keymap('n', 'a', ':lua camelToSnake()', { noremap = true, silent = true }) +``` + ## Changelog {#sec-release-0.6-changelog} [ksonj](https://github.com/ksonj): -- Add Terraform language support +- Added Terraform language support. -[horriblename](https://github.com/horriblename): - -- Fixed empty winbar when breadcrumbs are disabled +- Added `ChatGPT.nvim`, which can be enabled with [`vim.assistant.chatgpt`](vim.assistant.chatgpt). Do + keep in mind that this option requires `OPENAI_API_KEY` environment variable to be set. [donnerinoern](https://github.com/donnerinoern): -- Added Gruvbox theme +- Added Gruvbox theme. -- Added marksman LSP for Markdown +- Added marksman LSP for Markdown. -- Fixed markdown preview with Glow not working and added an option for changing the preview keybind +- Fixed markdown preview with Glow not working and added an option for changing the preview keybind. -- colorizer.nvim: switched to a maintained fork +- colorizer.nvim: switched to a maintained fork. - Added `markdown-preview.nvim`, moved `glow.nvim` to a brand new `vim.utility.preview` category. +[elijahimmer](https://github.com/elijahimmer) + +- Added rose-pine theme. + +[jacekpoz](https://github.com/jacekpoz): + +- Added `vim.autocomplete.alwaysComplete`. Allows users to have the autocomplete window popup only when manually activated. + +[horriblename](https://github.com/horriblename): + +- Fixed empty winbar when breadcrumbs are disabled. + +- Added custom `setupOpts` for various plugins. + +- Removed support for deprecated plugin "nvim-compe". + +- Moved most plugins to `setupOpts` method. + +[frothymarrow](https://github.com/frothymarrow): + +- Added option `vim.luaPackages` to wrap neovim with extra Lua packages. + +- Rewrote the entire `fidget.nvim` module to include extensive configuration options. Option `vim.fidget-nvim.align.bottom` has + been removed in favor of [vim.fidget-nvim.notification.window.align](vim.fidget-nvim.notification.window.align), which now supports + `top` and `bottom` values. `vim.fidget-nvim.align.right` has no longer any equivalent and also has been removed. + +- `which-key.nvim` categories can now be customized through [vim.binds.whichKey.register](vim.binds.whichKey.register) + +- Added `magick` to `vim.luaPackages` for `image.nvim`. + +- Added `alejandra` to the default devShell. + +- Migrated neovim-flake to `makeNeovimUnstable` wrapper. + [notashelf](https://github.com/notashelf): -- Finished moving to `nixosOptionsDoc` in the documentation and changelog. We are fully free of asciidoc now +- Finished moving to `nixosOptionsDoc` in the documentation and changelog. All documentation options + and files are fully free of Asciidoc, and will now use Nixpkgs flavored markdown. -- Bumped plugin inputs to their latest versions +- Bumped plugin inputs to their latest versions. - Deprecated `presence.nvim` in favor of `neocord`. This means `vim.rich-presence.presence-nvim` is removed and will throw - a warning if used. You are recommended to rewrite your neocord config from scratch based on the + a warning if used. You are recommended to rewrite your neocord configuration from scratch based on the. [official documentation](https://github.com/IogaMaster/neocord) +- Removed Tabnine plugin due to the usage of imperative tarball downloads. If you'd like to see it back, please create an issue. + - Added support for css and tailwindcss through vscode-language-servers-extracted & tailwind-language-server. - Those can be enabled through `vim.languages.css` and `vim.languages.tailwind` + Those can be enabled through `vim.languages.css` and `vim.languages.tailwind`. - Lualine module now allows customizing `always_divide_middle`, `ignore_focus` and `disabled_filetypes` through the new options: [vim.statusline.lualine.alwaysDivideMiddle](vim.statusline.lualine.alwaysDivideMiddle), [vim.statusline.lualine.ignoreFocus](vim.statusline.lualine.ignoreFocus) and - [vim.statusline.lualine.disabledFiletypes](vim.statusline.lualine.disabledFiletypes) + [vim.statusline.lualine.disabledFiletypes](vim.statusline.lualine.disabledFiletypes). -- Updated all plugin inputs to their latest versions (26.01.2024) - this brought minor color changess to the Catppuccin - theme +- Updated all plugin inputs to their latest versions (**21.04.2024**) - this brought minor color changes to the Catppuccin + theme. -[elijahimmer](https://github.com/elijahimmer) +- Moved home-manager module entrypoint to `flake/modules` and added an experimental Nixos module. This requires further testing + before it can be considered ready for use. -- Added rose-pine theme +- Made lib calls explicit. E.g. `lib.strings.optionalString` instead of `lib.optionalString`. This is a pattern expected + to be followed by all contributors in the future. -[frothymarrow](https://github.com/frothymarrow) +- Added `image.nvim` for image previews. -- Added option `vim.luaPackages` to wrap neovim with extra Lua packages. +- The final neovim package is now exposed. This means you can build the neovim package that will be added to your + package list without rebuilding your system to test if your configuration yields a broken package. + +- Changed the tree structure to distinguish between core options and plugin options. + +- Added plugin auto-discovery from plugin inputs. This is mostly from + [JordanIsaac's neovim-flake](https://github.com/jordanisaacs/neovim-flake). Allows contributors to add plugin inputs + with the `plugin-` prefix to have them automatically discovered for the `plugin` type in `lib/types`. + +- Moved internal `wrapLuaConfig` to the extended library, structured its arguments to take `luaBefore`, `luaConfig` + and `luaAfter` as strings, which are then concatted inside a lua block. + +- Added [`vim.luaConfigBefore`](vim.luaConfigBefore) and [`vim.luaConfigAfter`](vim.luaConfigAfter) + for inserting verbatim Lua configuration before and after the resolved Lua DAG respectively. Both of those options + take strings as the type, so you may read the contents of a Lua file from a given path. + +- Added [`vim.spellChecking.ignoredFiletypes`](vim.spellChecking.ignoredFiletypes) + and [`vim.spellChecking.programmingWordlist.enable`](vim.spellChecking.programmingWordlist.enable) for ignoring certain filetypes + in spellchecking and enabling `vim-dirtytalk` respectively. The previously used `vim.spellcheck.vim-dirtytalk` aliases to the latter + option. + +- Exposed `withRuby`, `withNodeJs`, `withPython3`, and `python3Packages` from the `makeNeovimConfig` function under their respective options. + +- Added [`vim.extraPackages`](vim.extraPackages) for appending additional packages to the wrapper PATH, making said packages available + while inside the Neovim session. + +- Made treesitter options configurable, and moved `treesitter-context to +`setupOpts` while it is enabled. + +- Added `vim.notify.nvim-notify.setupOpts.render` which takes either a string of enum or + a lua function. The default is "compact", but you may change it according to + nvim-notify documentation. diff --git a/docs/static/style.css b/docs/static/style.css new file mode 100644 index 0000000..3f803f2 --- /dev/null +++ b/docs/static/style.css @@ -0,0 +1,830 @@ +:root { + --nmd-color0: #0a3e68; + --nmd-color1: #268598; + --nmd-color2: #b8d09e; + --nmd-color3: #f6cf5e; + --nmd-color4: #ec733b; + --nmd-color-info: #167cb9; + --nmd-color-warn: #ff6700; +} +html { + -webkit-text-size-adjust: 100%; +} +html:focus-within { + scroll-behavior: smooth; +} +body { + -webkit-text-size-adjust: 100%; + -moz-text-size-adjust: 100%; + text-size-adjust: 100%; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + min-height: 100vh; + position: relative; + text-rendering: optimizeSpeed; + width: 100%; +} +*, +:after, +:before { + box-sizing: border-box; +} +a:not([class]) { + -webkit-text-decoration-skip: ink; + text-decoration-skip-ink: auto; +} +a, +abbr, +acronym, +address, +applet, +article, +aside, +audio, +b, +big, +blockquote, +body, +canvas, +caption, +center, +cite, +code, +dd, +del, +details, +dfn, +div, +dl, +dt, +em, +embed, +fieldset, +figcaption, +figure, +footer, +form, +h1, +h2, +h3, +h4, +h5, +h6, +header, +hgroup, +html, +i, +iframe, +img, +ins, +kbd, +label, +legend, +li, +mark, +menu, +nav, +object, +ol, +output, +p, +pre, +q, +ruby, +s, +samp, +section, +small, +span, +strike, +strong, +sub, +summary, +sup, +table, +tbody, +td, +tfoot, +th, +thead, +time, +tr, +tt, +u, +ul, +var, +video { + border: 0; + font-size: 100%; + font: inherit; + margin: 0; + padding: 0; + vertical-align: baseline; +} +:focus { + outline: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section { + display: block; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:after, +blockquote:before, +q:after, +q:before { + content: ""; + content: none; +} +input, +input:required { + box-shadow: none; +} +input:-webkit-autofill, +input:-webkit-autofill:active, +input:-webkit-autofill:focus, +input:-webkit-autofill:hover { + -webkit-box-shadow: inset 0 0 0 30px #fff; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-results-button, +input[type="search"]::-webkit-search-results-decoration { + -webkit-appearance: none; + -moz-appearance: none; +} +input[type="search"] { + -webkit-appearance: none; + -moz-appearance: none; +} +input:focus { + outline: 0; +} +audio, +canvas, +video { + display: inline-block; + max-width: 100%; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden] { + display: none; +} +a:active, +a:hover { + outline: 0; +} +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} +img, +picture { + display: inline-block; +} +button, +input { + line-height: normal; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + background: 0 0; + border: 0; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +[disabled] { + pointer-events: none; +} +input[type="checkbox"], +input[type="radio"] { + padding: 0; +} +input[type="search"] { + -webkit-appearance: textfield; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +button { + background: 0 0; + border: 0; +} +textarea { + overflow: auto; + resize: vertical; + vertical-align: top; +} +table { + border-collapse: collapse; + border-spacing: 0; + text-indent: 0; +} +hr { + background: #000; + border: 0; + box-sizing: content-box; + height: 1px; + line-height: 0; + margin: 0; + overflow: visible; + padding: 0; + page-break-after: always; + width: 100%; +} +pre { + font-family: monospace, monospace; + font-size: 100%; +} +a { + background-color: transparent; +} +abbr[title] { + border-bottom: none; + text-decoration: none; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; +} +small, +sub, +sup { + font-size: 75%; +} +sub, +sup { + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -5px; +} +sup { + top: -5px; +} +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + font-size: 100%; + line-height: 1; + margin: 0; + padding: 0; +} +button, +input { + overflow: visible; +} +button, +select { + text-transform: none; +} +[type="button"], +[type="reset"], +[type="submit"], +button { + -webkit-appearance: button; +} +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner, +button::-moz-focus-inner { + border-style: none; + outline: 0; + padding: 0; +} +legend { + border: 0; + color: inherit; + display: block; + max-width: 100%; + white-space: normal; + width: 100%; +} +fieldset { + min-width: 0; +} +body:not(:-moz-handler-blocked) fieldset { + display: block; +} +progress { + vertical-align: baseline; +} +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; +} +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; +} +summary { + display: list-item; +} +template { + display: none; +} +body { + background: white; + color: #111827; + max-width: min(100ch, 1024px); + margin: 0 auto; + padding: 10px; + font-family: "Lucida Sans", Arial, sans-serif; + font-size: 16px; + line-height: 1.4em; +} +@media (prefers-color-scheme: dark) { + body { + background: #111827; + color: #f9fafb; + } +} +h1, +h2, +h3 { + color: var(--nmd-color0); + font-family: "Lato", sans-serif; + font-weight: 300; + line-height: 1.125; +} +@media (prefers-color-scheme: dark) { + h1, + h2, + h3 { + color: var(--nmd-color4); + } +} +h1 { + font-size: 48px; + font-weight: 300; + margin: 4rem 0 1.5rem; +} +h2 { + font-size: 32px; + font-weight: 300; + margin: 2rem 0 1rem; +} +h3 { + font-size: 20px; + font-weight: 400; + margin: 0.5rem 0.25rem; +} +p { + margin: 0.9rem 0; +} +p:first-child { + margin-top: 0; +} +p:last-child { + margin-bottom: 0; +} +a { + color: var(--nmd-color0); + text-decoration: underline; + text-underline-offset: 3px; +} +a:visited { + color: var(--nmd-color1); +} +a:hover { + color: var(--nmd-color1); +} +@media (prefers-color-scheme: dark) { + a { + color: var(--nmd-color3); + } + a:visited { + color: var(--nmd-color2); + } + a:hover { + color: var(--nmd-color4); + } +} +code { + font-size: 90%; +} +span.command { + font-size: 90%; + font-family: monospace; +} +em { + font-style: italic; +} +strong { + font-weight: bold; +} +pre { + background: #f9fafb; + margin: 2rem 16px; + padding: 10px; + border: 1px solid #e5e7eb; + border-radius: 4px; + box-shadow: 4px 4px 8px #e5e7eb; + font-size: 90%; + margin-bottom: 1.5rem; + padding: 6px; + overflow: auto; +} +@media (prefers-color-scheme: dark) { + pre { + background: #1f2937; + border-color: black; + box-shadow: 4px 4px 8px black; + } +} +pre span img { + user-select: none; +} +pre:has(code) { + padding: 0; +} +td, +th { + padding: 2px 5px; +} +td:first-child, +th:first-child { + padding-left: 0; +} +td:last-child, +th:last-child { + padding-right: 0; +} +dt { + margin: 1.2rem 0 0.8rem; +} +dd { + margin-left: 2rem; +} +ul { + margin: 0.9rem 0; + padding-left: 30px; + list-style: disc; +} +ul:first-child { + margin-top: 0; +} +ul:last-child { + margin-bottom: 0; +} +ol { + margin: 0.9rem 0; + padding-left: 30px; + list-style: decimal; +} +ol:first-child { + margin-top: 0; +} +ol:last-child { + margin-bottom: 0; +} +li { + margin: 0.9rem 0; + padding-left: 5px; +} +li:first-child { + margin-top: 0; +} +li:last-child { + margin-bottom: 0; +} +.navheader hr, +.navfooter hr { + margin: 1rem 0; + background: #e5e7eb; +} +@media (prefers-color-scheme: dark) { + .navheader hr, + .navfooter hr { + background: #4b5563; + } +} +.navheader a, +.navfooter a { + text-decoration: none; +} +div.titlepage { + margin: 40px 0; +} +div.titlepage hr { + display: none; +} +div.toc { + background: #f9fafb; + margin: 2rem 16px; + padding: 10px; + border: 1px solid #e5e7eb; + border-radius: 4px; + box-shadow: 4px 4px 8px #e5e7eb; +} +@media (prefers-color-scheme: dark) { + div.toc { + background: #1f2937; + border-color: black; + box-shadow: 4px 4px 8px black; + } +} +div.toc a { + text-decoration: none; +} +div.note, +div.warning { + background: #f9fafb; + margin: 2rem 16px; + padding: 10px; + border: 1px solid #e5e7eb; + border-radius: 4px; + box-shadow: 4px 4px 8px #e5e7eb; + font-style: italic; +} +@media (prefers-color-scheme: dark) { + div.note, + div.warning { + background: #1f2937; + border-color: black; + box-shadow: 4px 4px 8px black; + } +} +div.note h3, +div.warning h3 { + float: right; + margin: 0 0 1rem 1rem; + width: 42px; + height: 42px; + content: url(); +} +div.note h3 + p, +div.warning h3 + p { + margin-top: 0; +} +div.note h3 { + background-color: var(--nmd-color-info); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); +} +div.warning h3 { + background-color: var(--nmd-color-warn); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); +} +.term { + font-weight: 300; +} +.docbook .xref img[src^="images\/callouts\/"], +.screen img, +.programlisting img { + width: 1em; +} +.calloutlist img { + width: 1.3em; +} +.programlisting.language-shell .hljs-meta.prompt_ { + user-select: none; +} /*! + Theme: Tomorrow + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/ +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; +} +code.hljs { + padding: 3px 5px; +} +.hljs { + color: #4d4d4c; + background: #fff; +} +.hljs ::selection, +.hljs::selection { + background-color: #d6d6d6; + color: #4d4d4c; +} +.hljs-comment { + color: #8e908c; +} +.hljs-tag { + color: #969896; +} +.hljs-operator, +.hljs-punctuation, +.hljs-subst { + color: #4d4d4c; +} +.hljs-operator { + opacity: 0.7; +} +.hljs-bullet, +.hljs-deletion, +.hljs-name, +.hljs-selector-tag, +.hljs-template-variable, +.hljs-variable { + color: #c82829; +} +.hljs-attr, +.hljs-link, +.hljs-literal, +.hljs-number, +.hljs-symbol, +.hljs-variable.constant_ { + color: #f5871f; +} +.hljs-class .hljs-title, +.hljs-title, +.hljs-title.class_ { + color: #eab700; +} +.hljs-strong { + font-weight: 700; + color: #eab700; +} +.hljs-addition, +.hljs-code, +.hljs-string, +.hljs-title.class_.inherited__ { + color: #718c00; +} +.hljs-built_in, +.hljs-doctag, +.hljs-keyword.hljs-atrule, +.hljs-quote, +.hljs-regexp { + color: #3e999f; +} +.hljs-attribute, +.hljs-function .hljs-title, +.hljs-section, +.hljs-title.function_, +.ruby .hljs-property { + color: #4271ae; +} +.diff .hljs-meta, +.hljs-keyword, +.hljs-template-tag, +.hljs-type { + color: #8959a8; +} +.hljs-emphasis { + color: #8959a8; + font-style: italic; +} +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-meta .hljs-string { + color: #a3685a; +} +.hljs-meta .hljs-keyword, +.hljs-meta-keyword { + font-weight: 700; +} +@media (prefers-color-scheme: dark) { + /*! Theme: Tomorrow Night Author: Chris Kempson (http://chriskempson.com) License: ~ MIT (or more permissive) [via base16-schemes-source] Maintainer: @highlightjs/core-team Version: 2021.09.0*/ + pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; + } + code.hljs { + padding: 3px 5px; + } + .hljs { + color: #ccc; + background: #2d2d2d; + } + .hljs ::selection, + .hljs::selection { + background-color: #515151; + color: #ccc; + } + .hljs-comment { + color: #999; + } + .hljs-tag { + color: #b4b7b4; + } + .hljs-operator, + .hljs-punctuation, + .hljs-subst { + color: #ccc; + } + .hljs-operator { + opacity: 0.7; + } + .hljs-bullet, + .hljs-deletion, + .hljs-name, + .hljs-selector-tag, + .hljs-template-variable, + .hljs-variable { + color: #f2777a; + } + .hljs-attr, + .hljs-link, + .hljs-literal, + .hljs-number, + .hljs-symbol, + .hljs-variable.constant_ { + color: #f99157; + } + .hljs-class .hljs-title, + .hljs-title, + .hljs-title.class_ { + color: #fc6; + } + .hljs-strong { + font-weight: 700; + color: #fc6; + } + .hljs-addition, + .hljs-code, + .hljs-string, + .hljs-title.class_.inherited__ { + color: #9c9; + } + .hljs-built_in, + .hljs-doctag, + .hljs-keyword.hljs-atrule, + .hljs-quote, + .hljs-regexp { + color: #6cc; + } + .hljs-attribute, + .hljs-function .hljs-title, + .hljs-section, + .hljs-title.function_, + .ruby .hljs-property { + color: #69c; + } + .diff .hljs-meta, + .hljs-keyword, + .hljs-template-tag, + .hljs-type { + color: #c9c; + } + .hljs-emphasis { + color: #c9c; + font-style: italic; + } + .hljs-meta, + .hljs-meta .hljs-keyword, + .hljs-meta .hljs-string { + color: #a3685a; + } + .hljs-meta .hljs-keyword, + .hljs-meta-keyword { + font-weight: 700; + } +} diff --git a/docs/static/style.scss b/docs/static/style.scss new file mode 100644 index 0000000..f783c75 --- /dev/null +++ b/docs/static/style.scss @@ -0,0 +1,312 @@ +:root { + --nmd-color0: #0a3e68; + --nmd-color1: #268598; + --nmd-color2: #b8d09e; + --nmd-color3: #f6cf5e; + --nmd-color4: #ec733b; + + --nmd-color-info: #167cb9; + --nmd-color-warn: #ff6700; +} + +// Copied from Tailwind CSS. +$color-gray-50: #f9fafb; +$color-gray-100: #f3f4f6; +$color-gray-200: #e5e7eb; +$color-gray-300: #d1d5db; +$color-gray-400: #9ca3af; +$color-gray-500: #6b7280; +$color-gray-600: #4b5563; +$color-gray-700: #374151; +$color-gray-800: #1f2937; +$color-gray-900: #111827; + +$color-blue-50: #eff6ff; +$color-blue-100: #dbeafe; +$color-blue-200: #bfdbfe; +$color-blue-300: #93c5fd; +$color-blue-400: #60a5fa; +$color-blue-500: #3b82f6; +$color-blue-600: #2563eb; +$color-blue-700: #1d4ed8; +$color-blue-800: #1e40af; +$color-blue-900: #1e3a8a; + +@use "scss-reset/reset"; + +@mixin boxed { + background: $color-gray-50; + margin: 2rem 16px; + padding: 10px; + border: 1px solid $color-gray-200; + border-radius: 4px; + box-shadow: 4px 4px 8px $color-gray-200; + + @media (prefers-color-scheme: dark) { + background: $color-gray-800; + border-color: black; + box-shadow: 4px 4px 8px black; + } +} + +@mixin margined { + margin: 0.9rem 0; + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } +} + +body { + background: white; + color: $color-gray-900; + max-width: min(100ch, 1024px); + margin: 0 auto; + padding: 10px; + + font-family: "Lucida Sans", Arial, sans-serif; + font-size: 16px; + line-height: 1.4em; + + @media (prefers-color-scheme: dark) { + background: $color-gray-900; + color: $color-gray-50; + } +} + +h1, +h2, +h3 { + color: var(--nmd-color0); + font-family: "Lato", sans-serif; + font-weight: 300; + line-height: 1.125; + + @media (prefers-color-scheme: dark) { + color: var(--nmd-color4); + } +} + +h1 { + font-size: 48px; + font-weight: 300; + margin: 4rem 0 1.5rem; +} + +h2 { + font-size: 32px; + font-weight: 300; + margin: 2rem 0 1rem; +} + +h3 { + font-size: 20px; + font-weight: 400; + margin: 0.5rem 0.25rem; +} + +p { + @include margined; +} + +a { + color: var(--nmd-color0); //$color-secondary-1-3; + text-decoration: underline; + text-underline-offset: 3px; + + &:visited { + color: var(--nmd-color1); + } + + &:hover { + color: var(--nmd-color1); + } + + @media (prefers-color-scheme: dark) { + color: var(--nmd-color3); + + &:visited { + color: var(--nmd-color2); + } + + &:hover { + color: var(--nmd-color4); + } + } +} + +code { + font-size: 90%; +} + +span.command { + font-size: 90%; + font-family: monospace; +} + +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + +pre { + @include boxed; + + font-size: 90%; + margin-bottom: 1.5rem; + padding: 6px; + overflow: auto; + + // The callout markers should not be selectable. + span img { + user-select: none; + } +} + +pre:has(code) { + padding: 0; +} + +td, +th { + padding: 2px 5px; + + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } +} + +dt { + margin: 1.2rem 0 0.8rem; +} + +dd { + margin-left: 2rem; +} + +div.book { +} + +ul { + @include margined; + + padding-left: 30px; + list-style: disc; +} + +ol { + @include margined; + + padding-left: 30px; + list-style: decimal; +} + +li { + @include margined; + + padding-left: 5px; +} + +.navheader, +.navfooter { + hr { + margin: 1rem 0; + background: $color-gray-200; + @media (prefers-color-scheme: dark) { + background: $color-gray-600; + } + } + + a { + text-decoration: none; + } +} + +div.titlepage { + margin: 40px 0; + + hr { + display: none; + } +} + +div.toc { + @include boxed; + + a { + text-decoration: none; + } +} + +div.note, +div.warning { + @include boxed; + + font-style: italic; + + h3 { + float: right; + margin: 0 0 1rem 1rem; + width: 42px; + height: 42px; + content: url(); + } + + h3 + p { + margin-top: 0; + } +} + +div.note { + h3 { + background-color: var(--nmd-color-info); + // From https://tabler-icons.io/i/info-square-rounded + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); + } +} + +div.warning { + h3 { + background-color: var(--nmd-color-warn); + // From https://tabler-icons.io/i/alert-triangle + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); + } +} + +.term { + font-weight: 300; +} + +.docbook .xref img[src^="images\/callouts\/"], +.screen img, +.programlisting img { + width: 1em; +} + +.calloutlist img { + width: 1.3em; +} + +/** The console prompt, e.g., `$` and `#` should not be selectable. */ +.programlisting.language-shell .hljs-meta.prompt_ { + user-select: none; +} + +@import "tomorrow.min.css"; + +@media (prefers-color-scheme: dark) { + @import "tomorrow-night.min.css"; +} diff --git a/docs/static/tomorrow-night.min.css b/docs/static/tomorrow-night.min.css new file mode 100644 index 0000000..42ec309 --- /dev/null +++ b/docs/static/tomorrow-night.min.css @@ -0,0 +1,102 @@ +/*! + Theme: Tomorrow Night + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/ +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; +} +code.hljs { + padding: 3px 5px; +} +.hljs { + color: #ccc; + background: #2d2d2d; +} +.hljs ::selection, +.hljs::selection { + background-color: #515151; + color: #ccc; +} +.hljs-comment { + color: #999; +} +.hljs-tag { + color: #b4b7b4; +} +.hljs-operator, +.hljs-punctuation, +.hljs-subst { + color: #ccc; +} +.hljs-operator { + opacity: 0.7; +} +.hljs-bullet, +.hljs-deletion, +.hljs-name, +.hljs-selector-tag, +.hljs-template-variable, +.hljs-variable { + color: #f2777a; +} +.hljs-attr, +.hljs-link, +.hljs-literal, +.hljs-number, +.hljs-symbol, +.hljs-variable.constant_ { + color: #f99157; +} +.hljs-class .hljs-title, +.hljs-title, +.hljs-title.class_ { + color: #fc6; +} +.hljs-strong { + font-weight: 700; + color: #fc6; +} +.hljs-addition, +.hljs-code, +.hljs-string, +.hljs-title.class_.inherited__ { + color: #9c9; +} +.hljs-built_in, +.hljs-doctag, +.hljs-keyword.hljs-atrule, +.hljs-quote, +.hljs-regexp { + color: #6cc; +} +.hljs-attribute, +.hljs-function .hljs-title, +.hljs-section, +.hljs-title.function_, +.ruby .hljs-property { + color: #69c; +} +.diff .hljs-meta, +.hljs-keyword, +.hljs-template-tag, +.hljs-type { + color: #c9c; +} +.hljs-emphasis { + color: #c9c; + font-style: italic; +} +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-meta .hljs-string { + color: #a3685a; +} +.hljs-meta .hljs-keyword, +.hljs-meta-keyword { + font-weight: 700; +} diff --git a/docs/static/tomorrow.min.css b/docs/static/tomorrow.min.css new file mode 100644 index 0000000..0bf4e2e --- /dev/null +++ b/docs/static/tomorrow.min.css @@ -0,0 +1,102 @@ +/*! + Theme: Tomorrow + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/ +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; +} +code.hljs { + padding: 3px 5px; +} +.hljs { + color: #4d4d4c; + background: #fff; +} +.hljs ::selection, +.hljs::selection { + background-color: #d6d6d6; + color: #4d4d4c; +} +.hljs-comment { + color: #8e908c; +} +.hljs-tag { + color: #969896; +} +.hljs-operator, +.hljs-punctuation, +.hljs-subst { + color: #4d4d4c; +} +.hljs-operator { + opacity: 0.7; +} +.hljs-bullet, +.hljs-deletion, +.hljs-name, +.hljs-selector-tag, +.hljs-template-variable, +.hljs-variable { + color: #c82829; +} +.hljs-attr, +.hljs-link, +.hljs-literal, +.hljs-number, +.hljs-symbol, +.hljs-variable.constant_ { + color: #f5871f; +} +.hljs-class .hljs-title, +.hljs-title, +.hljs-title.class_ { + color: #eab700; +} +.hljs-strong { + font-weight: 700; + color: #eab700; +} +.hljs-addition, +.hljs-code, +.hljs-string, +.hljs-title.class_.inherited__ { + color: #718c00; +} +.hljs-built_in, +.hljs-doctag, +.hljs-keyword.hljs-atrule, +.hljs-quote, +.hljs-regexp { + color: #3e999f; +} +.hljs-attribute, +.hljs-function .hljs-title, +.hljs-section, +.hljs-title.function_, +.ruby .hljs-property { + color: #4271ae; +} +.diff .hljs-meta, +.hljs-keyword, +.hljs-template-tag, +.hljs-type { + color: #8959a8; +} +.hljs-emphasis { + color: #8959a8; + font-style: italic; +} +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-meta .hljs-string { + color: #a3685a; +} +.hljs-meta .hljs-keyword, +.hljs-meta-keyword { + font-weight: 700; +} diff --git a/flake.lock b/flake.lock index 44d96fa..f590525 100644 --- a/flake.lock +++ b/flake.lock @@ -1,309 +1,5 @@ { "nodes": { - "alpha-nvim": { - "flake": false, - "locked": { - "lastModified": 1705520464, - "narHash": "sha256-Yz5ZqxjaargJjnbmH1L43EwYp5J5w5RPREG7/smdRQc=", - "owner": "goolord", - "repo": "alpha-nvim", - "rev": "4b36c1ca9ea475bdc006896657cf1ccc486aeffa", - "type": "github" - }, - "original": { - "owner": "goolord", - "repo": "alpha-nvim", - "type": "github" - } - }, - "bufdelete-nvim": { - "flake": false, - "locked": { - "lastModified": 1703393686, - "narHash": "sha256-O0JRhx6UJzeZTG+XwGi/6DLaoX8hfqxwSt0W9yQXhBw=", - "owner": "famiu", - "repo": "bufdelete.nvim", - "rev": "0b9c0f182b09c51170bb9f252f15de7695e4d507", - "type": "github" - }, - "original": { - "owner": "famiu", - "repo": "bufdelete.nvim", - "type": "github" - } - }, - "catppuccin": { - "flake": false, - "locked": { - "lastModified": 1706227543, - "narHash": "sha256-br32TBzK++QK6RqlMjyN4vmNi1cgNgDca8byZqV3oUQ=", - "owner": "catppuccin", - "repo": "nvim", - "rev": "afab7ec2a79c7127627dede79c0018b6e45663d0", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nvim", - "type": "github" - } - }, - "ccc": { - "flake": false, - "locked": { - "lastModified": 1702716924, - "narHash": "sha256-nWe7uYWPZ1LjQRVynYnPomb4EFfyh919Jsh07UPSdvg=", - "owner": "uga-rosa", - "repo": "ccc.nvim", - "rev": "ec6e23fd2c0bf4ffcf71c1271acdcee6e2c6f49c", - "type": "github" - }, - "original": { - "owner": "uga-rosa", - "repo": "ccc.nvim", - "type": "github" - } - }, - "cellular-automaton": { - "flake": false, - "locked": { - "lastModified": 1693589931, - "narHash": "sha256-szbd6m7hH7NFI0UzjWF83xkpSJeUWCbn9c+O8F8S/Fg=", - "owner": "Eandrju", - "repo": "cellular-automaton.nvim", - "rev": "b7d056dab963b5d3f2c560d92937cb51db61cb5b", - "type": "github" - }, - "original": { - "owner": "Eandrju", - "repo": "cellular-automaton.nvim", - "type": "github" - } - }, - "cheatsheet-nvim": { - "flake": false, - "locked": { - "lastModified": 1640255456, - "narHash": "sha256-TYkGB7cON2t4GwMaR9H1MDG2j3btBv2AR37ade8kqTY=", - "owner": "sudormrfbin", - "repo": "cheatsheet.nvim", - "rev": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef", - "type": "github" - }, - "original": { - "owner": "sudormrfbin", - "repo": "cheatsheet.nvim", - "type": "github" - } - }, - "cinnamon-nvim": { - "flake": false, - "locked": { - "lastModified": 1670143364, - "narHash": "sha256-JglXQhoPgN9sQ3yuv0+VQxmKMvoQTu5lbGLSRaQkytI=", - "owner": "declancm", - "repo": "cinnamon.nvim", - "rev": "c406ffda3a0302f32c23b24ab756ea20467d6578", - "type": "github" - }, - "original": { - "owner": "declancm", - "repo": "cinnamon.nvim", - "type": "github" - } - }, - "cmp-buffer": { - "flake": false, - "locked": { - "lastModified": 1660101488, - "narHash": "sha256-dG4U7MtnXThoa/PD+qFtCt76MQ14V1wX8GMYcvxEnbM=", - "owner": "hrsh7th", - "repo": "cmp-buffer", - "rev": "3022dbc9166796b644a841a02de8dd1cc1d311fa", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-buffer", - "type": "github" - } - }, - "cmp-nvim-lsp": { - "flake": false, - "locked": { - "lastModified": 1702205473, - "narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=", - "owner": "hrsh7th", - "repo": "cmp-nvim-lsp", - "rev": "5af77f54de1b16c34b23cba810150689a3a90312", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-nvim-lsp", - "type": "github" - } - }, - "cmp-path": { - "flake": false, - "locked": { - "lastModified": 1664784283, - "narHash": "sha256-thppiiV3wjIaZnAXmsh7j3DUc6ceSCvGzviwFUnoPaI=", - "owner": "hrsh7th", - "repo": "cmp-path", - "rev": "91ff86cd9c29299a64f968ebb45846c485725f23", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-path", - "type": "github" - } - }, - "cmp-treesitter": { - "flake": false, - "locked": { - "lastModified": 1702163214, - "narHash": "sha256-K7F9iqmB13ONenwsbaND8F4010MvHQXp7DxMFfcsZ4A=", - "owner": "ray-x", - "repo": "cmp-treesitter", - "rev": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d", - "type": "github" - }, - "original": { - "owner": "ray-x", - "repo": "cmp-treesitter", - "type": "github" - } - }, - "cmp-vsnip": { - "flake": false, - "locked": { - "lastModified": 1669100283, - "narHash": "sha256-2mkN03noOr5vBvRbSb35xZKorSH+8savQNZtgM9+QcM=", - "owner": "hrsh7th", - "repo": "cmp-vsnip", - "rev": "989a8a73c44e926199bfd05fa7a516d51f2d2752", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-vsnip", - "type": "github" - } - }, - "codewindow-nvim": { - "flake": false, - "locked": { - "lastModified": 1695487629, - "narHash": "sha256-/u2Zjbd9m3/iJU3I3HzFzXWxuvoycwJoIq7UFeHNtKM=", - "owner": "gorbit99", - "repo": "codewindow.nvim", - "rev": "8c8f5ff66e123491c946c04848d744fcdc7cac6c", - "type": "github" - }, - "original": { - "owner": "gorbit99", - "repo": "codewindow.nvim", - "type": "github" - } - }, - "comment-nvim": { - "flake": false, - "locked": { - "lastModified": 1691409559, - "narHash": "sha256-+dF1ZombrlO6nQggufSb0igXW5zwU++o0W/5ZA07cdc=", - "owner": "numToStr", - "repo": "Comment.nvim", - "rev": "0236521ea582747b58869cb72f70ccfa967d2e89", - "type": "github" - }, - "original": { - "owner": "numToStr", - "repo": "Comment.nvim", - "type": "github" - } - }, - "copilot-cmp": { - "flake": false, - "locked": { - "lastModified": 1694286652, - "narHash": "sha256-srgNohm/aJpswNJ5+T7p+zi9Jinp9e5FA8/wdk6VRiY=", - "owner": "zbirenbaum", - "repo": "copilot-cmp", - "rev": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3", - "type": "github" - }, - "original": { - "owner": "zbirenbaum", - "repo": "copilot-cmp", - "type": "github" - } - }, - "copilot-lua": { - "flake": false, - "locked": { - "lastModified": 1704638182, - "narHash": "sha256-8/EPnigWaY2P4ZlVyu42DOQVOjRPgSCtmdOVbl2ACN8=", - "owner": "zbirenbaum", - "repo": "copilot.lua", - "rev": "b03617a6dc4bc88b65ab5deac1631da9a9c2dcaf", - "type": "github" - }, - "original": { - "owner": "zbirenbaum", - "repo": "copilot.lua", - "type": "github" - } - }, - "crates-nvim": { - "flake": false, - "locked": { - "lastModified": 1706141227, - "narHash": "sha256-vkq1N6XvJOSsIbCCcAk1+9ReRMF4it/mofq55JhwQRY=", - "owner": "Saecki", - "repo": "crates.nvim", - "rev": "f2a169840e97a8ed2048abb507d2742c3895c85b", - "type": "github" - }, - "original": { - "owner": "Saecki", - "repo": "crates.nvim", - "type": "github" - } - }, - "dashboard-nvim": { - "flake": false, - "locked": { - "lastModified": 1699578883, - "narHash": "sha256-LNjYIRL5xZyLgFkoTu3K5USOfk1mtaXe5RhKBAbzYRw=", - "owner": "glepnir", - "repo": "dashboard-nvim", - "rev": "63df28409d940f9cac0a925df09d3dc369db9841", - "type": "github" - }, - "original": { - "owner": "glepnir", - "repo": "dashboard-nvim", - "type": "github" - } - }, - "diffview-nvim": { - "flake": false, - "locked": { - "lastModified": 1700506468, - "narHash": "sha256-3EdnBUka9Rh5Brl6TWpN6GlD9z32mmY3Ip+wyiKob/8=", - "owner": "sindrets", - "repo": "diffview.nvim", - "rev": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f", - "type": "github" - }, - "original": { - "owner": "sindrets", - "repo": "diffview.nvim", - "type": "github" - } - }, "dirt-samples-src": { "flake": false, "locked": { @@ -321,87 +17,6 @@ "type": "github" } }, - "dracula": { - "flake": false, - "locked": { - "lastModified": 1705994462, - "narHash": "sha256-yGV/bA7+Xi+LBi4Iz/SZDVl0KWoo+IO9kgfSIgTk0Ow=", - "owner": "Mofiqul", - "repo": "dracula.nvim", - "rev": "a6cb758d4b182d9f2b7e742910078d94877c1059", - "type": "github" - }, - "original": { - "owner": "Mofiqul", - "repo": "dracula.nvim", - "type": "github" - } - }, - "dressing-nvim": { - "flake": false, - "locked": { - "lastModified": 1706209758, - "narHash": "sha256-P8XlaiNNbOtkOS2un+pfCOOayOzJ/8uLQFrcFlSW7tQ=", - "owner": "stevearc", - "repo": "dressing.nvim", - "rev": "0e88293ce3459f4bb310125f3366304af6dc7990", - "type": "github" - }, - "original": { - "owner": "stevearc", - "repo": "dressing.nvim", - "type": "github" - } - }, - "elixir-ls": { - "flake": false, - "locked": { - "lastModified": 1705860624, - "narHash": "sha256-pd/ZkDpzlheEJfX7X6fFWY4Y5B5Y2EnJMBtuNHPuUJw=", - "owner": "elixir-lsp", - "repo": "elixir-ls", - "rev": "d10ce2cfe3acf475949e9a21984d18be579d7ec4", - "type": "github" - }, - "original": { - "owner": "elixir-lsp", - "repo": "elixir-ls", - "type": "github" - } - }, - "elixir-tools": { - "flake": false, - "locked": { - "lastModified": 1703976612, - "narHash": "sha256-6QdjqugY2kouDVzQa4bxFb9dp9vVantueO+6nnbnOwo=", - "owner": "elixir-tools", - "repo": "elixir-tools.nvim", - "rev": "163522196c962fa87cac0df2a0d1ad332e1e0755", - "type": "github" - }, - "original": { - "owner": "elixir-tools", - "repo": "elixir-tools.nvim", - "type": "github" - } - }, - "fidget-nvim": { - "flake": false, - "locked": { - "lastModified": 1699509702, - "narHash": "sha256-8Gl2Ck4YJGReSEq1Xeh1dpdRq4eImmrxvIHrfxdem3Q=", - "owner": "j-hui", - "repo": "fidget.nvim", - "rev": "2f7c08f45639a64a5c0abcf67321d52c3f499ae6", - "type": "github" - }, - "original": { - "owner": "j-hui", - "ref": "legacy", - "repo": "fidget.nvim", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -423,11 +38,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { @@ -441,11 +56,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -469,310 +84,6 @@ "type": "github" } }, - "flutter-tools": { - "flake": false, - "locked": { - "lastModified": 1705943990, - "narHash": "sha256-g/cgFJ8kwBk1gNVaio+s1sa5KqpC/LMf06/6+MOPZk4=", - "owner": "akinsho", - "repo": "flutter-tools.nvim", - "rev": "271eec9edb0f1a2bf30ad449ec3b4eeb2c88af05", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "flutter-tools.nvim", - "type": "github" - } - }, - "gesture-nvim": { - "flake": false, - "locked": { - "lastModified": 1704802204, - "narHash": "sha256-vAky7yvPw2ZmS0i268eKCpUp75bylNGA+ckvhuWVKgc=", - "owner": "notomo", - "repo": "gesture.nvim", - "rev": "5124a05debd62326cc899a35a09862a675d7f3da", - "type": "github" - }, - "original": { - "owner": "notomo", - "repo": "gesture.nvim", - "type": "github" - } - }, - "gitsigns-nvim": { - "flake": false, - "locked": { - "lastModified": 1706282483, - "narHash": "sha256-jVzZPD9RdM0Ie3nWuZgv+XVhwWzLJ2QODrIGRCENWjo=", - "owner": "lewis6991", - "repo": "gitsigns.nvim", - "rev": "fb9fd5312476b51a42a98122616e1c448d823d5c", - "type": "github" - }, - "original": { - "owner": "lewis6991", - "repo": "gitsigns.nvim", - "type": "github" - } - }, - "glow-nvim": { - "flake": false, - "locked": { - "lastModified": 1703345545, - "narHash": "sha256-GsNcASzVvY0066kak2nvUY5luzanoBclqcUOsODww8g=", - "owner": "ellisonleao", - "repo": "glow.nvim", - "rev": "238070a686c1da3bccccf1079700eb4b5e19aea4", - "type": "github" - }, - "original": { - "owner": "ellisonleao", - "repo": "glow.nvim", - "type": "github" - } - }, - "gruvbox": { - "flake": false, - "locked": { - "lastModified": 1704132908, - "narHash": "sha256-p/y65ub1qL+5g0ZiWzaTyQeiP7LtVfsdcdJ0eb0A7Og=", - "owner": "ellisonleao", - "repo": "gruvbox.nvim", - "rev": "4176b0b720db0c90ab4030e5c1b4893faf41fd51", - "type": "github" - }, - "original": { - "owner": "ellisonleao", - "repo": "gruvbox.nvim", - "type": "github" - } - }, - "highlight-undo": { - "flake": false, - "locked": { - "lastModified": 1695227852, - "narHash": "sha256-I1AwVYqpJNA3K1AwGy/VgPnbrYvX19qfI9bQFZNu1SU=", - "owner": "tzachar", - "repo": "highlight-undo.nvim", - "rev": "50a6884a8476be04ecce8f1c4ed692c5000ef0a1", - "type": "github" - }, - "original": { - "owner": "tzachar", - "repo": "highlight-undo.nvim", - "type": "github" - } - }, - "hop-nvim": { - "flake": false, - "locked": { - "lastModified": 1694283445, - "narHash": "sha256-SnuFeD/lrMxKtpBRPgIwdG0kVF7BWe02PiV7URVDASI=", - "owner": "phaazon", - "repo": "hop.nvim", - "rev": "1a1eceafe54b5081eae4cb91c723abd1d450f34b", - "type": "github" - }, - "original": { - "owner": "phaazon", - "repo": "hop.nvim", - "type": "github" - } - }, - "icon-picker-nvim": { - "flake": false, - "locked": { - "lastModified": 1704321319, - "narHash": "sha256-VZKsVeSmPR3AA8267Mtd5sSTZl2CAqnbgqceCptgp4w=", - "owner": "ziontee113", - "repo": "icon-picker.nvim", - "rev": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3", - "type": "github" - }, - "original": { - "owner": "ziontee113", - "repo": "icon-picker.nvim", - "type": "github" - } - }, - "indent-blankline": { - "flake": false, - "locked": { - "lastModified": 1705027513, - "narHash": "sha256-T0tbTyD9+J7OWcvfrPolrXbjGiXzEXhTtgC9Xj3ANFc=", - "owner": "lukas-reineke", - "repo": "indent-blankline.nvim", - "rev": "12e92044d313c54c438bd786d11684c88f6f78cd", - "type": "github" - }, - "original": { - "owner": "lukas-reineke", - "repo": "indent-blankline.nvim", - "type": "github" - } - }, - "kommentary": { - "flake": false, - "locked": { - "lastModified": 1701264889, - "narHash": "sha256-lpa3o42jieVKqs+ZCU8HBqWsoqoc53JKMmCNmIJ0rH0=", - "owner": "b3nj5m1n", - "repo": "kommentary", - "rev": "d5a111a3bc4109a8f913a5863c9092b3b3801482", - "type": "github" - }, - "original": { - "owner": "b3nj5m1n", - "repo": "kommentary", - "type": "github" - } - }, - "leap-nvim": { - "flake": false, - "locked": { - "lastModified": 1706284537, - "narHash": "sha256-kA6Lkfx7RHPUZjhxx4tc0gsAdhrfFvp6yY5qO+ZXUtM=", - "owner": "ggandor", - "repo": "leap.nvim", - "rev": "14eda5bb233354933baa99b6d40bef3a40dbeaae", - "type": "github" - }, - "original": { - "owner": "ggandor", - "repo": "leap.nvim", - "type": "github" - } - }, - "lsp-lines": { - "flake": false, - "locked": { - "lastModified": 1698584731, - "narHash": "sha256-3DWM2mTnm6b7J4cYUwCKBGHkXw/dQDO0ZTJXkTl06aE=", - "owner": "~whynothugo", - "repo": "lsp_lines.nvim", - "rev": "cf2306dd332e34a3e91075b40bdd4f6db824b2ee", - "type": "sourcehut" - }, - "original": { - "owner": "~whynothugo", - "repo": "lsp_lines.nvim", - "type": "sourcehut" - } - }, - "lsp-signature": { - "flake": false, - "locked": { - "lastModified": 1701211782, - "narHash": "sha256-4GcTfu7MRpZUi5dqewaddSvaOezRl9ROKrR7wnnLnKE=", - "owner": "ray-x", - "repo": "lsp_signature.nvim", - "rev": "fed2c8389c148ff1dfdcdca63c2b48d08a50dea0", - "type": "github" - }, - "original": { - "owner": "ray-x", - "repo": "lsp_signature.nvim", - "type": "github" - } - }, - "lspkind": { - "flake": false, - "locked": { - "lastModified": 1704982040, - "narHash": "sha256-/QLdBU/Zwmkw1NGuLBD48tvrmIP9d9WHhgcLEQgRTWo=", - "owner": "onsails", - "repo": "lspkind-nvim", - "rev": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf", - "type": "github" - }, - "original": { - "owner": "onsails", - "repo": "lspkind-nvim", - "type": "github" - } - }, - "lspsaga": { - "flake": false, - "locked": { - "lastModified": 1670360222, - "narHash": "sha256-7ENInq3LAPPTdm0Fb7klOc630j8m4LRj1kLZZFYLh68=", - "owner": "tami5", - "repo": "lspsaga.nvim", - "rev": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", - "type": "github" - }, - "original": { - "owner": "tami5", - "repo": "lspsaga.nvim", - "type": "github" - } - }, - "lualine": { - "flake": false, - "locked": { - "lastModified": 1706181415, - "narHash": "sha256-LMMcRY4qnGywdK6Bl4YeAEKLhnRuOZ2txn4oYoso2gI=", - "owner": "hoob3rt", - "repo": "lualine.nvim", - "rev": "7d131a8d3ba5016229e8a1d08bf8782acea98852", - "type": "github" - }, - "original": { - "owner": "hoob3rt", - "repo": "lualine.nvim", - "type": "github" - } - }, - "mind-nvim": { - "flake": false, - "locked": { - "lastModified": 1679526071, - "narHash": "sha256-JIhAhQYGLLRucwlhzfckQYU5qjqbHtNH52JlGS5a79w=", - "owner": "phaazon", - "repo": "mind.nvim", - "rev": "002137dd7cf97865ebd01b6a260209d2daf2da66", - "type": "github" - }, - "original": { - "owner": "phaazon", - "repo": "mind.nvim", - "type": "github" - } - }, - "minimap-vim": { - "flake": false, - "locked": { - "lastModified": 1696276849, - "narHash": "sha256-bPW/wDCvItpl0VIQCgz5AEYfx1aAnIMhB1S/tJN5/80=", - "owner": "wfxr", - "repo": "minimap.vim", - "rev": "701f4cf4b60a3e1685d2da484282f3a3d8bf9db6", - "type": "github" - }, - "original": { - "owner": "wfxr", - "repo": "minimap.vim", - "type": "github" - } - }, - "modes-nvim": { - "flake": false, - "locked": { - "lastModified": 1702245923, - "narHash": "sha256-Kd2hf5obrPvCVLtRcFjLd75byyrB2o3uYCSEMW6IeCc=", - "owner": "mvllow", - "repo": "modes.nvim", - "rev": "4035a46aaabe43faf1b54740575af9dd5bb03809", - "type": "github" - }, - "original": { - "owner": "mvllow", - "repo": "modes.nvim", - "type": "github" - } - }, "naersk": { "inputs": { "nixpkgs": [ @@ -794,38 +105,6 @@ "type": "github" } }, - "neocord": { - "flake": false, - "locked": { - "lastModified": 1704948184, - "narHash": "sha256-HnaMKTNjMuDwHDvxHH5kd4ysa5WU+MlbdD9jH/iJcU8=", - "owner": "IogaMaster", - "repo": "neocord", - "rev": "9b624d5189f699ab454e9515262c13965395b8dd", - "type": "github" - }, - "original": { - "owner": "IogaMaster", - "repo": "neocord", - "type": "github" - } - }, - "neodev-nvim": { - "flake": false, - "locked": { - "lastModified": 1706249139, - "narHash": "sha256-BRsZdc1TO88pCoehDv7ervBjaeOpcmSGm/RZAInhI9Q=", - "owner": "folke", - "repo": "neodev.nvim", - "rev": "64b2a51b02c6f2ae177c745e4d8bc801a339fe09", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "neodev.nvim", - "type": "github" - } - }, "nil": { "inputs": { "flake-utils": [ @@ -852,11 +131,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1713895582, + "narHash": "sha256-cfh1hi+6muQMbi9acOlju3V1gl8BEaZBXBR9jQfQi4U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "572af610f6151fd41c212f897c71f7056e3fb518", "type": "github" }, "original": { @@ -869,11 +148,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "type": "github" }, "original": { @@ -948,14 +227,750 @@ "type": "sourcehut" } }, - "noice-nvim": { + "plugin-alpha-nvim": { "flake": false, "locked": { - "lastModified": 1705952416, - "narHash": "sha256-lNCdwB0B5arbTEIHdDoQ19/vQ0UT89AQFwZM+RHqOTg=", + "lastModified": 1708891191, + "narHash": "sha256-kTVPKZ/e1us/uHfSwFwR38lFYN8EotJq2jKz6xm/eqg=", + "owner": "goolord", + "repo": "alpha-nvim", + "rev": "41283fb402713fc8b327e60907f74e46166f4cfd", + "type": "github" + }, + "original": { + "owner": "goolord", + "repo": "alpha-nvim", + "type": "github" + } + }, + "plugin-bufdelete-nvim": { + "flake": false, + "locked": { + "lastModified": 1708814161, + "narHash": "sha256-ljUNfmpImtxFCS19HC9kFlaLlqaPDltKtnx1+/6Y33U=", + "owner": "famiu", + "repo": "bufdelete.nvim", + "rev": "f6bcea78afb3060b198125256f897040538bcb81", + "type": "github" + }, + "original": { + "owner": "famiu", + "repo": "bufdelete.nvim", + "type": "github" + } + }, + "plugin-catppuccin": { + "flake": false, + "locked": { + "lastModified": 1713105352, + "narHash": "sha256-yTVou/WArEWygBBs2NFPI9Dm9iSGfwVftKFbOAGl8tk=", + "owner": "catppuccin", + "repo": "nvim", + "rev": "a1439ad7c584efb3d0ce14ccb835967f030450fe", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nvim", + "type": "github" + } + }, + "plugin-ccc": { + "flake": false, + "locked": { + "lastModified": 1712580766, + "narHash": "sha256-G96++Bmuklb3eDfmyKPKFUDHuopTMmIFa/ILdf11N/I=", + "owner": "uga-rosa", + "repo": "ccc.nvim", + "rev": "1283eef5494c092a047baa34ed3e667f3cb2715e", + "type": "github" + }, + "original": { + "owner": "uga-rosa", + "repo": "ccc.nvim", + "type": "github" + } + }, + "plugin-cellular-automaton": { + "flake": false, + "locked": { + "lastModified": 1693589931, + "narHash": "sha256-szbd6m7hH7NFI0UzjWF83xkpSJeUWCbn9c+O8F8S/Fg=", + "owner": "Eandrju", + "repo": "cellular-automaton.nvim", + "rev": "b7d056dab963b5d3f2c560d92937cb51db61cb5b", + "type": "github" + }, + "original": { + "owner": "Eandrju", + "repo": "cellular-automaton.nvim", + "type": "github" + } + }, + "plugin-chatgpt": { + "flake": false, + "locked": { + "lastModified": 1709721561, + "narHash": "sha256-vD3NEsYmPRWlxBSOxyIMIQiJXQXxx0hhsw4zIxxXB3o=", + "owner": "jackMort", + "repo": "ChatGPT.nvim", + "rev": "df53728e05129278d6ea26271ec086aa013bed90", + "type": "github" + }, + "original": { + "owner": "jackMort", + "repo": "ChatGPT.nvim", + "type": "github" + } + }, + "plugin-cheatsheet-nvim": { + "flake": false, + "locked": { + "lastModified": 1640255456, + "narHash": "sha256-TYkGB7cON2t4GwMaR9H1MDG2j3btBv2AR37ade8kqTY=", + "owner": "sudormrfbin", + "repo": "cheatsheet.nvim", + "rev": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef", + "type": "github" + }, + "original": { + "owner": "sudormrfbin", + "repo": "cheatsheet.nvim", + "type": "github" + } + }, + "plugin-cinnamon-nvim": { + "flake": false, + "locked": { + "lastModified": 1711005384, + "narHash": "sha256-LNikkGldBpUsfyH8ThtX7RS1p/z3JzSPonT9qUU84jw=", + "owner": "declancm", + "repo": "cinnamon.nvim", + "rev": "559fe02fae00ffd78377e9c242b2faa25a428592", + "type": "github" + }, + "original": { + "owner": "declancm", + "repo": "cinnamon.nvim", + "type": "github" + } + }, + "plugin-cmp-buffer": { + "flake": false, + "locked": { + "lastModified": 1660101488, + "narHash": "sha256-dG4U7MtnXThoa/PD+qFtCt76MQ14V1wX8GMYcvxEnbM=", + "owner": "hrsh7th", + "repo": "cmp-buffer", + "rev": "3022dbc9166796b644a841a02de8dd1cc1d311fa", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-buffer", + "type": "github" + } + }, + "plugin-cmp-nvim-lsp": { + "flake": false, + "locked": { + "lastModified": 1702205473, + "narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=", + "owner": "hrsh7th", + "repo": "cmp-nvim-lsp", + "rev": "5af77f54de1b16c34b23cba810150689a3a90312", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-nvim-lsp", + "type": "github" + } + }, + "plugin-cmp-path": { + "flake": false, + "locked": { + "lastModified": 1664784283, + "narHash": "sha256-thppiiV3wjIaZnAXmsh7j3DUc6ceSCvGzviwFUnoPaI=", + "owner": "hrsh7th", + "repo": "cmp-path", + "rev": "91ff86cd9c29299a64f968ebb45846c485725f23", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-path", + "type": "github" + } + }, + "plugin-cmp-treesitter": { + "flake": false, + "locked": { + "lastModified": 1702163214, + "narHash": "sha256-K7F9iqmB13ONenwsbaND8F4010MvHQXp7DxMFfcsZ4A=", + "owner": "ray-x", + "repo": "cmp-treesitter", + "rev": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d", + "type": "github" + }, + "original": { + "owner": "ray-x", + "repo": "cmp-treesitter", + "type": "github" + } + }, + "plugin-cmp-vsnip": { + "flake": false, + "locked": { + "lastModified": 1669100283, + "narHash": "sha256-2mkN03noOr5vBvRbSb35xZKorSH+8savQNZtgM9+QcM=", + "owner": "hrsh7th", + "repo": "cmp-vsnip", + "rev": "989a8a73c44e926199bfd05fa7a516d51f2d2752", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-vsnip", + "type": "github" + } + }, + "plugin-codewindow-nvim": { + "flake": false, + "locked": { + "lastModified": 1695487629, + "narHash": "sha256-/u2Zjbd9m3/iJU3I3HzFzXWxuvoycwJoIq7UFeHNtKM=", + "owner": "gorbit99", + "repo": "codewindow.nvim", + "rev": "8c8f5ff66e123491c946c04848d744fcdc7cac6c", + "type": "github" + }, + "original": { + "owner": "gorbit99", + "repo": "codewindow.nvim", + "type": "github" + } + }, + "plugin-comment-nvim": { + "flake": false, + "locked": { + "lastModified": 1691409559, + "narHash": "sha256-+dF1ZombrlO6nQggufSb0igXW5zwU++o0W/5ZA07cdc=", + "owner": "numToStr", + "repo": "Comment.nvim", + "rev": "0236521ea582747b58869cb72f70ccfa967d2e89", + "type": "github" + }, + "original": { + "owner": "numToStr", + "repo": "Comment.nvim", + "type": "github" + } + }, + "plugin-copilot-cmp": { + "flake": false, + "locked": { + "lastModified": 1694286652, + "narHash": "sha256-srgNohm/aJpswNJ5+T7p+zi9Jinp9e5FA8/wdk6VRiY=", + "owner": "zbirenbaum", + "repo": "copilot-cmp", + "rev": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3", + "type": "github" + }, + "original": { + "owner": "zbirenbaum", + "repo": "copilot-cmp", + "type": "github" + } + }, + "plugin-copilot-lua": { + "flake": false, + "locked": { + "lastModified": 1709095198, + "narHash": "sha256-JX3sdsnOnjkY7r9fCtC2oauo0PXF3SQ+SHUo8ifBvAc=", + "owner": "zbirenbaum", + "repo": "copilot.lua", + "rev": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6", + "type": "github" + }, + "original": { + "owner": "zbirenbaum", + "repo": "copilot.lua", + "type": "github" + } + }, + "plugin-crates-nvim": { + "flake": false, + "locked": { + "lastModified": 1713995074, + "narHash": "sha256-09+mBhh5hAXENPzrvwNNQEyM7ZtuPYAWrtAG/pzBOV8=", + "owner": "Saecki", + "repo": "crates.nvim", + "rev": "f00e11e8282b94f2a2e938d32712c99f0e0bdeb4", + "type": "github" + }, + "original": { + "owner": "Saecki", + "repo": "crates.nvim", + "type": "github" + } + }, + "plugin-dashboard-nvim": { + "flake": false, + "locked": { + "lastModified": 1713420371, + "narHash": "sha256-zcWBgDM409n6rmb06FqVXbC+HU9HJN0+ADoTJDWHvbA=", + "owner": "glepnir", + "repo": "dashboard-nvim", + "rev": "6d06924b562de6f0bb136edf1bf549afbf6b7d00", + "type": "github" + }, + "original": { + "owner": "glepnir", + "repo": "dashboard-nvim", + "type": "github" + } + }, + "plugin-diffview-nvim": { + "flake": false, + "locked": { + "lastModified": 1700506468, + "narHash": "sha256-3EdnBUka9Rh5Brl6TWpN6GlD9z32mmY3Ip+wyiKob/8=", + "owner": "sindrets", + "repo": "diffview.nvim", + "rev": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f", + "type": "github" + }, + "original": { + "owner": "sindrets", + "repo": "diffview.nvim", + "type": "github" + } + }, + "plugin-dracula": { + "flake": false, + "locked": { + "lastModified": 1708834650, + "narHash": "sha256-I3rtbJYv1D+kniOLL9hmTF3ucp/qSNewnO2GmYAERko=", + "owner": "Mofiqul", + "repo": "dracula.nvim", + "rev": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c", + "type": "github" + }, + "original": { + "owner": "Mofiqul", + "repo": "dracula.nvim", + "type": "github" + } + }, + "plugin-dressing-nvim": { + "flake": false, + "locked": { + "lastModified": 1713925216, + "narHash": "sha256-46r7X8CNuMgSB9X1jFLTQAiiBVqszkBP6DPlo6nBAxI=", + "owner": "stevearc", + "repo": "dressing.nvim", + "rev": "5162edb1442a729a885c45455a07e9a89058be2f", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "dressing.nvim", + "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": 1713617654, + "narHash": "sha256-pJgtW51FLs+Yr+tlQckRmGkRnSUQNI3fEROn3D51mMs=", + "owner": "elixir-tools", + "repo": "elixir-tools.nvim", + "rev": "3c4f8344a341818417b3d75c04eb96d894cb4640", + "type": "github" + }, + "original": { + "owner": "elixir-tools", + "repo": "elixir-tools.nvim", + "type": "github" + } + }, + "plugin-fidget-nvim": { + "flake": false, + "locked": { + "lastModified": 1712242924, + "narHash": "sha256-fZhK5opGXRRryhNpdaEPLpBq4tTibZREelXmasMLHzw=", + "owner": "j-hui", + "repo": "fidget.nvim", + "rev": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5", + "type": "github" + }, + "original": { + "owner": "j-hui", + "repo": "fidget.nvim", + "type": "github" + } + }, + "plugin-flutter-tools": { + "flake": false, + "locked": { + "lastModified": 1713525182, + "narHash": "sha256-krcaaDPJsftkrcEov1QdKQUQBH6+PgjNwFamWpmNFkU=", + "owner": "akinsho", + "repo": "flutter-tools.nvim", + "rev": "f04131d6b2c82c2a7624a8843642d6269b50b437", + "type": "github" + }, + "original": { + "owner": "akinsho", + "repo": "flutter-tools.nvim", + "type": "github" + } + }, + "plugin-gesture-nvim": { + "flake": false, + "locked": { + "lastModified": 1713872849, + "narHash": "sha256-npryXJ92l65gOGltTd3jE3fdhiEgqbxCdK5w/C/BQV0=", + "owner": "notomo", + "repo": "gesture.nvim", + "rev": "47175ed2741ba46fe7f14d6ee37ebbc5b9614c5a", + "type": "github" + }, + "original": { + "owner": "notomo", + "repo": "gesture.nvim", + "type": "github" + } + }, + "plugin-gitsigns-nvim": { + "flake": false, + "locked": { + "lastModified": 1713620636, + "narHash": "sha256-UK3DyvrQ0kLm9wrMQ6tLDoDunoThbY/Yfjn+eCZpuMw=", + "owner": "lewis6991", + "repo": "gitsigns.nvim", + "rev": "035da036e68e509ed158414416c827d022d914bd", + "type": "github" + }, + "original": { + "owner": "lewis6991", + "repo": "gitsigns.nvim", + "type": "github" + } + }, + "plugin-glow-nvim": { + "flake": false, + "locked": { + "lastModified": 1703345545, + "narHash": "sha256-GsNcASzVvY0066kak2nvUY5luzanoBclqcUOsODww8g=", + "owner": "ellisonleao", + "repo": "glow.nvim", + "rev": "238070a686c1da3bccccf1079700eb4b5e19aea4", + "type": "github" + }, + "original": { + "owner": "ellisonleao", + "repo": "glow.nvim", + "type": "github" + } + }, + "plugin-gruvbox": { + "flake": false, + "locked": { + "lastModified": 1706538659, + "narHash": "sha256-jWnrRy/PT7D0UcPGL+XTbKHWvS0ixvbyqPtTzG9HY84=", + "owner": "ellisonleao", + "repo": "gruvbox.nvim", + "rev": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f", + "type": "github" + }, + "original": { + "owner": "ellisonleao", + "repo": "gruvbox.nvim", + "type": "github" + } + }, + "plugin-highlight-undo": { + "flake": false, + "locked": { + "lastModified": 1713721901, + "narHash": "sha256-5zYUpfSR56gCufR+Y18qo8ZpMRg8N3ejkRZNJswJ4wQ=", + "owner": "tzachar", + "repo": "highlight-undo.nvim", + "rev": "a0dbc6afa19b438ca5a6f54bc7f1a10399f21a15", + "type": "github" + }, + "original": { + "owner": "tzachar", + "repo": "highlight-undo.nvim", + "type": "github" + } + }, + "plugin-hop-nvim": { + "flake": false, + "locked": { + "lastModified": 1694283445, + "narHash": "sha256-SnuFeD/lrMxKtpBRPgIwdG0kVF7BWe02PiV7URVDASI=", + "owner": "phaazon", + "repo": "hop.nvim", + "rev": "1a1eceafe54b5081eae4cb91c723abd1d450f34b", + "type": "github" + }, + "original": { + "owner": "phaazon", + "repo": "hop.nvim", + "type": "github" + } + }, + "plugin-icon-picker-nvim": { + "flake": false, + "locked": { + "lastModified": 1704321319, + "narHash": "sha256-VZKsVeSmPR3AA8267Mtd5sSTZl2CAqnbgqceCptgp4w=", + "owner": "ziontee113", + "repo": "icon-picker.nvim", + "rev": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3", + "type": "github" + }, + "original": { + "owner": "ziontee113", + "repo": "icon-picker.nvim", + "type": "github" + } + }, + "plugin-image-nvim": { + "flake": false, + "locked": { + "lastModified": 1713989303, + "narHash": "sha256-UBrusfIYWURI1Auo3XayswA8NXgZhqwazg6wmmgWygA=", + "owner": "3rd", + "repo": "image.nvim", + "rev": "2d4b479c59fd70cc26f63d48b5cd76a44dda8873", + "type": "github" + }, + "original": { + "owner": "3rd", + "repo": "image.nvim", + "type": "github" + } + }, + "plugin-indent-blankline": { + "flake": false, + "locked": { + "lastModified": 1710388427, + "narHash": "sha256-Xp8ZQBz0in2MX3l0bnLUsSbH0lDPE+QvdmFpBFry5yY=", + "owner": "lukas-reineke", + "repo": "indent-blankline.nvim", + "rev": "3d08501caef2329aba5121b753e903904088f7e6", + "type": "github" + }, + "original": { + "owner": "lukas-reineke", + "repo": "indent-blankline.nvim", + "type": "github" + } + }, + "plugin-leap-nvim": { + "flake": false, + "locked": { + "lastModified": 1712927908, + "narHash": "sha256-sSnofCInXuqaDEawT4vN1WdYl1cjK++BjSFnR1wXjr4=", + "owner": "ggandor", + "repo": "leap.nvim", + "rev": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b", + "type": "github" + }, + "original": { + "owner": "ggandor", + "repo": "leap.nvim", + "type": "github" + } + }, + "plugin-lsp-lines": { + "flake": false, + "locked": { + "lastModified": 1709989705, + "narHash": "sha256-opViLzbwtyUgDoaVKz4z6SN06N8jCQ0YmoqPIht8e64=", + "owner": "~whynothugo", + "repo": "lsp_lines.nvim", + "rev": "6f3defec73f7c87939e800e9afa5d0571b19b401", + "type": "sourcehut" + }, + "original": { + "owner": "~whynothugo", + "repo": "lsp_lines.nvim", + "type": "sourcehut" + } + }, + "plugin-lsp-signature": { + "flake": false, + "locked": { + "lastModified": 1710647656, + "narHash": "sha256-O7y7pcCvF0xUFamG+wMLe4mC6hUQ679rJV+ZUoWB0oY=", + "owner": "ray-x", + "repo": "lsp_signature.nvim", + "rev": "c6aeb2f1d2538bbdfdaab1664d9d4c3c75aa9db8", + "type": "github" + }, + "original": { + "owner": "ray-x", + "repo": "lsp_signature.nvim", + "type": "github" + } + }, + "plugin-lspkind": { + "flake": false, + "locked": { + "lastModified": 1704982040, + "narHash": "sha256-/QLdBU/Zwmkw1NGuLBD48tvrmIP9d9WHhgcLEQgRTWo=", + "owner": "onsails", + "repo": "lspkind-nvim", + "rev": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf", + "type": "github" + }, + "original": { + "owner": "onsails", + "repo": "lspkind-nvim", + "type": "github" + } + }, + "plugin-lspsaga": { + "flake": false, + "locked": { + "lastModified": 1670360222, + "narHash": "sha256-7ENInq3LAPPTdm0Fb7klOc630j8m4LRj1kLZZFYLh68=", + "owner": "tami5", + "repo": "lspsaga.nvim", + "rev": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", + "type": "github" + }, + "original": { + "owner": "tami5", + "repo": "lspsaga.nvim", + "type": "github" + } + }, + "plugin-lualine": { + "flake": false, + "locked": { + "lastModified": 1712310396, + "narHash": "sha256-WcH2dWdRDgMkwBQhcgT+Z/ArMdm+VbRhmQftx4t2kNI=", + "owner": "hoob3rt", + "repo": "lualine.nvim", + "rev": "0a5a66803c7407767b799067986b4dc3036e1983", + "type": "github" + }, + "original": { + "owner": "hoob3rt", + "repo": "lualine.nvim", + "type": "github" + } + }, + "plugin-mind-nvim": { + "flake": false, + "locked": { + "lastModified": 1679526071, + "narHash": "sha256-JIhAhQYGLLRucwlhzfckQYU5qjqbHtNH52JlGS5a79w=", + "owner": "phaazon", + "repo": "mind.nvim", + "rev": "002137dd7cf97865ebd01b6a260209d2daf2da66", + "type": "github" + }, + "original": { + "owner": "phaazon", + "repo": "mind.nvim", + "type": "github" + } + }, + "plugin-minimap-vim": { + "flake": false, + "locked": { + "lastModified": 1710689313, + "narHash": "sha256-GR8VAHla5HWry1TAZQv0Xp7iG256vIGeQcBGMxyt310=", + "owner": "wfxr", + "repo": "minimap.vim", + "rev": "395378137e6180762d5b963ca9ad5ac2db5d3283", + "type": "github" + }, + "original": { + "owner": "wfxr", + "repo": "minimap.vim", + "type": "github" + } + }, + "plugin-modes-nvim": { + "flake": false, + "locked": { + "lastModified": 1702245923, + "narHash": "sha256-Kd2hf5obrPvCVLtRcFjLd75byyrB2o3uYCSEMW6IeCc=", + "owner": "mvllow", + "repo": "modes.nvim", + "rev": "4035a46aaabe43faf1b54740575af9dd5bb03809", + "type": "github" + }, + "original": { + "owner": "mvllow", + "repo": "modes.nvim", + "type": "github" + } + }, + "plugin-neocord": { + "flake": false, + "locked": { + "lastModified": 1713923379, + "narHash": "sha256-oVWdnQlgXIMzMiybMq7yR/WfEW+Fm5RmhWx0RWprlfQ=", + "owner": "IogaMaster", + "repo": "neocord", + "rev": "aa7a58023166533da83ca7b11c0d2569e45d7381", + "type": "github" + }, + "original": { + "owner": "IogaMaster", + "repo": "neocord", + "type": "github" + } + }, + "plugin-neodev-nvim": { + "flake": false, + "locked": { + "lastModified": 1711715247, + "narHash": "sha256-mAJOMVN7/xO7ykVNAeTeX+z2A/7yB8zdqlEKHL6Pb74=", + "owner": "folke", + "repo": "neodev.nvim", + "rev": "ce9a2e8eaba5649b553529c5498acb43a6c317cd", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "neodev.nvim", + "type": "github" + } + }, + "plugin-noice-nvim": { + "flake": false, + "locked": { + "lastModified": 1711471279, + "narHash": "sha256-y6gHNkWVsIuwBf7MblCTKTZSqjGDxqeFeQZWexzwk94=", "owner": "folke", "repo": "noice.nvim", - "rev": "bf67d70bd7265d075191e7812d8eb42b9791f737", + "rev": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12", "type": "github" }, "original": { @@ -964,30 +979,31 @@ "type": "github" } }, - "none-ls": { + "plugin-none-ls": { "flake": false, "locked": { - "lastModified": 1706069423, - "narHash": "sha256-s+Hp0Yzge7FKKDez4DO8uytsNORIqeNWYOLSO7kSZbo=", + "lastModified": 1708525772, + "narHash": "sha256-VCDUKiy9C3Bu9suf2bI6XSis1+j01oFC3GFPyQxi74c=", "owner": "nvimtools", "repo": "none-ls.nvim", - "rev": "a311c7cc8f17543143a7482cdbe3a384c371d56a", + "rev": "bb680d752cec37949faca7a1f509e2fe67ab418a", "type": "github" }, "original": { "owner": "nvimtools", "repo": "none-ls.nvim", + "rev": "bb680d752cec37949faca7a1f509e2fe67ab418a", "type": "github" } }, - "nui-nvim": { + "plugin-nui-nvim": { "flake": false, "locked": { - "lastModified": 1704411133, - "narHash": "sha256-SWG0IQDNXrgWK1ApQSpc2oPKNYgTPend877DQ6FuqUc=", + "lastModified": 1710740032, + "narHash": "sha256-Zr5CNx6BIM6naCXW8YBc/Oj1qOtWV/3tuMoaaZjoSZA=", "owner": "MunifTanjim", "repo": "nui.nvim", - "rev": "35da9ca1de0fc4dda96c2e214d93d363c145f418", + "rev": "cbd2668414331c10039278f558630ed19b93e69b", "type": "github" }, "original": { @@ -996,14 +1012,14 @@ "type": "github" } }, - "nvim-autopairs": { + "plugin-nvim-autopairs": { "flake": false, "locked": { - "lastModified": 1705959312, - "narHash": "sha256-4sZoZfg6ORbEwbvjIRnaDrKtVnoHpx7cAOcxn1Er6pg=", + "lastModified": 1712441622, + "narHash": "sha256-ta+0jw7P0ESThP8q2c+CD+nCzPMyHH2Cy3kjjysH0TE=", "owner": "windwp", "repo": "nvim-autopairs", - "rev": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b", + "rev": "4f41e5940bc0443fdbe5f995e2a596847215cd2a", "type": "github" }, "original": { @@ -1012,14 +1028,14 @@ "type": "github" } }, - "nvim-bufferline-lua": { + "plugin-nvim-bufferline-lua": { "flake": false, "locked": { - "lastModified": 1706180994, - "narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=", + "lastModified": 1713769392, + "narHash": "sha256-bHlmaNXfZTlTm/8v48FwCde9ljZFLv25efYF5355bnw=", "owner": "akinsho", "repo": "nvim-bufferline.lua", - "rev": "d6cb9b7cac52887bcac65f8698e67479553c0748", + "rev": "73540cb95f8d95aa1af3ed57713c6720c78af915", "type": "github" }, "original": { @@ -1028,14 +1044,14 @@ "type": "github" } }, - "nvim-cmp": { + "plugin-nvim-cmp": { "flake": false, "locked": { - "lastModified": 1702541213, - "narHash": "sha256-BtAYRYn6m788zAq/mNnbAzAxp1TGf9QkRE0hSOp9sdc=", + "lastModified": 1713837627, + "narHash": "sha256-rz+JMd/hsUEDNVan2sCuEGtbsOVi6oRmPtps+7qSXQE=", "owner": "hrsh7th", "repo": "nvim-cmp", - "rev": "538e37ba87284942c1d76ed38dd497e54e65b891", + "rev": "8f3c541407e691af6163e2447f3af1bd6e17f9a3", "type": "github" }, "original": { @@ -1044,7 +1060,7 @@ "type": "github" } }, - "nvim-code-action-menu": { + "plugin-nvim-code-action-menu": { "flake": false, "locked": { "lastModified": 1702287297, @@ -1060,7 +1076,7 @@ "type": "github" } }, - "nvim-colorizer-lua": { + "plugin-nvim-colorizer-lua": { "flake": false, "locked": { "lastModified": 1703321305, @@ -1076,23 +1092,7 @@ "type": "github" } }, - "nvim-compe": { - "flake": false, - "locked": { - "lastModified": 1633188506, - "narHash": "sha256-Y2oqvsuAKM3qjmmtJVD9z34682eCRF25kPL+rxhhg7I=", - "owner": "hrsh7th", - "repo": "nvim-compe", - "rev": "d186d739c54823e0b010feb205c6f97792322c08", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "nvim-compe", - "type": "github" - } - }, - "nvim-cursorline": { + "plugin-nvim-cursorline": { "flake": false, "locked": { "lastModified": 1650034925, @@ -1108,14 +1108,14 @@ "type": "github" } }, - "nvim-dap": { + "plugin-nvim-dap": { "flake": false, "locked": { - "lastModified": 1705151920, - "narHash": "sha256-9Rc4dxbgN1LxoXPXHTi+V92MA0fEn5PveqCSMHbgn98=", + "lastModified": 1713432622, + "narHash": "sha256-kEn2INrNMQSLHY3gpSVV+cTx9f1nFeUCM6by9WGn5Sg=", "owner": "mfussenegger", "repo": "nvim-dap", - "rev": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5", + "rev": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb", "type": "github" }, "original": { @@ -1124,14 +1124,14 @@ "type": "github" } }, - "nvim-dap-ui": { + "plugin-nvim-dap-ui": { "flake": false, "locked": { - "lastModified": 1705942789, - "narHash": "sha256-4tYSdxPj+/hxd8KNzCU6Lvf+ACxpKgYyGOlF+Jwzxa8=", + "lastModified": 1710867604, + "narHash": "sha256-KAwCt8E3lC0fzXQ9GpPsdb9wdWC6G2P4C/YFQFY9AAM=", "owner": "rcarriga", "repo": "nvim-dap-ui", - "rev": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f", + "rev": "edfa93f60b189e5952c016eee262d0685d838450", "type": "github" }, "original": { @@ -1140,7 +1140,7 @@ "type": "github" } }, - "nvim-docs-view": { + "plugin-nvim-docs-view": { "flake": false, "locked": { "lastModified": 1705711563, @@ -1156,7 +1156,7 @@ "type": "github" } }, - "nvim-lightbulb": { + "plugin-nvim-lightbulb": { "flake": false, "locked": { "lastModified": 1689887436, @@ -1172,14 +1172,14 @@ "type": "github" } }, - "nvim-lspconfig": { + "plugin-nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1705757419, - "narHash": "sha256-StYsN9C2rV471JkncUR1PFeXs0S15ZGTF1DigSbwOHI=", + "lastModified": 1713908193, + "narHash": "sha256-VdIoInJj2u49WHN4+WX0kNHdbXgh0AqIPU+OAiUaBck=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "8917d2c830e04bf944a699b8c41f097621283828", + "rev": "cfa386fc4027e847156ee16141ea1f4c0bc2f0a4", "type": "github" }, "original": { @@ -1188,14 +1188,14 @@ "type": "github" } }, - "nvim-navbuddy": { + "plugin-nvim-navbuddy": { "flake": false, "locked": { - "lastModified": 1694669446, - "narHash": "sha256-zy1Tq8M5UITNAwtAlFYaUFlHnIZ5LWD9ZLaZcy7ulQ8=", + "lastModified": 1711239174, + "narHash": "sha256-EZXzFjGsZHkb2Ui5uvOottPHA8X15F6xyikab4dBlYk=", "owner": "SmiteshP", "repo": "nvim-navbuddy", - "rev": "f137a3466a6cd1965cdcc5398daff54e66eebbe5", + "rev": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8", "type": "github" }, "original": { @@ -1204,7 +1204,7 @@ "type": "github" } }, - "nvim-navic": { + "plugin-nvim-navic": { "flake": false, "locked": { "lastModified": 1701345631, @@ -1220,7 +1220,7 @@ "type": "github" } }, - "nvim-neoclip": { + "plugin-nvim-neoclip": { "flake": false, "locked": { "lastModified": 1701664728, @@ -1236,14 +1236,30 @@ "type": "github" } }, - "nvim-notify": { + "plugin-nvim-nio": { "flake": false, "locked": { - "lastModified": 1705342184, - "narHash": "sha256-WhC80NnWXEAYHLORpUPIXb2s1ERJxyK3l2L9oke68mo=", + "lastModified": 1712221544, + "narHash": "sha256-ZRYclqsgAvlRBwb59XHlqVat7CxUJTH1rD6QLwh1ang=", + "owner": "nvim-neotest", + "repo": "nvim-nio", + "rev": "5800f585def265d52f1d8848133217c800bcb25d", + "type": "github" + }, + "original": { + "owner": "nvim-neotest", + "repo": "nvim-nio", + "type": "github" + } + }, + "plugin-nvim-notify": { + "flake": false, + "locked": { + "lastModified": 1708161547, + "narHash": "sha256-xJYPOX4YLcWojMCdP1RO22/7FMrbcBQxqxrcVCE2TrU=", "owner": "rcarriga", "repo": "nvim-notify", - "rev": "80b67b265530632505193553d05127ae7fe09ddd", + "rev": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15", "type": "github" }, "original": { @@ -1252,14 +1268,14 @@ "type": "github" } }, - "nvim-session-manager": { + "plugin-nvim-session-manager": { "flake": false, "locked": { - "lastModified": 1705767424, - "narHash": "sha256-BTVhCevq40A7yOYp2fLg6N9A+yarIWJM83Z2bfvlQuU=", + "lastModified": 1708284146, + "narHash": "sha256-+TDWY8mprJfUp9ZFKbz83to7XW8iiovja22jHms+N1A=", "owner": "Shatur", "repo": "neovim-session-manager", - "rev": "b8a22f2c88429a11272117a901db66055abf3e7f", + "rev": "d8e1ba3bbcf3fdc6a887bcfbd94c48ae4707b457", "type": "github" }, "original": { @@ -1268,14 +1284,14 @@ "type": "github" } }, - "nvim-surround": { + "plugin-nvim-surround": { "flake": false, "locked": { - "lastModified": 1705526094, - "narHash": "sha256-CGAQtBxhiP6AUQzwdra5AOpsNu+oeLO2hCJnmL61jgE=", + "lastModified": 1712807644, + "narHash": "sha256-gXWSCAJhOJKzTFi6QiDqDWPNgBtG5KgyF2t4gposqSY=", "owner": "kylechui", "repo": "nvim-surround", - "rev": "0c02c52182a9c2a7fa7e122b4037f6408e98434a", + "rev": "a4e30d33add8a9743b4f518b3a788b3c8e5def71", "type": "github" }, "original": { @@ -1284,14 +1300,14 @@ "type": "github" } }, - "nvim-tree-lua": { + "plugin-nvim-tree-lua": { "flake": false, "locked": { - "lastModified": 1705818283, - "narHash": "sha256-EKAzWIT2Qs65Il1pwgpkFsCogFViapUiSHcZgVy+QsY=", + "lastModified": 1713946472, + "narHash": "sha256-iD8c/dXt/UcTYDK8/zkTkFW/1Ial8ulCUWojjyXpG8k=", "owner": "nvim-tree", "repo": "nvim-tree.lua", - "rev": "7bdb220d0fe604a77361e92cdbc7af1b8a412126", + "rev": "62008e5cf2e8745c9d23bb599ef642963131057e", "type": "github" }, "original": { @@ -1300,14 +1316,14 @@ "type": "github" } }, - "nvim-treesitter-context": { + "plugin-nvim-treesitter-context": { "flake": false, "locked": { - "lastModified": 1706217055, - "narHash": "sha256-QhmTXikUIye+xxLw52ttRJz9T0bfhn/ks5VSQd8tDo0=", + "lastModified": 1713984790, + "narHash": "sha256-QAudKglQGDRJKrsEcMSjbrxTgQRXO60ZcfOvEnPLUoE=", "owner": "nvim-treesitter", "repo": "nvim-treesitter-context", - "rev": "9c06b115abc57c99cf0aa81dc29490f5001f57a1", + "rev": "4fe0a54e86859744968e1a5c7867b49c86855774", "type": "github" }, "original": { @@ -1316,14 +1332,14 @@ "type": "github" } }, - "nvim-ts-autotag": { + "plugin-nvim-ts-autotag": { "flake": false, "locked": { - "lastModified": 1706174398, - "narHash": "sha256-C3FOh11eF5Blzh6vsFSA6AB7opXl5Gocdti1QhFZ2vM=", + "lastModified": 1707265789, + "narHash": "sha256-cPIEIjcYxX3ZkOyou2mYlHMdhBxCoVTpJVXZtiWe9Ks=", "owner": "windwp", "repo": "nvim-ts-autotag", - "rev": "a65b202cfd08e0e69e531eab737205ff5bc082a4", + "rev": "531f48334c422222aebc888fd36e7d109cb354cd", "type": "github" }, "original": { @@ -1332,14 +1348,14 @@ "type": "github" } }, - "nvim-web-devicons": { + "plugin-nvim-web-devicons": { "flake": false, "locked": { - "lastModified": 1706072160, - "narHash": "sha256-w038PU9i1onEBo3x4bo1kDz9Fo46Whd8ZJhyIqxz3I8=", + "lastModified": 1713675782, + "narHash": "sha256-AW2W6H7OTv52hfZCcYQc5UjFArBWKLeVclrwMt13HOM=", "owner": "nvim-tree", "repo": "nvim-web-devicons", - "rev": "b427ac5f9dff494f839e81441fb3f04a58cbcfbc", + "rev": "beb6367ab8496c9e43f22e0252735fdadae1872d", "type": "github" }, "original": { @@ -1348,14 +1364,14 @@ "type": "github" } }, - "obsidian-nvim": { + "plugin-obsidian-nvim": { "flake": false, "locked": { - "lastModified": 1706230460, - "narHash": "sha256-jl03+C9/L081eza6XwK05GiGZI0U82wqQBMwTjtedv8=", + "lastModified": 1713538455, + "narHash": "sha256-nIAaQa0DBYBQyfTEJi3Lzqs7QJqyw0Cemq6Hm704K60=", "owner": "epwalsh", "repo": "obsidian.nvim", - "rev": "194f9fc798ac0f73dbac2e83fc3d5c99b8f70e78", + "rev": "ec0f44e1921d2701bd99a542031d280f1e3930b5", "type": "github" }, "original": { @@ -1364,14 +1380,14 @@ "type": "github" } }, - "onedark": { + "plugin-onedark": { "flake": false, "locked": { - "lastModified": 1705931596, - "narHash": "sha256-jjvZ2z93xd1Yng8g6+cdsXhLkm2lC7DSUHiFYC+Gg5k=", + "lastModified": 1706527208, + "narHash": "sha256-1+aO8vrUGEe/NIVI1C1xJyuQVPQZ1s510lopkEVP7No=", "owner": "navarasu", "repo": "onedark.nvim", - "rev": "14e5de43cf1ff761c280d1ff5b9980897f5b46c7", + "rev": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429", "type": "github" }, "original": { @@ -1380,14 +1396,14 @@ "type": "github" } }, - "orgmode-nvim": { + "plugin-orgmode-nvim": { "flake": false, "locked": { - "lastModified": 1706216082, - "narHash": "sha256-M9AI3LlJvs6ZqQPeYr+rqRFu4gYVZbLFV3PUuZ77ReE=", + "lastModified": 1713539113, + "narHash": "sha256-0Ayu2kVpnsxu/ER0nx+t7nyU9oNN8URLrGQtAKKb7Ls=", "owner": "nvim-orgmode", "repo": "orgmode", - "rev": "ab045e3084d5987e8939d25d69b09baaf762278c", + "rev": "389e91f6f935aa845bc0cd13dd80f75431c34751", "type": "github" }, "original": { @@ -1396,31 +1412,30 @@ "type": "github" } }, - "oxocarbon": { + "plugin-oxocarbon": { "flake": false, "locked": { - "lastModified": 1687168305, - "narHash": "sha256-2o++5aRDULfI35d+7psa6bk0eSXH2HwfuGjGtYGjR4w=", - "owner": "glyh", + "lastModified": 1701119822, + "narHash": "sha256-++JALLPklok9VY2ChOddTYDvDNVadmCeB98jCAJYCZ0=", + "owner": "nyoom-engineering", "repo": "oxocarbon.nvim", - "rev": "7591d2e18df05374d612acba2b2573c7ff44dce4", + "rev": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2", "type": "github" }, "original": { - "owner": "glyh", - "ref": "lualine-support", + "owner": "nyoom-engineering", "repo": "oxocarbon.nvim", "type": "github" } }, - "plenary-nvim": { + "plugin-plenary-nvim": { "flake": false, "locked": { - "lastModified": 1705841956, - "narHash": "sha256-awRAI1ov9OBt6VuNxk/qjPTSPBYsMJzURKVV+IA7kok=", + "lastModified": 1713788468, + "narHash": "sha256-orGs1npIGIk7MUYadatYrcEXygK7JTj6OqQwy2TLDn0=", "owner": "nvim-lua", "repo": "plenary.nvim", - "rev": "663246936325062427597964d81d30eaa42ab1e4", + "rev": "5129a3693c482fcbc5ab99a7706ffc4360b995a0", "type": "github" }, "original": { @@ -1429,7 +1444,7 @@ "type": "github" } }, - "project-nvim": { + "plugin-project-nvim": { "flake": false, "locked": { "lastModified": 1680567592, @@ -1445,7 +1460,7 @@ "type": "github" } }, - "registers": { + "plugin-registers": { "flake": false, "locked": { "lastModified": 1703954003, @@ -1461,6 +1476,310 @@ "type": "github" } }, + "plugin-rose-pine": { + "flake": false, + "locked": { + "lastModified": 1713451685, + "narHash": "sha256-AdPSz5+nCOnLWexBasHuxRxEKbL4WVg+uV78//W5nLs=", + "owner": "rose-pine", + "repo": "neovim", + "rev": "17b466e79479758b332a3cac12544a3ad2be6241", + "type": "github" + }, + "original": { + "owner": "rose-pine", + "repo": "neovim", + "type": "github" + } + }, + "plugin-rust-tools": { + "flake": false, + "locked": { + "lastModified": 1704259376, + "narHash": "sha256-kFane5ze7VDiOzF7jdmXkr50XQsNvdb+a9HQtybEVE0=", + "owner": "simrat39", + "repo": "rust-tools.nvim", + "rev": "676187908a1ce35ffcd727c654ed68d851299d3e", + "type": "github" + }, + "original": { + "owner": "simrat39", + "repo": "rust-tools.nvim", + "type": "github" + } + }, + "plugin-scrollbar-nvim": { + "flake": false, + "locked": { + "lastModified": 1684886154, + "narHash": "sha256-zLBexSxQCn9HPY04a9w/UCJP1F5ShI2X12I9xE9H0cM=", + "owner": "petertriho", + "repo": "nvim-scrollbar", + "rev": "35f99d559041c7c0eff3a41f9093581ceea534e8", + "type": "github" + }, + "original": { + "owner": "petertriho", + "repo": "nvim-scrollbar", + "type": "github" + } + }, + "plugin-smartcolumn": { + "flake": false, + "locked": { + "lastModified": 1710067624, + "narHash": "sha256-DHIeDNUF9n9s14GVeojIwc5QUPwJMYYl3gRvhvO/rdE=", + "owner": "m4xshen", + "repo": "smartcolumn.nvim", + "rev": "cefb17be095ad5526030a21bb2a80553cae09127", + "type": "github" + }, + "original": { + "owner": "m4xshen", + "repo": "smartcolumn.nvim", + "type": "github" + } + }, + "plugin-sqls-nvim": { + "flake": false, + "locked": { + "lastModified": 1684697500, + "narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=", + "owner": "nanotee", + "repo": "sqls.nvim", + "rev": "4b1274b5b44c48ce784aac23747192f5d9d26207", + "type": "github" + }, + "original": { + "owner": "nanotee", + "repo": "sqls.nvim", + "type": "github" + } + }, + "plugin-tabular": { + "flake": false, + "locked": { + "lastModified": 1550598128, + "narHash": "sha256-irolBA/m3YIaezl+90h5G+xUOpad+3u44uJqDs4JCUs=", + "owner": "godlygeek", + "repo": "tabular", + "rev": "339091ac4dd1f17e225fe7d57b48aff55f99b23a", + "type": "github" + }, + "original": { + "owner": "godlygeek", + "repo": "tabular", + "type": "github" + } + }, + "plugin-telescope": { + "flake": false, + "locked": { + "lastModified": 1713665692, + "narHash": "sha256-wlRiwT1TCtwPXnIwnzqa6ZABUzJYn+lSRyvkqe6Dbsw=", + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "rev": "7d1698f3d88b448e0639974248cc17f49b7b8acf", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "type": "github" + } + }, + "plugin-todo-comments": { + "flake": false, + "locked": { + "lastModified": 1711553769, + "narHash": "sha256-BJNU01iTRDNrPv48fgiJRS+ouaHkoqw2AYXKDRgDzfw=", + "owner": "folke", + "repo": "todo-comments.nvim", + "rev": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "todo-comments.nvim", + "type": "github" + } + }, + "plugin-toggleterm-nvim": { + "flake": false, + "locked": { + "lastModified": 1713792255, + "narHash": "sha256-mM5bGgAemsRJD9U6U5K6ia5qb8NaTusM99x6xrtEBfw=", + "owner": "akinsho", + "repo": "toggleterm.nvim", + "rev": "066cccf48a43553a80a210eb3be89a15d789d6e6", + "type": "github" + }, + "original": { + "owner": "akinsho", + "repo": "toggleterm.nvim", + "type": "github" + } + }, + "plugin-tokyonight": { + "flake": false, + "locked": { + "lastModified": 1713855116, + "narHash": "sha256-vUEPbgDen3ubcyJZdWCgnChOo1T0LFvZI++8RgGGx1Y=", + "owner": "folke", + "repo": "tokyonight.nvim", + "rev": "67afeaf7fd6ebba000633e89f63c31694057edde", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "tokyonight.nvim", + "type": "github" + } + }, + "plugin-trouble": { + "flake": false, + "locked": { + "lastModified": 1711693365, + "narHash": "sha256-kIQ72fqAsiMF9jq0MzC6peaHJddYn5PRNXfYFHTQB5Q=", + "owner": "folke", + "repo": "trouble.nvim", + "rev": "b9cf677f20bb2faa2dacfa870b084e568dca9572", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "trouble.nvim", + "type": "github" + } + }, + "plugin-vim-dirtytalk": { + "flake": false, + "locked": { + "lastModified": 1713047519, + "narHash": "sha256-azU5jkv/fD/qDDyCU1bPNXOH6rmbDauG9jDNrtIXc0Y=", + "owner": "psliwka", + "repo": "vim-dirtytalk", + "rev": "aa57ba902b04341a04ff97214360f56856493583", + "type": "github" + }, + "original": { + "owner": "psliwka", + "repo": "vim-dirtytalk", + "type": "github" + } + }, + "plugin-vim-fugitive": { + "flake": false, + "locked": { + "lastModified": 1712554826, + "narHash": "sha256-pmY1EQbupKvsqok9O5omkOWi0BEZ8df7HL0F7ubdY9Q=", + "owner": "tpope", + "repo": "vim-fugitive", + "rev": "dac8e5c2d85926df92672bf2afb4fc48656d96c7", + "type": "github" + }, + "original": { + "owner": "tpope", + "repo": "vim-fugitive", + "type": "github" + } + }, + "plugin-vim-illuminate": { + "flake": false, + "locked": { + "lastModified": 1713467568, + "narHash": "sha256-o0D1edrsHkaljrzBFZXjdxiK/5ziCGJxM/kYNJgBI1E=", + "owner": "RRethy", + "repo": "vim-illuminate", + "rev": "e522e0dd742a83506db0a72e1ced68c9c130f185", + "type": "github" + }, + "original": { + "owner": "RRethy", + "repo": "vim-illuminate", + "type": "github" + } + }, + "plugin-vim-markdown": { + "flake": false, + "locked": { + "lastModified": 1709279705, + "narHash": "sha256-eKwWdyvMZ7FV3FvOtqWVD7pulXNnhbEEjHq7MYg1woU=", + "owner": "preservim", + "repo": "vim-markdown", + "rev": "a657e697376909c41475a686eeef7fc7a4972d94", + "type": "github" + }, + "original": { + "owner": "preservim", + "repo": "vim-markdown", + "type": "github" + } + }, + "plugin-vim-repeat": { + "flake": false, + "locked": { + "lastModified": 1611544268, + "narHash": "sha256-8rfZa3uKXB3TRCqaDHZ6DfzNbm7WaYnLvmTNzYtnKHg=", + "owner": "tpope", + "repo": "vim-repeat", + "rev": "24afe922e6a05891756ecf331f39a1f6743d3d5a", + "type": "github" + }, + "original": { + "owner": "tpope", + "repo": "vim-repeat", + "type": "github" + } + }, + "plugin-vim-startify": { + "flake": false, + "locked": { + "lastModified": 1695213983, + "narHash": "sha256-W5N/Dqxf9hSXEEJsrEkXInFwBXNBJe9Dzx9TVS12mPk=", + "owner": "mhinz", + "repo": "vim-startify", + "rev": "4e089dffdad46f3f5593f34362d530e8fe823dcf", + "type": "github" + }, + "original": { + "owner": "mhinz", + "repo": "vim-startify", + "type": "github" + } + }, + "plugin-vim-vsnip": { + "flake": false, + "locked": { + "lastModified": 1704937299, + "narHash": "sha256-gvm6z4pgSULBVPukewRyjwxZ0vZgreQWbG/0kOB1QBo=", + "owner": "hrsh7th", + "repo": "vim-vsnip", + "rev": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "vim-vsnip", + "type": "github" + } + }, + "plugin-which-key": { + "flake": false, + "locked": { + "lastModified": 1697801635, + "narHash": "sha256-uvghPj/teWrRMm09Gh8iQ/LV2nYJw0lmoiZK6L4+1cY=", + "owner": "folke", + "repo": "which-key.nvim", + "rev": "4433e5ec9a507e5097571ed55c02ea9658fb268a", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "which-key.nvim", + "type": "github" + } + }, "rnix-lsp": { "inputs": { "naersk": "naersk", @@ -1483,128 +1802,114 @@ }, "root": { "inputs": { - "alpha-nvim": "alpha-nvim", - "bufdelete-nvim": "bufdelete-nvim", - "catppuccin": "catppuccin", - "ccc": "ccc", - "cellular-automaton": "cellular-automaton", - "cheatsheet-nvim": "cheatsheet-nvim", - "cinnamon-nvim": "cinnamon-nvim", - "cmp-buffer": "cmp-buffer", - "cmp-nvim-lsp": "cmp-nvim-lsp", - "cmp-path": "cmp-path", - "cmp-treesitter": "cmp-treesitter", - "cmp-vsnip": "cmp-vsnip", - "codewindow-nvim": "codewindow-nvim", - "comment-nvim": "comment-nvim", - "copilot-cmp": "copilot-cmp", - "copilot-lua": "copilot-lua", - "crates-nvim": "crates-nvim", - "dashboard-nvim": "dashboard-nvim", - "diffview-nvim": "diffview-nvim", - "dracula": "dracula", - "dressing-nvim": "dressing-nvim", - "elixir-ls": "elixir-ls", - "elixir-tools": "elixir-tools", - "fidget-nvim": "fidget-nvim", "flake-parts": "flake-parts", "flake-utils": "flake-utils", - "flutter-tools": "flutter-tools", - "gesture-nvim": "gesture-nvim", - "gitsigns-nvim": "gitsigns-nvim", - "glow-nvim": "glow-nvim", - "gruvbox": "gruvbox", - "highlight-undo": "highlight-undo", - "hop-nvim": "hop-nvim", - "icon-picker-nvim": "icon-picker-nvim", - "indent-blankline": "indent-blankline", - "kommentary": "kommentary", - "leap-nvim": "leap-nvim", - "lsp-lines": "lsp-lines", - "lsp-signature": "lsp-signature", - "lspkind": "lspkind", - "lspsaga": "lspsaga", - "lualine": "lualine", - "mind-nvim": "mind-nvim", - "minimap-vim": "minimap-vim", - "modes-nvim": "modes-nvim", - "neocord": "neocord", - "neodev-nvim": "neodev-nvim", "nil": "nil", "nixpkgs": "nixpkgs", "nmd": "nmd", - "noice-nvim": "noice-nvim", - "none-ls": "none-ls", - "nui-nvim": "nui-nvim", - "nvim-autopairs": "nvim-autopairs", - "nvim-bufferline-lua": "nvim-bufferline-lua", - "nvim-cmp": "nvim-cmp", - "nvim-code-action-menu": "nvim-code-action-menu", - "nvim-colorizer-lua": "nvim-colorizer-lua", - "nvim-compe": "nvim-compe", - "nvim-cursorline": "nvim-cursorline", - "nvim-dap": "nvim-dap", - "nvim-dap-ui": "nvim-dap-ui", - "nvim-docs-view": "nvim-docs-view", - "nvim-lightbulb": "nvim-lightbulb", - "nvim-lspconfig": "nvim-lspconfig", - "nvim-navbuddy": "nvim-navbuddy", - "nvim-navic": "nvim-navic", - "nvim-neoclip": "nvim-neoclip", - "nvim-notify": "nvim-notify", - "nvim-session-manager": "nvim-session-manager", - "nvim-surround": "nvim-surround", - "nvim-tree-lua": "nvim-tree-lua", - "nvim-treesitter-context": "nvim-treesitter-context", - "nvim-ts-autotag": "nvim-ts-autotag", - "nvim-web-devicons": "nvim-web-devicons", - "obsidian-nvim": "obsidian-nvim", - "onedark": "onedark", - "orgmode-nvim": "orgmode-nvim", - "oxocarbon": "oxocarbon", - "plenary-nvim": "plenary-nvim", - "project-nvim": "project-nvim", - "registers": "registers", + "plugin-alpha-nvim": "plugin-alpha-nvim", + "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", + "plugin-catppuccin": "plugin-catppuccin", + "plugin-ccc": "plugin-ccc", + "plugin-cellular-automaton": "plugin-cellular-automaton", + "plugin-chatgpt": "plugin-chatgpt", + "plugin-cheatsheet-nvim": "plugin-cheatsheet-nvim", + "plugin-cinnamon-nvim": "plugin-cinnamon-nvim", + "plugin-cmp-buffer": "plugin-cmp-buffer", + "plugin-cmp-nvim-lsp": "plugin-cmp-nvim-lsp", + "plugin-cmp-path": "plugin-cmp-path", + "plugin-cmp-treesitter": "plugin-cmp-treesitter", + "plugin-cmp-vsnip": "plugin-cmp-vsnip", + "plugin-codewindow-nvim": "plugin-codewindow-nvim", + "plugin-comment-nvim": "plugin-comment-nvim", + "plugin-copilot-cmp": "plugin-copilot-cmp", + "plugin-copilot-lua": "plugin-copilot-lua", + "plugin-crates-nvim": "plugin-crates-nvim", + "plugin-dashboard-nvim": "plugin-dashboard-nvim", + "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", + "plugin-gesture-nvim": "plugin-gesture-nvim", + "plugin-gitsigns-nvim": "plugin-gitsigns-nvim", + "plugin-glow-nvim": "plugin-glow-nvim", + "plugin-gruvbox": "plugin-gruvbox", + "plugin-highlight-undo": "plugin-highlight-undo", + "plugin-hop-nvim": "plugin-hop-nvim", + "plugin-icon-picker-nvim": "plugin-icon-picker-nvim", + "plugin-image-nvim": "plugin-image-nvim", + "plugin-indent-blankline": "plugin-indent-blankline", + "plugin-leap-nvim": "plugin-leap-nvim", + "plugin-lsp-lines": "plugin-lsp-lines", + "plugin-lsp-signature": "plugin-lsp-signature", + "plugin-lspkind": "plugin-lspkind", + "plugin-lspsaga": "plugin-lspsaga", + "plugin-lualine": "plugin-lualine", + "plugin-mind-nvim": "plugin-mind-nvim", + "plugin-minimap-vim": "plugin-minimap-vim", + "plugin-modes-nvim": "plugin-modes-nvim", + "plugin-neocord": "plugin-neocord", + "plugin-neodev-nvim": "plugin-neodev-nvim", + "plugin-noice-nvim": "plugin-noice-nvim", + "plugin-none-ls": "plugin-none-ls", + "plugin-nui-nvim": "plugin-nui-nvim", + "plugin-nvim-autopairs": "plugin-nvim-autopairs", + "plugin-nvim-bufferline-lua": "plugin-nvim-bufferline-lua", + "plugin-nvim-cmp": "plugin-nvim-cmp", + "plugin-nvim-code-action-menu": "plugin-nvim-code-action-menu", + "plugin-nvim-colorizer-lua": "plugin-nvim-colorizer-lua", + "plugin-nvim-cursorline": "plugin-nvim-cursorline", + "plugin-nvim-dap": "plugin-nvim-dap", + "plugin-nvim-dap-ui": "plugin-nvim-dap-ui", + "plugin-nvim-docs-view": "plugin-nvim-docs-view", + "plugin-nvim-lightbulb": "plugin-nvim-lightbulb", + "plugin-nvim-lspconfig": "plugin-nvim-lspconfig", + "plugin-nvim-navbuddy": "plugin-nvim-navbuddy", + "plugin-nvim-navic": "plugin-nvim-navic", + "plugin-nvim-neoclip": "plugin-nvim-neoclip", + "plugin-nvim-nio": "plugin-nvim-nio", + "plugin-nvim-notify": "plugin-nvim-notify", + "plugin-nvim-session-manager": "plugin-nvim-session-manager", + "plugin-nvim-surround": "plugin-nvim-surround", + "plugin-nvim-tree-lua": "plugin-nvim-tree-lua", + "plugin-nvim-treesitter-context": "plugin-nvim-treesitter-context", + "plugin-nvim-ts-autotag": "plugin-nvim-ts-autotag", + "plugin-nvim-web-devicons": "plugin-nvim-web-devicons", + "plugin-obsidian-nvim": "plugin-obsidian-nvim", + "plugin-onedark": "plugin-onedark", + "plugin-orgmode-nvim": "plugin-orgmode-nvim", + "plugin-oxocarbon": "plugin-oxocarbon", + "plugin-plenary-nvim": "plugin-plenary-nvim", + "plugin-project-nvim": "plugin-project-nvim", + "plugin-registers": "plugin-registers", + "plugin-rose-pine": "plugin-rose-pine", + "plugin-rust-tools": "plugin-rust-tools", + "plugin-scrollbar-nvim": "plugin-scrollbar-nvim", + "plugin-smartcolumn": "plugin-smartcolumn", + "plugin-sqls-nvim": "plugin-sqls-nvim", + "plugin-tabular": "plugin-tabular", + "plugin-telescope": "plugin-telescope", + "plugin-todo-comments": "plugin-todo-comments", + "plugin-toggleterm-nvim": "plugin-toggleterm-nvim", + "plugin-tokyonight": "plugin-tokyonight", + "plugin-trouble": "plugin-trouble", + "plugin-vim-dirtytalk": "plugin-vim-dirtytalk", + "plugin-vim-fugitive": "plugin-vim-fugitive", + "plugin-vim-illuminate": "plugin-vim-illuminate", + "plugin-vim-markdown": "plugin-vim-markdown", + "plugin-vim-repeat": "plugin-vim-repeat", + "plugin-vim-startify": "plugin-vim-startify", + "plugin-vim-vsnip": "plugin-vim-vsnip", + "plugin-which-key": "plugin-which-key", "rnix-lsp": "rnix-lsp", - "rose-pine": "rose-pine", - "rust-tools": "rust-tools", - "scrollbar-nvim": "scrollbar-nvim", - "smartcolumn": "smartcolumn", - "sqls-nvim": "sqls-nvim", "systems": "systems_2", - "tabular": "tabular", - "telescope": "telescope", "tidalcycles": "tidalcycles", - "todo-comments": "todo-comments", - "toggleterm-nvim": "toggleterm-nvim", - "tokyonight": "tokyonight", - "trouble": "trouble", - "vim-dirtytalk": "vim-dirtytalk", - "vim-illuminate": "vim-illuminate", - "vim-markdown": "vim-markdown", - "vim-repeat": "vim-repeat", - "vim-startify": "vim-startify", - "vim-vsnip": "vim-vsnip", - "which-key": "which-key", "zig": "zig" } }, - "rose-pine": { - "flake": false, - "locked": { - "lastModified": 1707703907, - "narHash": "sha256-jmDGDlCurGAG85SglAwmQr943kVr8KUr11zpPejQliQ=", - "owner": "rose-pine", - "repo": "neovim", - "rev": "f01ce3a71748a92997d266cfe2c985decd18c601", - "type": "github" - }, - "original": { - "owner": "rose-pine", - "repo": "neovim", - "type": "github" - } - }, "rust-overlay": { "inputs": { "flake-utils": [ @@ -1630,70 +1935,6 @@ "type": "github" } }, - "rust-tools": { - "flake": false, - "locked": { - "lastModified": 1704259376, - "narHash": "sha256-kFane5ze7VDiOzF7jdmXkr50XQsNvdb+a9HQtybEVE0=", - "owner": "simrat39", - "repo": "rust-tools.nvim", - "rev": "676187908a1ce35ffcd727c654ed68d851299d3e", - "type": "github" - }, - "original": { - "owner": "simrat39", - "repo": "rust-tools.nvim", - "type": "github" - } - }, - "scrollbar-nvim": { - "flake": false, - "locked": { - "lastModified": 1684886154, - "narHash": "sha256-zLBexSxQCn9HPY04a9w/UCJP1F5ShI2X12I9xE9H0cM=", - "owner": "petertriho", - "repo": "nvim-scrollbar", - "rev": "35f99d559041c7c0eff3a41f9093581ceea534e8", - "type": "github" - }, - "original": { - "owner": "petertriho", - "repo": "nvim-scrollbar", - "type": "github" - } - }, - "smartcolumn": { - "flake": false, - "locked": { - "lastModified": 1703592909, - "narHash": "sha256-c5tENO4LJaSRELxuCOp/aI94ifhKjqd8J2chJbxfFdc=", - "owner": "m4xshen", - "repo": "smartcolumn.nvim", - "rev": "a52915d6d9abf9972e249ebcffcc651cf9b062dd", - "type": "github" - }, - "original": { - "owner": "m4xshen", - "repo": "smartcolumn.nvim", - "type": "github" - } - }, - "sqls-nvim": { - "flake": false, - "locked": { - "lastModified": 1684697500, - "narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=", - "owner": "nanotee", - "repo": "sqls.nvim", - "rev": "4b1274b5b44c48ce784aac23747192f5d9d26207", - "type": "github" - }, - "original": { - "owner": "nanotee", - "repo": "sqls.nvim", - "type": "github" - } - }, "superdirt-src": { "flake": false, "locked": { @@ -1756,38 +1997,6 @@ "type": "github" } }, - "tabular": { - "flake": false, - "locked": { - "lastModified": 1550598128, - "narHash": "sha256-irolBA/m3YIaezl+90h5G+xUOpad+3u44uJqDs4JCUs=", - "owner": "godlygeek", - "repo": "tabular", - "rev": "339091ac4dd1f17e225fe7d57b48aff55f99b23a", - "type": "github" - }, - "original": { - "owner": "godlygeek", - "repo": "tabular", - "type": "github" - } - }, - "telescope": { - "flake": false, - "locked": { - "lastModified": 1706154992, - "narHash": "sha256-uagWtwd/L07RRUpSu+kVv0qD+neySSmSrIeFBJ0gZiM=", - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "rev": "1bfbb1fb5c56d2dbe33216fcb2ebe82e499aa06c", - "type": "github" - }, - "original": { - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "type": "github" - } - }, "tidal-src": { "flake": false, "locked": { @@ -1829,70 +2038,6 @@ "type": "github" } }, - "todo-comments": { - "flake": false, - "locked": { - "lastModified": 1705847650, - "narHash": "sha256-DiyieXXx7iYGWkpeOvduJf0n7dnpaQ7rXmaWvZQaCyE=", - "owner": "folke", - "repo": "todo-comments.nvim", - "rev": "833d8dd8b07eeda37a09e99460f72a02616935cb", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "todo-comments.nvim", - "type": "github" - } - }, - "toggleterm-nvim": { - "flake": false, - "locked": { - "lastModified": 1705944058, - "narHash": "sha256-y+83w0D2jD68QJpBCYXLqUUxVu9MTBZ+nJutYD7jAoQ=", - "owner": "akinsho", - "repo": "toggleterm.nvim", - "rev": "b49df5cdce67a8964d1b027dae94bde212092b51", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "toggleterm.nvim", - "type": "github" - } - }, - "tokyonight": { - "flake": false, - "locked": { - "lastModified": 1706078362, - "narHash": "sha256-qHuX21iC8edV5K0RgHin4PowMtKBXWXQgvHjx2SPTKE=", - "owner": "folke", - "repo": "tokyonight.nvim", - "rev": "e3301873c1e96903daebb98cc9b5926810bf73dd", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "tokyonight.nvim", - "type": "github" - } - }, - "trouble": { - "flake": false, - "locked": { - "lastModified": 1697626811, - "narHash": "sha256-8nLghiueYOtWY7OGVxow9A2G/5lgt+Kt5D8q1xeJvVg=", - "owner": "folke", - "repo": "trouble.nvim", - "rev": "f1168feada93c0154ede4d1fe9183bf69bac54ea", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "trouble.nvim", - "type": "github" - } - }, "utils": { "locked": { "lastModified": 1656928814, @@ -1926,86 +2071,6 @@ "type": "github" } }, - "vim-dirtytalk": { - "flake": false, - "locked": { - "lastModified": 1697142601, - "narHash": "sha256-ezbcgCvOXhPSpsOZpCI2QIaFFaRGZAFbuAluMvB7Jjk=", - "owner": "psliwka", - "repo": "vim-dirtytalk", - "rev": "f5b0d51a7d822177814e7edc116ca484f852665f", - "type": "github" - }, - "original": { - "owner": "psliwka", - "repo": "vim-dirtytalk", - "type": "github" - } - }, - "vim-illuminate": { - "flake": false, - "locked": { - "lastModified": 1706241276, - "narHash": "sha256-8stuFv+PzjmFKib1Y7kwK4C1db5dlDyptuaz9iU+ptM=", - "owner": "RRethy", - "repo": "vim-illuminate", - "rev": "97c1265ff0b67064b6cfdc15bafc50202a537ae2", - "type": "github" - }, - "original": { - "owner": "RRethy", - "repo": "vim-illuminate", - "type": "github" - } - }, - "vim-markdown": { - "flake": false, - "locked": { - "lastModified": 1698870120, - "narHash": "sha256-d3GDuMlnhweAajSc284wWN/h0teu5uFG6NQTWa+dcxo=", - "owner": "preservim", - "repo": "vim-markdown", - "rev": "46add6c3017d3e4035dc10ffa9cb54221d8dfe1a", - "type": "github" - }, - "original": { - "owner": "preservim", - "repo": "vim-markdown", - "type": "github" - } - }, - "vim-repeat": { - "flake": false, - "locked": { - "lastModified": 1611544268, - "narHash": "sha256-8rfZa3uKXB3TRCqaDHZ6DfzNbm7WaYnLvmTNzYtnKHg=", - "owner": "tpope", - "repo": "vim-repeat", - "rev": "24afe922e6a05891756ecf331f39a1f6743d3d5a", - "type": "github" - }, - "original": { - "owner": "tpope", - "repo": "vim-repeat", - "type": "github" - } - }, - "vim-startify": { - "flake": false, - "locked": { - "lastModified": 1695213983, - "narHash": "sha256-W5N/Dqxf9hSXEEJsrEkXInFwBXNBJe9Dzx9TVS12mPk=", - "owner": "mhinz", - "repo": "vim-startify", - "rev": "4e089dffdad46f3f5593f34362d530e8fe823dcf", - "type": "github" - }, - "original": { - "owner": "mhinz", - "repo": "vim-startify", - "type": "github" - } - }, "vim-tidal-src": { "flake": false, "locked": { @@ -2022,22 +2087,6 @@ "type": "github" } }, - "vim-vsnip": { - "flake": false, - "locked": { - "lastModified": 1704937299, - "narHash": "sha256-gvm6z4pgSULBVPukewRyjwxZ0vZgreQWbG/0kOB1QBo=", - "owner": "hrsh7th", - "repo": "vim-vsnip", - "rev": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "vim-vsnip", - "type": "github" - } - }, "vowel-src": { "flake": false, "locked": { @@ -2055,22 +2104,6 @@ "type": "github" } }, - "which-key": { - "flake": false, - "locked": { - "lastModified": 1697801635, - "narHash": "sha256-uvghPj/teWrRMm09Gh8iQ/LV2nYJw0lmoiZK6L4+1cY=", - "owner": "folke", - "repo": "which-key.nvim", - "rev": "4433e5ec9a507e5097571ed55c02ea9658fb268a", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "which-key.nvim", - "type": "github" - } - }, "zig": { "inputs": { "flake-compat": "flake-compat", @@ -2078,11 +2111,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1706288111, - "narHash": "sha256-CvSS/BMm86Uzjeb8pEkWa3qnuzMiPPmT8hf5lDOP6TE=", + "lastModified": 1713960597, + "narHash": "sha256-WAryNIrMfZ48iZSTh8hcHIX9vwh78LMFUtewgY7kp1Y=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "7f5d4cbecf3aa75ac8afaef8a20723b3a57f7d20", + "rev": "71894accd2dd096f5a84166a628b1f075311aafe", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 67b6577..e63f7ca 100644 --- a/flake.nix +++ b/flake.nix @@ -22,18 +22,38 @@ flake = { lib = { - inherit (import ./lib/stdlib-extended.nix nixpkgs.lib) nvim; + inherit (import ./lib/stdlib-extended.nix nixpkgs.lib inputs) nvim; inherit (import ./configuration.nix inputs) neovimConfiguration; }; homeManagerModules = { - neovim-flake = { - imports = [ - (import ./lib/module self.packages inputs) - ]; + neovim-flake = + nixpkgs.lib.warn '' + homeManagerModules.neovim-flake has been deprecated. + Plese use the homeManagereModules.nvf instead + '' + self.homeManagerModules.nvf; + + nvf = { + imports = [(import ./flake/modules/home-manager.nix self.packages inputs)]; }; - default = self.homeManagerModules.neovim-flake; + default = self.homeManagerModules.nvf; + }; + + nixosModules = { + neovim-flake = + nixpkgs.lib.warn '' + nixosModules.neovim-flake has been deprecated. + Please use the nixosModules.nvf instead + '' + self.nixosModules.neovim-flake; + + nvf = { + imports = [(import ./flake/modules/nixos.nix self.packages inputs)]; + }; + + default = self.nixosModules.nvf; }; }; @@ -48,7 +68,7 @@ default = self'.devShells.lsp; nvim-nix = pkgs.mkShell {nativeBuildInputs = [config.packages.nix];}; lsp = pkgs.mkShell { - nativeBuildInputs = with pkgs; [nil statix deadnix]; + nativeBuildInputs = with pkgs; [nil statix deadnix alejandra]; }; }; }; @@ -70,123 +90,6 @@ # TODO: get zig from the zig overlay instead of nixpkgs zig.url = "github:mitchellh/zig-overlay"; - # LSP plugins - nvim-lspconfig = { - # url = "github:neovim/nvim-lspconfig?ref=v0.1.3"; - # Use master for nil_ls - url = "github:neovim/nvim-lspconfig"; - flake = false; - }; - - lspsaga = { - url = "github:tami5/lspsaga.nvim"; - flake = false; - }; - - lspkind = { - url = "github:onsails/lspkind-nvim"; - flake = false; - }; - - trouble = { - url = "github:folke/trouble.nvim"; - flake = false; - }; - - nvim-treesitter-context = { - url = "github:nvim-treesitter/nvim-treesitter-context"; - flake = false; - }; - - nvim-lightbulb = { - url = "github:kosayoda/nvim-lightbulb"; - flake = false; - }; - - nvim-code-action-menu = { - url = "github:weilbith/nvim-code-action-menu"; - flake = false; - }; - - lsp-signature = { - url = "github:ray-x/lsp_signature.nvim"; - flake = false; - }; - - lsp-lines = { - url = "sourcehut:~whynothugo/lsp_lines.nvim"; - flake = false; - }; - - none-ls = { - url = "github:nvimtools/none-ls.nvim"; - flake = false; - }; - - nvim-docs-view = { - url = "github:amrbashir/nvim-docs-view"; - flake = false; - }; - - # language support - sqls-nvim = { - url = "github:nanotee/sqls.nvim"; - flake = false; - }; - - rust-tools = { - url = "github:simrat39/rust-tools.nvim"; - flake = false; - }; - - flutter-tools = { - url = "github:akinsho/flutter-tools.nvim"; - flake = false; - }; - - neodev-nvim = { - url = "github:folke/neodev.nvim"; - flake = false; - }; - - elixir-ls = { - url = "github:elixir-lsp/elixir-ls"; - flake = false; - }; - - elixir-tools = { - url = "github:elixir-tools/elixir-tools.nvim"; - flake = false; - }; - - glow-nvim = { - url = "github:ellisonleao/glow.nvim"; - flake = false; - }; - - # Tidal cycles - tidalcycles = { - url = "github:mitchmindtree/tidalcycles.nix"; - inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal"; - }; - - # Copying/Registers - registers = { - url = "github:tversteeg/registers.nvim"; - flake = false; - }; - - nvim-neoclip = { - url = "github:AckslD/nvim-neoclip.lua"; - flake = false; - }; - - # Telescope - telescope = { - url = "github:nvim-telescope/telescope.nvim"; - flake = false; - }; - # Langauge server (use master instead of nixpkgs) rnix-lsp.url = "github:nix-community/rnix-lsp"; nil = { @@ -195,396 +98,532 @@ inputs.flake-utils.follows = "flake-utils"; }; + ### 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"; + flake = false; + }; + + plugin-lspsaga = { + url = "github:tami5/lspsaga.nvim"; + flake = false; + }; + + plugin-lspkind = { + url = "github:onsails/lspkind-nvim"; + flake = false; + }; + + plugin-trouble = { + url = "github:folke/trouble.nvim"; + flake = false; + }; + + plugin-nvim-treesitter-context = { + url = "github:nvim-treesitter/nvim-treesitter-context"; + flake = false; + }; + + plugin-nvim-lightbulb = { + url = "github:kosayoda/nvim-lightbulb"; + flake = false; + }; + + plugin-nvim-code-action-menu = { + url = "github:weilbith/nvim-code-action-menu"; + flake = false; + }; + + plugin-lsp-signature = { + url = "github:ray-x/lsp_signature.nvim"; + flake = false; + }; + + plugin-lsp-lines = { + url = "sourcehut:~whynothugo/lsp_lines.nvim"; + flake = false; + }; + + plugin-none-ls = { + # https://github.com/nvimtools/none-ls.nvim/issues/58 + url = "github:nvimtools/none-ls.nvim/bb680d752cec37949faca7a1f509e2fe67ab418a"; + flake = false; + }; + + plugin-nvim-docs-view = { + url = "github:amrbashir/nvim-docs-view"; + flake = false; + }; + + # language support + plugin-sqls-nvim = { + url = "github:nanotee/sqls.nvim"; + flake = false; + }; + + plugin-rust-tools = { + url = "github:simrat39/rust-tools.nvim"; + flake = false; + }; + + plugin-flutter-tools = { + url = "github:akinsho/flutter-tools.nvim"; + flake = false; + }; + + plugin-neodev-nvim = { + url = "github:folke/neodev.nvim"; + 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"; + flake = false; + }; + + plugin-nvim-neoclip = { + url = "github:AckslD/nvim-neoclip.lua"; + flake = false; + }; + + # Telescope + plugin-telescope = { + url = "github:nvim-telescope/telescope.nvim"; + flake = false; + }; + # Debuggers - nvim-dap = { + plugin-nvim-dap = { url = "github:mfussenegger/nvim-dap"; flake = false; }; - nvim-dap-ui = { + plugin-nvim-dap-ui = { url = "github:rcarriga/nvim-dap-ui"; flake = false; }; # Filetrees - nvim-tree-lua = { + plugin-nvim-tree-lua = { url = "github:nvim-tree/nvim-tree.lua"; flake = false; }; # Tablines - nvim-bufferline-lua = { + plugin-nvim-bufferline-lua = { url = "github:akinsho/nvim-bufferline.lua"; flake = false; }; # Statuslines - lualine = { + plugin-lualine = { url = "github:hoob3rt/lualine.nvim"; flake = false; }; - # Autocompletes - nvim-compe = { - url = "github:hrsh7th/nvim-compe"; - flake = false; - }; - - nvim-cmp = { + plugin-nvim-cmp = { url = "github:hrsh7th/nvim-cmp"; flake = false; }; - cmp-buffer = { + + plugin-cmp-buffer = { url = "github:hrsh7th/cmp-buffer"; flake = false; }; - cmp-nvim-lsp = { + + plugin-cmp-nvim-lsp = { url = "github:hrsh7th/cmp-nvim-lsp"; flake = false; }; - cmp-vsnip = { + + plugin-cmp-vsnip = { url = "github:hrsh7th/cmp-vsnip"; flake = false; }; - cmp-path = { + + plugin-cmp-path = { url = "github:hrsh7th/cmp-path"; flake = false; }; - cmp-treesitter = { + + plugin-cmp-treesitter = { url = "github:ray-x/cmp-treesitter"; flake = false; }; # snippets - vim-vsnip = { + plugin-vim-vsnip = { url = "github:hrsh7th/vim-vsnip"; flake = false; }; # Presence - neocord = { + plugin-neocord = { url = "github:IogaMaster/neocord"; flake = false; # uses flake-utils, avoid the flake }; # Autopairs - nvim-autopairs = { + plugin-nvim-autopairs = { url = "github:windwp/nvim-autopairs"; flake = false; }; - nvim-ts-autotag = { + + plugin-nvim-ts-autotag = { url = "github:windwp/nvim-ts-autotag"; flake = false; }; # Commenting - kommentary = { - url = "github:b3nj5m1n/kommentary"; - flake = false; - }; - - comment-nvim = { + plugin-comment-nvim = { url = "github:numToStr/Comment.nvim"; flake = false; }; - todo-comments = { + plugin-todo-comments = { url = "github:folke/todo-comments.nvim"; flake = false; }; # Buffer tools - bufdelete-nvim = { + plugin-bufdelete-nvim = { url = "github:famiu/bufdelete.nvim"; flake = false; }; # Dashboard Utilities - dashboard-nvim = { + plugin-dashboard-nvim = { url = "github:glepnir/dashboard-nvim"; flake = false; }; - alpha-nvim = { + plugin-alpha-nvim = { url = "github:goolord/alpha-nvim"; flake = false; }; - vim-startify = { + plugin-vim-startify = { url = "github:mhinz/vim-startify"; flake = false; }; # Themes - tokyonight = { + plugin-tokyonight = { url = "github:folke/tokyonight.nvim"; flake = false; }; - onedark = { + plugin-onedark = { url = "github:navarasu/onedark.nvim"; flake = false; }; - catppuccin = { + plugin-catppuccin = { url = "github:catppuccin/nvim"; flake = false; }; - dracula = { + plugin-dracula = { url = "github:Mofiqul/dracula.nvim"; flake = false; }; - oxocarbon = { - url = "github:glyh/oxocarbon.nvim/lualine-support"; + plugin-oxocarbon = { + url = "github:nyoom-engineering/oxocarbon.nvim"; flake = false; }; - gruvbox = { + plugin-gruvbox = { url = "github:ellisonleao/gruvbox.nvim"; flake = false; }; - rose-pine = { + plugin-rose-pine = { url = "github:rose-pine/neovim"; flake = false; }; # Rust crates - crates-nvim = { + plugin-crates-nvim = { url = "github:Saecki/crates.nvim"; flake = false; }; # Project Management - project-nvim = { + plugin-project-nvim = { url = "github:ahmedkhalf/project.nvim"; flake = false; }; # Visuals - nvim-cursorline = { + plugin-nvim-cursorline = { url = "github:yamatsum/nvim-cursorline"; flake = false; }; - scrollbar-nvim = { + plugin-scrollbar-nvim = { url = "github:petertriho/nvim-scrollbar"; flake = false; }; - cinnamon-nvim = { + plugin-cinnamon-nvim = { url = "github:declancm/cinnamon.nvim"; flake = false; }; - cellular-automaton = { + plugin-cellular-automaton = { url = "github:Eandrju/cellular-automaton.nvim"; flake = false; }; - indent-blankline = { + plugin-indent-blankline = { url = "github:lukas-reineke/indent-blankline.nvim"; flake = false; }; - nvim-web-devicons = { + + plugin-nvim-web-devicons = { url = "github:nvim-tree/nvim-web-devicons"; flake = false; }; - gitsigns-nvim = { + + plugin-gitsigns-nvim = { url = "github:lewis6991/gitsigns.nvim"; flake = false; }; - fidget-nvim = { - url = "github:j-hui/fidget.nvim?ref=legacy"; + plugin-vim-fugitive = { + url = "github:tpope/vim-fugitive"; flake = false; }; - highlight-undo = { + plugin-fidget-nvim = { + url = "github:j-hui/fidget.nvim"; + flake = false; + }; + + plugin-highlight-undo = { url = "github:tzachar/highlight-undo.nvim"; flake = false; }; # Minimap - minimap-vim = { + plugin-minimap-vim = { url = "github:wfxr/minimap.vim"; flake = false; }; - codewindow-nvim = { + plugin-codewindow-nvim = { url = "github:gorbit99/codewindow.nvim"; flake = false; }; # Notifications - nvim-notify = { + plugin-nvim-notify = { url = "github:rcarriga/nvim-notify"; flake = false; }; # Utilities - ccc = { + plugin-ccc = { url = "github:uga-rosa/ccc.nvim"; flake = false; }; - diffview-nvim = { + plugin-diffview-nvim = { url = "github:sindrets/diffview.nvim"; flake = false; }; - icon-picker-nvim = { + plugin-icon-picker-nvim = { url = "github:ziontee113/icon-picker.nvim"; flake = false; }; - which-key = { + plugin-which-key = { url = "github:folke/which-key.nvim"; flake = false; }; - cheatsheet-nvim = { + plugin-cheatsheet-nvim = { url = "github:sudormrfbin/cheatsheet.nvim"; flake = false; }; - gesture-nvim = { + plugin-gesture-nvim = { url = "github:notomo/gesture.nvim"; flake = false; }; - hop-nvim = { + plugin-hop-nvim = { url = "github:phaazon/hop.nvim"; flake = false; }; - leap-nvim = { + plugin-leap-nvim = { url = "github:ggandor/leap.nvim"; flake = false; }; - smartcolumn = { + plugin-smartcolumn = { url = "github:m4xshen/smartcolumn.nvim"; flake = false; }; - nvim-surround = { + plugin-nvim-surround = { url = "github:kylechui/nvim-surround"; flake = false; }; # Note-taking - obsidian-nvim = { + plugin-obsidian-nvim = { url = "github:epwalsh/obsidian.nvim"; flake = false; }; - orgmode-nvim = { + plugin-orgmode-nvim = { url = "github:nvim-orgmode/orgmode"; flake = false; }; - mind-nvim = { + plugin-mind-nvim = { url = "github:phaazon/mind.nvim"; flake = false; }; # Spellchecking - vim-dirtytalk = { + plugin-vim-dirtytalk = { url = "github:psliwka/vim-dirtytalk"; flake = false; }; # Terminal - toggleterm-nvim = { + plugin-toggleterm-nvim = { url = "github:akinsho/toggleterm.nvim"; flake = false; }; # UI - nvim-navbuddy = { + plugin-nvim-navbuddy = { url = "github:SmiteshP/nvim-navbuddy"; flake = false; }; - nvim-navic = { + plugin-nvim-navic = { url = "github:SmiteshP/nvim-navic"; flake = false; }; - noice-nvim = { + plugin-noice-nvim = { url = "github:folke/noice.nvim"; flake = false; }; - modes-nvim = { + plugin-modes-nvim = { url = "github:mvllow/modes.nvim"; flake = false; }; - nvim-colorizer-lua = { + plugin-nvim-colorizer-lua = { url = "github:NvChad/nvim-colorizer.lua"; flake = false; }; - vim-illuminate = { + plugin-vim-illuminate = { url = "github:RRethy/vim-illuminate"; flake = false; }; # Assistant - copilot-lua = { + plugin-chatgpt = { + url = "github:jackMort/ChatGPT.nvim"; + flake = false; + }; + + plugin-copilot-lua = { url = "github:zbirenbaum/copilot.lua"; flake = false; }; - copilot-cmp = { + plugin-copilot-cmp = { url = "github:zbirenbaum/copilot-cmp"; flake = false; }; # Session management - nvim-session-manager = { + plugin-nvim-session-manager = { url = "github:Shatur/neovim-session-manager"; flake = false; }; # Dependencies - plenary-nvim = { + plugin-plenary-nvim = { # (required by crates-nvim) url = "github:nvim-lua/plenary.nvim"; flake = false; }; - dressing-nvim = { + plugin-dressing-nvim = { # (required by icon-picker-nvim) url = "github:stevearc/dressing.nvim"; flake = false; }; - vim-markdown = { + plugin-vim-markdown = { # (required by obsidian-nvim) url = "github:preservim/vim-markdown"; flake = false; }; - tabular = { + plugin-tabular = { # (required by vim-markdown) url = "github:godlygeek/tabular"; flake = false; }; - nui-nvim = { + plugin-nui-nvim = { # (required by noice.nvim) url = "github:MunifTanjim/nui.nvim"; flake = false; }; - vim-repeat = { + plugin-vim-repeat = { + # (required by leap.nvim) url = "github:tpope/vim-repeat"; flake = false; }; + + plugin-nvim-nio = { + # (required nvim-dap-ui) + url = "github:nvim-neotest/nvim-nio"; + flake = false; + }; }; } diff --git a/flake/modules/home-manager.nix b/flake/modules/home-manager.nix new file mode 100644 index 0000000..bcefcf1 --- /dev/null +++ b/flake/modules/home-manager.nix @@ -0,0 +1,87 @@ +# Home Manager module +packages: inputs: { + config, + pkgs, + lib ? pkgs.lib, + ... +}: let + inherit (lib) maintainers; + inherit (lib.modules) mkIf; + inherit (lib.lists) optional; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) attrsOf anything bool; + + cfg = config.programs.neovim-flake; + inherit (import ../../configuration.nix inputs) neovimConfiguration; + + neovimConfigured = neovimConfiguration { + inherit pkgs; + modules = [cfg.settings]; + }; +in { + meta.maintainers = with maintainers; [NotAShelf]; + + options.programs.neovim-flake = { + enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper"; + + enableManpages = mkOption { + type = bool; + default = false; + description = "Whether to enable manpages for neovim-flake."; + }; + + defaultEditor = mkOption { + type = bool; + default = false; + description = '' + Whether to set `neovim-flake` as the default editor. + + This will set the `EDITOR` environment variable as `nvim` + if set to true. + ''; + }; + + finalPackage = mkOption { + type = anything; + visible = false; + readOnly = true; + description = '' + The built neovim-flake package, wrapped with the user's configuration. + ''; + }; + + settings = mkOption { + type = attrsOf anything; + default = {}; + description = "Attribute set of neovim-flake preferences."; + example = literalExpression '' + { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + formatOnSave = true; + lightbulb.enable = true; + lspsaga.enable = false; + nvimCodeActionMenu.enable = true; + trouble.enable = true; + lspSignature.enable = true; + rust.enable = false; + nix = true; + }; + } + ''; + }; + }; + + config = mkIf cfg.enable { + programs.neovim-flake.finalPackage = neovimConfigured.neovim; + + home = { + sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";}; + packages = + [cfg.finalPackage] + ++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages; + }; + }; +} diff --git a/flake/modules/nixos.nix b/flake/modules/nixos.nix new file mode 100644 index 0000000..de234c7 --- /dev/null +++ b/flake/modules/nixos.nix @@ -0,0 +1,87 @@ +# NixOS module +packages: inputs: { + config, + pkgs, + lib ? pkgs.lib, + ... +}: let + inherit (lib) maintainers; + inherit (lib.modules) mkIf mkOverride; + inherit (lib.lists) optional; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) attrsOf anything bool; + + cfg = config.programs.neovim-flake; + inherit (import ../../configuration.nix inputs) neovimConfiguration; + + neovimConfigured = neovimConfiguration { + inherit pkgs; + modules = [cfg.settings]; + }; +in { + meta.maintainers = with maintainers; [NotAShelf]; + + options.programs.neovim-flake = { + enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper"; + + enableManpages = mkOption { + type = bool; + default = false; + description = "Whether to enable manpages for neovim-flake."; + }; + + defaultEditor = mkOption { + type = bool; + default = false; + description = '' + Whether to set `neovim-flake` as the default editor. + + This will set the `EDITOR` environment variable as `nvim` + if set to true. + ''; + }; + + finalPackage = mkOption { + type = anything; + visible = false; + readOnly = true; + description = '' + The built neovim-flake package, wrapped with the user's configuration. + ''; + }; + + settings = mkOption { + type = attrsOf anything; + default = {}; + description = "Attribute set of neovim-flake preferences."; + example = literalExpression '' + { + vim.viAlias = false; + vim.vimAlias = true; + vim.lsp = { + enable = true; + formatOnSave = true; + lightbulb.enable = true; + lspsaga.enable = false; + nvimCodeActionMenu.enable = true; + trouble.enable = true; + lspSignature.enable = true; + rust.enable = false; + nix = true; + }; + } + ''; + }; + }; + + config = mkIf cfg.enable { + programs.neovim-flake.finalPackage = neovimConfigured.neovim; + + environment = { + variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim"); + systemPackages = + [cfg.finalPackage] + ++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages; + }; + }; +} diff --git a/flake/packages.nix b/flake/packages.nix index bcf11e9..eb6c946 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -5,10 +5,7 @@ pkgs, ... }: let - docs = import ../docs { - inherit pkgs; - nmdSrc = inputs.nmd; - }; + docs = import ../docs {inherit pkgs inputs;}; in { packages = { @@ -36,7 +33,7 @@ inherit (config.legacyPackages) neovim-nix; in dockerTools.buildImage { - name = "neovim-flake"; + name = "nvf"; tag = "latest"; copyToRoot = buildEnv { diff --git a/lib/binds.nix b/lib/binds.nix new file mode 100644 index 0000000..d42a414 --- /dev/null +++ b/lib/binds.nix @@ -0,0 +1,72 @@ +{lib}: let + inherit (lib.options) mkOption; + inherit (lib.modules) mkIf mkDefault; + inherit (lib.types) nullOr str; + inherit (lib.attrsets) isAttrs mapAttrs; + + binds = rec { + mkLuaBinding = key: action: desc: + mkIf (key != null) { + "${key}" = { + inherit action desc; + lua = true; + silent = true; + }; + }; + + mkExprBinding = key: action: desc: + mkIf (key != null) { + "${key}" = { + inherit action desc; + lua = true; + silent = true; + expr = true; + }; + }; + + mkBinding = key: action: desc: + mkIf (key != null) { + "${key}" = { + inherit action desc; + silent = true; + }; + }; + + mkMappingOption = description: default: + mkOption { + type = nullOr str; + inherit default description; + }; + + # Utility function that takes two attrsets: + # { someKey = "some_value" } and + # { someKey = { description = "Some Description"; }; } + # and merges them into + # { someKey = { value = "some_value"; description = "Some Description"; }; } + addDescriptionsToMappings = actualMappings: mappingDefinitions: + mapAttrs (name: value: let + isNested = isAttrs value; + returnedValue = + if isNested + then addDescriptionsToMappings actualMappings."${name}" mappingDefinitions."${name}" + else { + inherit value; + inherit (mappingDefinitions."${name}") description; + }; + in + returnedValue) + actualMappings; + + mkSetBinding = binding: action: + mkBinding binding.value action binding.description; + + mkSetExprBinding = binding: action: + mkExprBinding binding.value action binding.description; + + mkSetLuaBinding = binding: action: + mkLuaBinding binding.value action binding.description; + + pushDownDefault = attr: mapAttrs (_: value: mkDefault value) attr; + }; +in + binds diff --git a/lib/config.nix b/lib/config.nix new file mode 100644 index 0000000..40d8157 --- /dev/null +++ b/lib/config.nix @@ -0,0 +1,65 @@ +{lib}: let + inherit (lib.options) mkOption; + inherit (lib.types) bool; + inherit (lib.modules) mkRenamedOptionModule; + inherit (lib.attrsets) mapAttrsToList; + inherit (lib.lists) flatten; +in { + mkBool = value: description: + mkOption { + type = bool; + default = value; + inherit description; + }; + + /* + Generates a list of mkRenamedOptionModule, from a mapping of the old name to + the new name. Nested options can optionally supply a "_name" to indicate its + new name. + + # Example + + ```nix + batchRenameOptions ["nvimTree"] ["nvimTree" "setupOpts"] { + disableNetrw = "disable_netrw"; + nestedOption = { + _name = "nested_option"; + somethingElse = "something_else"; + }; + } + ``` + + The above code is equivalent to this: + + ```nix + [ + ( + mkRenamedOptionModule + ["nvimTree" "disableNetrw"] + ["nvimTree" "setupOpts" "disable_netrw"] + ) + ( + mkRenamedOptionModule + ["nvimTree" "nestedOption" "somethingElse"] + ["nvimTree" "setupOpts" "nested_option" "something_else"] + ) + ] + ``` + */ + batchRenameOptions = oldBasePath: newBasePath: mappings: let + genSetupOptRenames = oldSubpath: newSubpath: table: + mapAttrsToList ( + oldName: newNameOrNestedOpts: + if builtins.isAttrs newNameOrNestedOpts + then + genSetupOptRenames (oldSubpath ++ [oldName]) (newSubpath ++ [newNameOrNestedOpts._name or oldName]) + (builtins.removeAttrs newNameOrNestedOpts ["_name"]) + else + mkRenamedOptionModule + (oldBasePath ++ oldSubpath ++ [oldName]) + (newBasePath ++ newSubpath ++ [newNameOrNestedOpts]) + ) + table; + in + flatten (genSetupOptRenames [] [] mappings); +} diff --git a/lib/dag.nix b/lib/dag.nix index 0b2dfc4..ccb2a61 100644 --- a/lib/dag.nix +++ b/lib/dag.nix @@ -8,13 +8,16 @@ # - the addition of the function `entryBefore` indicating a "wanted # by" relationship. {lib}: let - inherit (lib) all filterAttrs nvim mapAttrs toposort; + inherit (builtins) isAttrs attrValues attrNames elem all head tail length; + inherit (lib.attrsets) filterAttrs mapAttrs; + inherit (lib.lists) toposort; + inherit (lib.nvim.dag) empty isEntry entryBetween entryAfter entriesBetween; in { empty = {}; isEntry = e: e ? data && e ? after && e ? before; isDag = dag: - builtins.isAttrs dag && all nvim.dag.isEntry (builtins.attrValues dag); + isAttrs dag && all isEntry (attrValues dag); /* Takes an attribute set containing entries built by entryAnywhere, @@ -76,8 +79,8 @@ in { */ topoSort = dag: let dagBefore = dag: name: - builtins.attrNames - (filterAttrs (_n: v: builtins.elem name v.before) dag); + attrNames + (filterAttrs (_n: v: elem name v.before) dag); normalizedDag = mapAttrs (n: v: { name = n; @@ -85,8 +88,8 @@ in { after = v.after ++ dagBefore dag n; }) dag; - before = a: b: builtins.elem a.name b.after; - sorted = toposort before (builtins.attrValues normalizedDag); + before = a: b: elem a.name b.after; + sorted = toposort before (attrValues normalizedDag); in if sorted ? result then { @@ -100,8 +103,53 @@ in { entryBetween = before: after: data: {inherit data before after;}; # Create a DAG entry with no particular dependency information. - entryAnywhere = nvim.dag.entryBetween [] []; + entryAnywhere = entryBetween [] []; - entryAfter = nvim.dag.entryBetween []; - entryBefore = before: nvim.dag.entryBetween before []; + entryAfter = entryBetween []; + entryBefore = before: entryBetween before []; + + # Given a list of entries, this function places them in order within the DAG. + # Each entry is labeled "${tag}-${entry index}" and other DAG entries can be + # added with 'before' or 'after' referring these indexed entries. + # + # The entries as a whole can be given a relation to other DAG nodes. All + # generated nodes are then placed before or after those dependencies. + entriesBetween = tag: let + go = i: before: after: entries: let + name = "${tag}-${toString i}"; + i' = i + 1; + in + if entries == [] + then empty + else if length entries == 1 + then { + "${name}" = entryBetween before after (head entries); + } + else + { + "${name}" = entryAfter after (head entries); + } + // go (i + 1) before [name] (tail entries); + in + go 0; + + entriesAnywhere = tag: entriesBetween tag [] []; + entriesAfter = tag: entriesBetween tag []; + entriesBefore = tag: before: entriesBetween tag before []; + + # mkLuarcSection and mkVimrcSection take a section DAG + # and return a string containing a comment to identify + # the section, and the data contained within the section + # + # all operations are done without any modifications + # to the inputted section data + mkLuarcSection = section: '' + -- SECTION: ${section.name} + ${section.data} + ''; + + mkVimrcSection = section: '' + " SECTION: ${section.name} + ${section.data} + ''; } diff --git a/lib/default.nix b/lib/default.nix index d82ea5f..eade2e2 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,7 +1,15 @@ -{lib}: { +{ + inputs, + lib, + ... +}: { + types = import ./types {inherit inputs lib;}; + + config = import ./config.nix {inherit lib;}; + binds = import ./binds.nix {inherit lib;}; dag = import ./dag.nix {inherit lib;}; - types = import ./types {inherit lib;}; languages = import ./languages.nix {inherit lib;}; + lists = import ./lists.nix {inherit lib;}; lua = import ./lua.nix {inherit lib;}; - vim = import ./vim.nix {inherit lib;}; + vim = import ./vim.nix; } diff --git a/lib/languages.nix b/lib/languages.nix index 18cfc37..e47202e 100644 --- a/lib/languages.nix +++ b/lib/languages.nix @@ -1,32 +1,37 @@ # From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/booleans.nix -{lib}: { +{lib}: let + inherit (builtins) isString getAttr; + inherit (lib.options) mkOption; + inherit (lib.attrsets) listToAttrs; + inherit (lib.types) bool; +in { # Converts a boolean to a yes/no string. This is used in lots of # configuration formats. diagnosticsToLua = { lang, config, - diagnostics, + diagnosticsProviders, }: - lib.listToAttrs + listToAttrs (map (v: let type = - if builtins.isString v + if isString v then v - else builtins.getAttr v.type; + else getAttr v.type; package = - if builtins.isString v - then diagnostics.${type}.package + if isString v + then diagnosticsProviders.${type}.package else v.package; in { name = "${lang}-diagnostics-${type}"; - value = diagnostics.${type}.nullConfig package; + value = diagnosticsProviders.${type}.nullConfig package; }) config); mkEnable = desc: - lib.mkOption { + mkOption { description = "Turn on ${desc} for enabled languages by default"; - type = lib.types.bool; + type = bool; default = false; }; } diff --git a/lib/lists.nix b/lib/lists.nix new file mode 100644 index 0000000..25e85ad --- /dev/null +++ b/lib/lists.nix @@ -0,0 +1,34 @@ +{lib}: let + inherit (lib.lists) elem all; +in { + /* + Checks if all values are present in the list. + + Type: + listContainsValues :: { list :: [a], values :: [a] } -> Bool + + Arguments: + list - A list of elements. + values - A list of values to check for presence in the list. + + Returns: + True if all values are present in the list, otherwise False. + + Example: + ```nix + listContainsValues { list = [1 2 3]; values = [2 3]; } + => True + + listContainsValues { list = [1 2 3]; values = [2 4]; } + => False + ``` + */ + listContainsValues = { + list, + values, + }: let + # Check if all values are present in the list + containsValue = value: elem value list; + in + all containsValue values; +} diff --git a/lib/lua.nix b/lib/lua.nix index 708b464..9e67b3f 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -1,8 +1,20 @@ # Helpers for converting values to lua {lib}: let - inherit (lib) mapAttrsToList filterAttrs concatStringsSep concatMapStringsSep stringToCharacters boolToString; - inherit (builtins) hasAttr head throw typeOf; + inherit (builtins) hasAttr head throw typeOf isList isAttrs isBool isInt isString isPath isFloat toJSON; + inherit (lib.attrsets) mapAttrsToList filterAttrs; + inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters; + inherit (lib.trivial) boolToString; in rec { + wrapLuaConfig = { + luaBefore ? "", + luaConfig, + luaAfter ? "", + }: '' + lua << EOF + ${concatStringsSep "\n" [luaBefore luaConfig luaAfter]} + EOF + ''; + # Convert a null value to lua's nil nullString = value: if value == null @@ -11,29 +23,29 @@ in rec { # convert an expression to lua expToLua = exp: - if builtins.isList exp + if isList exp then listToLuaTable exp # if list, convert to lua table - else if builtins.isAttrs exp + else if isAttrs exp then attrsetToLuaTable exp # if attrs, convert to table - else if builtins.isBool exp - then lib.boolToString exp # if bool, convert to string - else if builtins.isInt exp - then builtins.toString exp # if int, convert to string + else if isBool exp + then boolToString exp # if bool, convert to string + else if isInt exp + then toString exp # if int, convert to string else if exp == null then "nil" - else (builtins.toJSON exp); # otherwise jsonify the value and print as is + else (toJSON exp); # otherwise jsonify the value and print as is # convert list to a lua table listToLuaTable = list: - "{ " + (builtins.concatStringsSep ", " (map expToLua list)) + " }"; + "{ " + (concatStringsSep ", " (map expToLua list)) + " }"; # convert attrset to a lua table attrsetToLuaTable = attrset: "{ " + ( - builtins.concatStringsSep ", " + concatStringsSep ", " ( - lib.mapAttrsToList ( + mapAttrsToList ( name: value: name + " = " @@ -44,13 +56,15 @@ in rec { ) + " }"; # Convert a list of lua expressions to a lua table. The difference to listToLuaTable is that the elements here are expected to be lua expressions already, whereas listToLuaTable converts from nix types to lua first - luaTable = items: ''{${builtins.concatStringsSep "," items}}''; + luaTable = items: ''{${concatStringsSep "," items}}''; + + isLuaInline = object: (object._type or null) == "lua-inline"; toLuaObject = args: - if builtins.isAttrs args + if isAttrs args then - if hasAttr "__raw" args - then args.__raw + if isLuaInline args + then args.expr else if hasAttr "__empty" args then "{ }" else @@ -68,19 +82,19 @@ in rec { ) args))) + "}" - else if builtins.isList args + else if isList args then "{" + concatMapStringsSep "," toLuaObject args + "}" - else if builtins.isString args + else if isString args then # This should be enough! - builtins.toJSON args - else if builtins.isPath args - then builtins.toJSON (toString args) - else if builtins.isBool args + toJSON args + else if isPath args + then toJSON (toString args) + else if isBool args then "${boolToString args}" - else if builtins.isFloat args + else if isFloat args then "${toString args}" - else if builtins.isInt args + else if isInt args then "${toString args}" else if (args == null) then "nil" diff --git a/lib/module/default.nix b/lib/module/default.nix deleted file mode 100644 index 7da3e2a..0000000 --- a/lib/module/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -# Home Manager module -packages: inputs: { - pkgs, - config, - lib ? pkgs.lib, - self, - ... -}: -with lib; let - cfg = config.programs.neovim-flake; - inherit (import ../../configuration.nix inputs) neovimConfiguration; - set = neovimConfiguration { - inherit pkgs; - modules = [cfg.settings]; - }; -in { - meta.maintainers = with maintainers; [NotAShelf]; - - options.programs.neovim-flake = { - enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility."; - - settings = mkOption { - type = types.attrsOf types.anything; - default = {}; - example = literalExpression '' - { - vim.viAlias = false; - vim.vimAlias = true; - vim.lsp = { - enable = true; - formatOnSave = true; - lightbulb.enable = true; - lspsaga.enable = false; - nvimCodeActionMenu.enable = true; - trouble.enable = true; - lspSignature.enable = true; - rust.enable = false; - nix = true; - }; - } - ''; - description = "Attribute set of neoflake preferences."; - }; - }; - - config = mkIf cfg.enable { - home.packages = [set.neovim]; - }; -} diff --git a/lib/nmd.nix b/lib/nmd.nix deleted file mode 100644 index fd945f1..0000000 --- a/lib/nmd.nix +++ /dev/null @@ -1,17 +0,0 @@ -# Copied from nmd master: https://gitlab.com/rycee/nmd/-/blob/master/default.nix?ref_type=heads -# Allows asciiDoc in options. It is easier to copy & keep updated then figure out how to pass the nmd input -# along to user modules -{ - # Indicates that the given text should be interpreted as AsciiDoc markup. - asciiDoc = text: { - _type = "asciiDoc"; - inherit text; - }; - - # Indicates that the given text should be interpreted as AsciiDoc markup and - # used in a literal context. - literalAsciiDoc = text: { - _type = "literalAsciiDoc"; - inherit text; - }; -} diff --git a/lib/stdlib-extended.nix b/lib/stdlib-extended.nix index 9833248..4bd63b9 100644 --- a/lib/stdlib-extended.nix +++ b/lib/stdlib-extended.nix @@ -1,73 +1,21 @@ -# From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/stdlib-extended.nix -# Just a convenience function that returns the given Nixpkgs standard -# library extended with the HM library. -nixpkgsLib: let - mkNvimLib = import ./.; -in - nixpkgsLib.extend (self: super: rec { - nvim = mkNvimLib {lib = self;}; +# Convenience function that returns the given Nixpkgs standard library +# extended with our functions using `lib.extend`. +nixpkgsLib: inputs: +nixpkgsLib.extend (self: super: { + # WARNING: New functions should not be added here, but to files + # imported by `./default.nix` under their own categories. If your + # function does not fit to any of the existing categories, create + # a new file and import it in `./default.nix.` - mkLuaBinding = key: action: desc: - self.mkIf (key != null) { - "${key}" = { - inherit action desc; - lua = true; - silent = true; - }; - }; + # Makes our custom functions available under `lib.nvim` where stdlib-extended.nix is imported + # with the appropriate arguments. For end-users, a `lib` output will be accessible from the flake. + # E.g. for an input called `nvf`, `inputs.nvf.lib.nvim` will return the set + # below. + nvim = import ./. { + inherit inputs; + lib = self; + }; - mkExprBinding = key: action: desc: - self.mkIf (key != null) { - "${key}" = { - inherit action desc; - lua = true; - silent = true; - expr = true; - }; - }; - - mkBinding = key: action: desc: - self.mkIf (key != null) { - "${key}" = { - inherit action desc; - silent = true; - }; - }; - - mkMappingOption = description: default: - self.mkOption { - type = self.types.nullOr self.types.str; - inherit default description; - }; - - # Utility function that takes two attrsets: - # { someKey = "some_value" } and - # { someKey = { description = "Some Description"; }; } - # and merges them into - # { someKey = { value = "some_value"; description = "Some Description"; }; } - addDescriptionsToMappings = actualMappings: mappingDefinitions: - self.attrsets.mapAttrs (name: value: let - isNested = self.isAttrs value; - returnedValue = - if isNested - then addDescriptionsToMappings actualMappings."${name}" mappingDefinitions."${name}" - else { - value = value; - description = mappingDefinitions."${name}".description; - }; - in - returnedValue) - actualMappings; - - mkSetBinding = binding: action: - mkBinding binding.value action binding.description; - - mkSetExprBinding = binding: action: - mkExprBinding binding.value action binding.description; - - mkSetLuaBinding = binding: action: - mkLuaBinding binding.value action binding.description; - - # For forward compatibility. - literalExpression = super.literalExpression or super.literalExample; - }) + # For forward compatibility. + literalExpression = super.literalExpression or super.literalExample; +}) diff --git a/lib/types/dag.nix b/lib/types/dag.nix index 439c09d..a42ed51 100644 --- a/lib/types/dag.nix +++ b/lib/types/dag.nix @@ -1,5 +1,5 @@ # From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/types-dag.nix -# Used for ordering config text. +# Used for ordering configuration text. {lib}: let inherit (lib) @@ -59,8 +59,8 @@ in rec { name = "dagOf"; description = "DAG of ${elemType.description}"; inherit (attrEquivalent) check merge emptyValue; + inherit (elemType) getSubModules; getSubOptions = prefix: elemType.getSubOptions (prefix ++ [""]); - getSubModules = elemType.getSubModules; substSubModules = m: dagOf (elemType.substSubModules m); functor = (defaultFunctor name) // {wrapped = elemType;}; nestedTypes.elemType = elemType; diff --git a/lib/types/default.nix b/lib/types/default.nix index 59a5181..d00be95 100644 --- a/lib/types/default.nix +++ b/lib/types/default.nix @@ -1,9 +1,13 @@ -{lib}: let +{ + inputs, + lib, + ... +}: let typesDag = import ./dag.nix {inherit lib;}; - typesPlugin = import ./plugins.nix {inherit lib;}; + typesPlugin = import ./plugins.nix {inherit inputs lib;}; typesLanguage = import ./languages.nix {inherit lib;}; in { inherit (typesDag) dagOf; - inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption; + inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline; inherit (typesLanguage) diagnostics mkGrammarOption; } diff --git a/lib/types/languages.nix b/lib/types/languages.nix index 6b06759..e47f964 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -15,13 +15,13 @@ with lib; let in { diagnostics = { langDesc, - diagnostics, - defaultDiagnostics, + diagnosticsProviders, + defaultDiagnosticsProvider, }: mkOption { description = "List of ${langDesc} diagnostics to enable"; - type = with types; listOf (either (enum (attrNames diagnostics)) (submodule diagnosticSubmodule)); - default = defaultDiagnostics; + type = with types; listOf (either (enum (attrNames diagnosticsProviders)) (submodule diagnosticSubmodule)); + default = defaultDiagnosticsProvider; }; mkGrammarOption = pkgs: grammar: diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index f20a914..d9cc5f2 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -1,163 +1,99 @@ -{lib}: -with lib; let - # Plugin must be same as input name from flake.nix - availablePlugins = [ - # TODO: sort by category - "nvim-treesitter-context" - "gitsigns-nvim" - "plenary-nvim" - "nvim-lspconfig" - "nvim-treesitter" - "lspsaga" - "lspkind" - "nvim-lightbulb" - "lsp-signature" - "nvim-tree-lua" - "nvim-bufferline-lua" - "lualine" - "nvim-compe" - "nvim-autopairs" - "nvim-ts-autotag" - "nvim-web-devicons" - "tokyonight" - "bufdelete-nvim" - "nvim-cmp" - "cmp-nvim-lsp" - "cmp-buffer" - "cmp-vsnip" - "cmp-path" - "cmp-treesitter" - "crates-nvim" - "vim-vsnip" - "nvim-code-action-menu" - "trouble" - "none-ls" - "which-key" - "indent-blankline" - "nvim-cursorline" - "sqls-nvim" - "glow-nvim" - "telescope" - "rust-tools" - "onedark" - "catppuccin" - "dracula" - "oxocarbon" - "gruvbox" - "rose-pine" - "minimap-vim" - "dashboard-nvim" - "alpha-nvim" - "scrollbar-nvim" - "codewindow-nvim" - "nvim-notify" - "cinnamon-nvim" - "cheatsheet-nvim" - "ccc" - "cellular-automaton" - "neocord" - "icon-picker-nvim" - "dressing-nvim" - "orgmode-nvim" - "obsidian-nvim" - "vim-markdown" - "tabular" - "toggleterm-nvim" - "noice-nvim" - "nui-nvim" - "copilot-lua" - "tabnine-nvim" - "nvim-session-manager" - "gesture-nvim" - "comment-nvim" - "kommentary" - "mind-nvim" - "fidget-nvim" - "diffview-nvim" - "todo-comments" - "flutter-tools" - "flutter-tools-patched" - "hop-nvim" - "leap-nvim" - "modes-nvim" - "vim-repeat" - "smartcolumn" - "project-nvim" - "neodev-nvim" - "elixir-ls" - "elixir-tools" - "nvim-colorizer-lua" - "vim-illuminate" - "nvim-surround" - "nvim-dap" - "nvim-dap-ui" - "nvim-navic" - "nvim-navbuddy" - "copilot-cmp" - "lsp-lines" - "vim-dirtytalk" - "highlight-undo" - "nvim-docs-view" - ]; +{ + inputs, + lib, + ... +}: let + inherit (lib.options) mkOption; + inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair; + inherit (lib.strings) hasPrefix removePrefix isString; + inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr; + + # Get the names of all flake inputs that start with the given prefix. + fromInputs = { + inputs, + prefix, + }: + mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs); + + # Get the names of all flake inputs that start with the given prefix. + pluginInputNames = attrNames (fromInputs { + inherit inputs; + prefix = "plugin-"; + }); + # You can either use the name of the plugin or a package. - pluginType = with types; - nullOr ( - either - package - (enum availablePlugins) - ); + pluginType = nullOr ( + either + package + (enum (pluginInputNames ++ ["nvim-treesitter" "flutter-tools-patched" "vim-repeat"])) + ); - pluginsType = types.listOf pluginType; + pluginsType = listOf pluginType; - extraPluginType = with types; - submodule { - options = { - package = mkOption { - type = pluginType; - description = "Plugin Package."; - }; - after = mkOption { - type = listOf str; - default = []; - description = "Setup this plugin after the following ones."; - }; - setup = mkOption { - type = lines; - default = ""; - description = "Lua code to run during setup."; - example = "require('aerial').setup {}"; - }; + extraPluginType = submodule { + options = { + package = mkOption { + type = pluginType; + description = "Plugin Package."; + }; + + after = mkOption { + type = listOf str; + default = []; + description = "Setup this plugin after the following ones."; + }; + + setup = mkOption { + type = lines; + default = ""; + description = "Lua code to run during setup."; + example = "require('aerial').setup {}"; }; }; + }; in { - inherit extraPluginType; + inherit extraPluginType fromInputs; pluginsOpt = { description, + example, default ? [], }: mkOption { - inherit description default; + inherit example description default; type = pluginsType; }; - # opts is a attrset of options, example: - # ``` - # mkPluginSetupOption "telescope" { - # file_ignore_patterns = mkOption { - # description = "..."; - # type = types.listOf types.str; - # default = []; - # }; - # layout_config.horizontal = mkOption {...}; - # } - # ``` + luaInline = lib.mkOptionType { + name = "luaInline"; + check = x: lib.nvim.lua.isLuaInline x; + }; + + /* + opts is a attrset of options, example: + ``` + mkPluginSetupOption "telescope" { + file_ignore_patterns = mkOption { + description = "..."; + type = types.listOf types.str; + default = []; + }; + layout_config.horizontal = mkOption {...}; + } + ``` + */ mkPluginSetupOption = pluginName: opts: mkOption { - description = "Option table to pass into the setup function of " + pluginName; + description = '' + Option table to pass into the setup function of ${pluginName} + + You can pass in any additional options even if they're + not listed in the docs + ''; + default = {}; - type = types.submodule { - freeformType = with types; attrsOf anything; + type = submodule { + freeformType = attrsOf anything; options = opts; }; }; diff --git a/lib/vim.nix b/lib/vim.nix index b00d7ca..da5bf55 100644 --- a/lib/vim.nix +++ b/lib/vim.nix @@ -1,5 +1,5 @@ -{lib}: let - inherit (builtins) isInt isBool toJSON; +let + inherit (builtins) isInt isBool toJSON toString; in rec { # yes? no. yesNo = value: @@ -16,7 +16,7 @@ in rec { # convert a literal value to a vim compliant value valToVim = val: if (isInt val) - then (builtins.toString val) + then (toString val) else ( if (isBool val) diff --git a/modules/assistant/copilot/copilot.nix b/modules/assistant/copilot/copilot.nix deleted file mode 100644 index 8583869..0000000 --- a/modules/assistant/copilot/copilot.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: let - inherit (lib) mkEnableOption mkOption types; - - cfg = config.vim.assistant.copilot; -in { - options.vim.assistant.copilot = { - enable = mkEnableOption "GitHub Copilot AI assistant"; - cmp.enable = mkEnableOption "nvim-cmp integration for GitHub Copilot"; - - panel = { - position = mkOption { - type = types.enum [ - "bottom" - "top" - "left" - "right" - ]; - default = "bottom"; - description = "Panel position"; - }; - ratio = mkOption { - type = types.float; - default = 0.4; - description = "Panel size"; - }; - }; - - mappings = { - panel = { - jumpPrev = mkOption { - type = types.nullOr types.str; - default = "[["; - description = "Jump to previous suggestion"; - }; - jumpNext = mkOption { - type = types.nullOr types.str; - default = "]]"; - description = "Jump to next suggestion"; - }; - accept = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Accept suggestion"; - }; - refresh = mkOption { - type = types.nullOr types.str; - default = "gr"; - description = "Refresh suggestions"; - }; - open = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Open suggestions"; - }; - }; - suggestion = { - accept = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Accept suggetion"; - }; - acceptWord = mkOption { - type = types.nullOr types.str; - default = null; - description = "Accept next word"; - }; - acceptLine = mkOption { - type = types.nullOr types.str; - default = null; - description = "Accept next line"; - }; - prev = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Previous suggestion"; - }; - next = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Next suggestion"; - }; - dismiss = mkOption { - type = types.nullOr types.str; - default = ""; - description = "Dismiss suggestion"; - }; - }; - }; - - copilotNodeCommand = mkOption { - type = types.str; - default = "${lib.getExe cfg.copilotNodePackage}"; - description = '' - The command that will be executed to initiate nodejs for GitHub Copilot. - Recommended to leave as default. - ''; - }; - - copilotNodePackage = mkOption { - type = with types; nullOr package; - default = pkgs.nodejs-slim; - description = '' - The nodeJS package that will be used for GitHub Copilot. If you are using a custom node command - you may want to set this option to null so that the package is not pulled from nixpkgs. - ''; - }; - }; -} diff --git a/modules/assistant/default.nix b/modules/assistant/default.nix deleted file mode 100644 index a8096c8..0000000 --- a/modules/assistant/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -_: { - imports = [ - ./copilot - # ./tabnine.nix # removed until I find a way around the initialisation script the plugin requires - ]; -} diff --git a/modules/assistant/tabnine/config.nix b/modules/assistant/tabnine/config.nix deleted file mode 100644 index e9cc209..0000000 --- a/modules/assistant/tabnine/config.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (builtins) toJSON; - inherit (lib) mkIf mkMerge mkExprBinding boolToString nvim; - - cfg = config.vim.assistant.tabnine; -in { - config = mkIf cfg.enable { - vim.startPlugins = ["tabnine-nvim"]; - - vim.maps.insert = mkMerge [ - (mkExprBinding cfg.mappings.accept '' - function() - local state = require("tabnine.state") - local completion = require("tabnine.completion") - - if not state.completions_cache then - return "${toJSON cfg.mappings.accept}" - end - - vim.schedule(completion.accept) - end - '' "orzel") - (mkExprBinding cfg.mappings.dismiss '' - function() - local state = require("tabnine.state") - local completion = require("tabnine.completion") - - if not state.completions_cache then - return "${toJSON cfg.mappings.dismiss}" - end - - vim.schedule(function() - completion.clear() - state.completions_cache = nil - end) - end - '' "orzel") - ]; - - vim.luaConfigRC.tabnine-nvim = nvim.dag.entryAnywhere '' - require('tabnine').setup({ - disable_auto_comment = ${boolToString cfg.disable_auto_comment}, - accept_keymap = null, - dismiss_keymap = null, - debounce_ms = ${cfg.debounce_ms}, - exclude_filetypes = ${cfg.exclude_filetypes}, - }) - ''; - }; -} diff --git a/modules/assistant/tabnine/tabnine.nix b/modules/assistant/tabnine/tabnine.nix deleted file mode 100644 index 949a6b1..0000000 --- a/modules/assistant/tabnine/tabnine.nix +++ /dev/null @@ -1,30 +0,0 @@ -{lib, ...}: let - inherit (lib) mkEnableOption mkOption types mkMappingOption; -in { - options.vim.assistant.tabnine = { - enable = mkEnableOption "Tabnine assistant"; - - disable_auto_comment = mkOption { - type = types.bool; - default = true; - description = "Disable auto comment"; - }; - - mappings = { - accept = mkMappingOption "Accept [Tabnine]" ""; - dismiss = mkMappingOption "Dismiss [Tabnine]" ""; - }; - - debounce_ms = mkOption { - type = types.int; - default = 800; - description = "Debounce ms"; - }; - - exclude_filetypes = mkOption { - type = types.listOf types.str; - default = ["TelescopePrompt" "NvimTree" "alpha"]; - description = "Exclude filetypes"; - }; - }; -} diff --git a/modules/autopairs/nvim-autopairs/config.nix b/modules/autopairs/nvim-autopairs/config.nix deleted file mode 100644 index 0aceca5..0000000 --- a/modules/autopairs/nvim-autopairs/config.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib) mkIf nvim optionalString boolToString; - - cfg = config.vim.autopairs; -in { - config = - mkIf (cfg.enable) - { - vim.startPlugins = ["nvim-autopairs"]; - - vim.luaConfigRC.autopairs = nvim.dag.entryAnywhere '' - require("nvim-autopairs").setup{} - ${optionalString (config.vim.autocomplete.type == "nvim-compe") '' - require('nvim-autopairs.completion.compe').setup({ - map_cr = ${boolToString cfg.nvim-compe.map_cr}, - map_complete = ${boolToString cfg.nvim-compe.map_complete}, - auto_select = ${boolToString cfg.nvim-compe.auto_select}, - }) - ''} - ''; - }; -} diff --git a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix b/modules/autopairs/nvim-autopairs/nvim-autopairs.nix deleted file mode 100644 index 330d118..0000000 --- a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix +++ /dev/null @@ -1,35 +0,0 @@ -{lib, ...}: let - inherit (lib) mkEnableOption mkOption types; -in { - options.vim = { - autopairs = { - enable = mkEnableOption "autopairs" // {default = false;}; - - type = mkOption { - type = types.enum ["nvim-autopairs"]; - default = "nvim-autopairs"; - description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]"; - }; - - nvim-compe = { - map_cr = mkOption { - type = types.bool; - default = true; - description = ''map on insert mode''; - }; - - map_complete = mkOption { - type = types.bool; - default = true; - description = "auto insert `(` after select function or method item"; - }; - - auto_select = mkOption { - type = types.bool; - default = false; - description = "auto select first item"; - }; - }; - }; - }; -} diff --git a/modules/basic/config.nix b/modules/basic/config.nix deleted file mode 100644 index 1a3e97b..0000000 --- a/modules/basic/config.nix +++ /dev/null @@ -1,185 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (builtins) concatStringsSep; - inherit (lib) optionalString mkIf nvim; - - cfg = config.vim; -in { - config = { - vim.startPlugins = ["plenary-nvim"] ++ lib.optionals (cfg.spellChecking.enableProgrammingWordList) ["vim-dirtytalk"]; - - vim.maps.normal = - mkIf cfg.disableArrows { - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - } - // mkIf cfg.mapLeaderSpace { - "" = { - action = ""; - }; - }; - - vim.maps.insert = mkIf cfg.disableArrows { - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - }; - - vim.configRC.basic = nvim.dag.entryAfter ["globalsScript"] '' - " Settings that are set for everything - set encoding=utf-8 - set mouse=${cfg.mouseSupport} - set tabstop=${toString cfg.tabWidth} - set shiftwidth=${toString cfg.tabWidth} - set softtabstop=${toString cfg.tabWidth} - set expandtab - set cmdheight=${toString cfg.cmdHeight} - set updatetime=${toString cfg.updateTime} - set shortmess+=c - set tm=${toString cfg.mapTimeout} - set hidden - set cursorlineopt=${toString cfg.cursorlineOpt} - set scrolloff=${toString cfg.scrollOffset} - - ${optionalString cfg.debugMode.enable '' - " Debug mode settings - set verbose=${toString cfg.debugMode.level} - set verbosefile=${cfg.debugMode.logFile} - ''} - - ${optionalString cfg.splitBelow '' - set splitbelow - ''} - - ${optionalString cfg.splitRight '' - set splitright - ''} - - ${optionalString cfg.showSignColumn '' - set signcolumn=yes - ''} - - ${optionalString cfg.autoIndent '' - set autoindent - ''} - - ${optionalString cfg.preventJunkFiles '' - set noswapfile - set nobackup - set nowritebackup - ''} - - ${optionalString (cfg.bell == "none") '' - set noerrorbells - set novisualbell - ''} - - ${optionalString (cfg.bell == "on") '' - set novisualbell - ''} - - ${optionalString (cfg.bell == "visual") '' - set noerrorbells - ''} - - ${optionalString (cfg.lineNumberMode == "relative") '' - set relativenumber - ''} - - ${optionalString (cfg.lineNumberMode == "number") '' - set number - ''} - - ${optionalString (cfg.lineNumberMode == "relNumber") '' - set number relativenumber - ''} - - ${optionalString cfg.useSystemClipboard '' - set clipboard+=unnamedplus - ''} - - ${optionalString cfg.mapLeaderSpace '' - let mapleader=" " - let maplocalleader=" " - ''} - - ${optionalString cfg.syntaxHighlighting '' - syntax on - ''} - - ${optionalString (!cfg.wordWrap) '' - set nowrap - ''} - - ${optionalString cfg.hideSearchHighlight '' - set nohlsearch - set incsearch - ''} - - ${optionalString cfg.colourTerm '' - set termguicolors - set t_Co=256 - ''} - - ${optionalString (!cfg.enableEditorconfig) '' - let g:editorconfig = v:false - ''} - - ${optionalString cfg.spellChecking.enable '' - set spell - set spelllang=${concatStringsSep "," cfg.spellChecking.languages}${optionalString cfg.spellChecking.enableProgrammingWordList ",programming"} - ''} - - ${optionalString (cfg.leaderKey != null) '' - let mapleader = "${toString cfg.leaderKey}" - ''} - - ${optionalString (cfg.searchCase == "ignore") '' - set nosmartcase - set ignorecase - ''} - - ${optionalString (cfg.searchCase == "smart") '' - set smartcase - set ignorecase - ''} - - ${optionalString (cfg.searchCase == "sensitive") '' - set nosmartcase - set noignorecase - ''} - ''; - }; -} diff --git a/modules/basic/module.nix b/modules/basic/module.nix deleted file mode 100644 index 4a2750f..0000000 --- a/modules/basic/module.nix +++ /dev/null @@ -1,200 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) types; -in { - options.vim = { - package = mkOption { - type = types.package; - default = pkgs.neovim-unwrapped; - description = '' - The neovim package to use. You will need to use an unwrapped package for this option to work as intended. - ''; - }; - - debugMode = { - enable = mkEnableOption "debug mode"; - level = mkOption { - type = types.int; - default = 20; - description = "Set the debug level"; - }; - - logFile = mkOption { - type = types.path; - default = "/tmp/nvim.log"; - description = "Set the log file"; - }; - }; - - enableLuaLoader = mkEnableOption "experimental Lua module loader to speed up the start up process"; - - leaderKey = mkOption { - type = with types; nullOr str; - default = null; - description = "The leader key to be used internally"; - }; - - spellChecking = { - enable = mkEnableOption "neovim's built-in spellchecking"; - enableProgrammingWordList = mkEnableOption "vim-dirtytalk, a wordlist for programmers, that includes programming words"; - languages = mkOption { - type = with types; listOf str; - description = "The languages to be used for spellchecking"; - default = ["en"]; - example = ["en" "de"]; - }; - }; - - colourTerm = mkOption { - type = types.bool; - default = true; - description = "Set terminal up for 256 colours"; - }; - - disableArrows = mkOption { - type = types.bool; - default = false; - description = "Set to prevent arrow keys from moving cursor"; - }; - - hideSearchHighlight = mkOption { - type = types.bool; - default = false; - description = "Hide search highlight so it doesn't stay highlighted"; - }; - - scrollOffset = mkOption { - type = types.int; - default = 8; - description = "Start scrolling this number of lines from the top or bottom of the page."; - }; - - wordWrap = mkOption { - type = types.bool; - default = true; - description = "Enable word wrapping."; - }; - - syntaxHighlighting = mkOption { - type = types.bool; - default = true; - description = "Enable syntax highlighting"; - }; - - mapLeaderSpace = mkOption { - type = types.bool; - default = true; - description = "Map the space key to leader key"; - }; - - useSystemClipboard = mkOption { - type = types.bool; - default = false; - description = "Make use of the clipboard for default yank and paste operations. Don't use * and +"; - }; - - mouseSupport = mkOption { - type = with types; enum ["a" "n" "v" "i" "c"]; - default = "a"; - description = '' - Set modes for mouse support. - - * a - all - * n - normal - * v - visual - * i - insert - * c - command - ''; - }; - - lineNumberMode = mkOption { - type = with types; enum ["relative" "number" "relNumber" "none"]; - default = "relNumber"; - description = '' - How line numbers are displayed. Available options are - none, relative, number, relNumber - ''; - }; - - preventJunkFiles = mkOption { - type = types.bool; - default = false; - description = "Prevent swapfile, backupfile from being created"; - }; - - tabWidth = mkOption { - type = types.int; - default = 4; - description = "Set the width of tabs"; - }; - - autoIndent = mkOption { - type = types.bool; - default = true; - description = "Enable auto indent"; - }; - - cmdHeight = mkOption { - type = types.int; - default = 1; - description = "Height of the command pane"; - }; - - updateTime = mkOption { - type = types.int; - default = 300; - description = "The number of milliseconds till Cursor Hold event is fired"; - }; - - showSignColumn = mkOption { - type = types.bool; - default = true; - description = "Show the sign column"; - }; - - bell = mkOption { - type = types.enum ["none" "visual" "on"]; - default = "none"; - description = "Set how bells are handled. Options: on, visual or none"; - }; - - mapTimeout = mkOption { - type = types.int; - default = 500; - description = "Timeout in ms that neovim will wait for mapped action to complete"; - }; - - splitBelow = mkOption { - type = types.bool; - default = true; - description = "New splits will open below instead of on top"; - }; - - splitRight = mkOption { - type = types.bool; - default = true; - description = "New splits will open to the right"; - }; - enableEditorconfig = mkOption { - type = types.bool; - default = true; - description = "Follow editorconfig rules in current directory"; - }; - - cursorlineOpt = mkOption { - type = types.enum ["line" "screenline" "number" "both"]; - default = "line"; - description = "Highlight the text line of the cursor with CursorLine hl-CursorLine"; - }; - - searchCase = mkOption { - type = types.enum ["ignore" "smart" "sensitive"]; - default = "sensitive"; - description = "Set the case sensitivity of search"; - }; - }; -} diff --git a/modules/core/default.nix b/modules/core/default.nix deleted file mode 100644 index 13534a4..0000000 --- a/modules/core/default.nix +++ /dev/null @@ -1,387 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (builtins) attrValues attrNames map mapAttrs toJSON isString concatStringsSep filter; - inherit (lib) mkOption types mapAttrsFlatten filterAttrs optionalString getAttrs literalExpression; - inherit (lib) nvim; - inherit (nvim.lua) toLuaObject; - inherit (nvim.vim) valToVim; - - cfg = config.vim; - - wrapLuaConfig = luaConfig: '' - lua << EOF - ${optionalString cfg.enableLuaLoader '' - vim.loader.enable() - ''} - ${luaConfig} - EOF - ''; - - mkBool = value: description: - mkOption { - type = types.bool; - default = value; - inherit description; - }; - - # Most of the keybindings code is highly inspired by pta2002/nixvim. Thank you! - mapConfigOptions = { - silent = - mkBool false - "Whether this mapping should be silent. Equivalent to adding to a map."; - - nowait = - mkBool false - "Whether to wait for extra input on ambiguous mappings. Equivalent to adding to a map."; - - script = - mkBool false - "Equivalent to adding