From 9209a9da37616f1d1b0f1272a87e627d8ccc3218 Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 21:16:32 -0500 Subject: [PATCH] utility/nix-develop: init --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/utility/default.nix | 1 + modules/plugins/utility/nix-develop/config.nix | 12 ++++++++++++ modules/plugins/utility/nix-develop/default.nix | 6 ++++++ modules/plugins/utility/nix-develop/nix-develop.nix | 5 +++++ npins/sources.json | 12 ++++++++++++ 6 files changed, 38 insertions(+) create mode 100644 modules/plugins/utility/nix-develop/config.nix create mode 100644 modules/plugins/utility/nix-develop/default.nix create mode 100644 modules/plugins/utility/nix-develop/nix-develop.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 9679a2c1..85f21580 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -202,6 +202,8 @@ - Add missing `yazi.nvim` dependency (`snacks.nvim`). - Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin for automatic creation of parent directories when editing a nested file. +- Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin + for in-neovim `nix develop`, `nix shell` and more. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 02d155ee..6a4b4a7e 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -12,6 +12,7 @@ ./motion ./multicursors ./new-file-template + ./nix-develop ./outline ./preview ./surround diff --git a/modules/plugins/utility/nix-develop/config.nix b/modules/plugins/utility/nix-develop/config.nix new file mode 100644 index 00000000..e1c57ff6 --- /dev/null +++ b/modules/plugins/utility/nix-develop/config.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + cfg = config.vim.utility.nix-develop; +in { + vim = mkIf cfg.enable { + startPlugins = ["nix-develop-nvim"]; + }; +} diff --git a/modules/plugins/utility/nix-develop/default.nix b/modules/plugins/utility/nix-develop/default.nix new file mode 100644 index 00000000..7d227af5 --- /dev/null +++ b/modules/plugins/utility/nix-develop/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./nix-develop.nix + ]; +} diff --git a/modules/plugins/utility/nix-develop/nix-develop.nix b/modules/plugins/utility/nix-develop/nix-develop.nix new file mode 100644 index 00000000..cee77a6d --- /dev/null +++ b/modules/plugins/utility/nix-develop/nix-develop.nix @@ -0,0 +1,5 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.nix-develop.enable = mkEnableOption "in-neovim `nix develop`, `nix shell`, and more using `nix-develop.nvim`"; +} diff --git a/npins/sources.json b/npins/sources.json index 957d3b93..8a4e555e 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1316,6 +1316,18 @@ "url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz", "hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3" }, + "nix-develop-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "figsoda", + "repo": "nix-develop.nvim" + }, + "branch": "main", + "revision": "afea026f5c478c000a8af8de87f7b711676387ab", + "url": "https://github.com/figsoda/nix-develop.nvim/archive/afea026f5c478c000a8af8de87f7b711676387ab.tar.gz", + "hash": "0nwjgr19pzdxd7yygz380b388qcfbzp9svs916kh0zayzi9yxc2k" + }, "noice-nvim": { "type": "Git", "repository": {