From 8b305e8ed199253262254a906ade3fdb872344ef Mon Sep 17 00:00:00 2001 From: Howard Nguyen-Huu <55764261+howird@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:52:21 -0400 Subject: [PATCH 1/3] fix: python dap configuration regression --- modules/plugins/languages/python.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/python.nix b/modules/plugins/languages/python.nix index d6dec1c2..9905716e 100644 --- a/modules/plugins/languages/python.nix +++ b/modules/plugins/languages/python.nix @@ -125,7 +125,7 @@ end end - dap.configurations.debugpy = { + dap.configurations.python = { { -- The first three options are required by nvim-dap type = 'debugpy'; -- the type here established the link to the adapter definition: `dap.adapters.debugpy` From 990d3598b1891833e765a822c3e377b18cdbc75d Mon Sep 17 00:00:00 2001 From: Noah765 Date: Wed, 23 Apr 2025 21:28:17 +0200 Subject: [PATCH 2/3] highlight: fix color type The color options also allow color definitions in the form of color names. --- docs/release-notes/rl-0.8.md | 1 + modules/neovim/init/highlight.nix | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 2800789f..e713db69 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -338,6 +338,7 @@ - Add missing `flutter-tools.nvim` dependency `plenary.nvim`. - Add necessary dependency of `flutter-tools.nvim` on lsp. - Add the `vim.languages.dart.flutter-tools.flutterPackage` option. +- Fix the type of the `highlight` color options. [howird](https://github.com/howird): diff --git a/modules/neovim/init/highlight.nix b/modules/neovim/init/highlight.nix index 7e992fd1..9c6b7214 100644 --- a/modules/neovim/init/highlight.nix +++ b/modules/neovim/init/highlight.nix @@ -5,15 +5,14 @@ }: let inherit (lib.options) mkOption; inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum; - inherit (lib.strings) hasPrefix concatLines; + inherit (lib.strings) concatLines; inherit (lib.attrsets) mapAttrsToList; inherit (lib.nvim.dag) entryBetween; inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.types) hexColor; mkColorOption = target: mkOption { - type = nullOr hexColor; + type = nullOr str; default = null; example = "#ebdbb2"; description = '' From 8f73019907d667a9254b3244a9ef518742e03c2b Mon Sep 17 00:00:00 2001 From: Noah765 Date: Thu, 24 Apr 2025 09:20:42 +0200 Subject: [PATCH 3/3] utility/sleuth: init --- docs/release-notes/rl-0.8.md | 3 +++ modules/plugins/utility/default.nix | 1 + modules/plugins/utility/sleuth/config.nix | 10 ++++++++++ modules/plugins/utility/sleuth/default.nix | 6 ++++++ modules/plugins/utility/sleuth/sleuth.nix | 7 +++++++ npins/sources.json | 13 +++++++++++++ 6 files changed, 40 insertions(+) create mode 100644 modules/plugins/utility/sleuth/config.nix create mode 100644 modules/plugins/utility/sleuth/default.nix create mode 100644 modules/plugins/utility/sleuth/sleuth.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 778fc37a..04e0eb64 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -337,10 +337,13 @@ [Noah765](https://github.com/Noah765): +[vim-sleuth]: https://github.com/tpope/vim-sleuth + - Add missing `flutter-tools.nvim` dependency `plenary.nvim`. - Add necessary dependency of `flutter-tools.nvim` on lsp. - Add the `vim.languages.dart.flutter-tools.flutterPackage` option. - Fix the type of the `highlight` color options. +- Add [vim-sleuth] plugin under `vim.utility.sleuth`. [howird](https://github.com/howird): diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 62b07574..e3ae7c5e 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -18,6 +18,7 @@ ./oil-nvim ./outline ./preview + ./sleuth ./snacks-nvim ./surround ./telescope diff --git a/modules/plugins/utility/sleuth/config.nix b/modules/plugins/utility/sleuth/config.nix new file mode 100644 index 00000000..d25cc140 --- /dev/null +++ b/modules/plugins/utility/sleuth/config.nix @@ -0,0 +1,10 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + cfg = config.vim.utility.sleuth; +in { + vim.startPlugins = mkIf cfg.enable ["vim-sleuth"]; +} diff --git a/modules/plugins/utility/sleuth/default.nix b/modules/plugins/utility/sleuth/default.nix new file mode 100644 index 00000000..04cb4158 --- /dev/null +++ b/modules/plugins/utility/sleuth/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./sleuth.nix + ]; +} diff --git a/modules/plugins/utility/sleuth/sleuth.nix b/modules/plugins/utility/sleuth/sleuth.nix new file mode 100644 index 00000000..a86d414d --- /dev/null +++ b/modules/plugins/utility/sleuth/sleuth.nix @@ -0,0 +1,7 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.sleuth.enable = mkEnableOption '' + automatically adjusting options such as `shiftwidth` or `expandtab`, using `vim-sleuth` + ''; +} diff --git a/npins/sources.json b/npins/sources.json index 7339ce8a..90a54057 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2407,6 +2407,19 @@ "url": "https://github.com/tpope/vim-repeat/archive/65846025c15494983dafe5e3b46c8f88ab2e9635.tar.gz", "hash": "0n8sx6s2sbjb21dv9j6y5lyqda9vvxraffg2jz423daamn96dxqv" }, + "vim-sleuth": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tpope", + "repo": "vim-sleuth" + }, + "branch": "master", + "submodules": false, + "revision": "be69bff86754b1aa5adcbb527d7fcd1635a84080", + "url": "https://github.com/tpope/vim-sleuth/archive/be69bff86754b1aa5adcbb527d7fcd1635a84080.tar.gz", + "hash": "0wqxdjgplf04nq428ialw1w03f8nh5vb629a17vl5gc9gf3zfanq" + }, "vim-startify": { "type": "Git", "repository": {