From b74e2f4c4ed058422cbf6a5137030a4f73105e53 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sun, 1 Feb 2026 22:51:21 +0100 Subject: [PATCH] fun/syntax-gaslighting: add plugin --- docs/manual/release-notes/rl-0.9.md | 4 ++ modules/modules.nix | 1 + modules/plugins/fun/default.nix | 5 ++ .../plugins/fun/syntax-gaslighting/config.nix | 20 +++++++ .../fun/syntax-gaslighting/default.nix | 6 ++ .../syntax-gaslighting/syntax-gaslighting.nix | 60 +++++++++++++++++++ npins/sources.json | 13 ++++ 7 files changed, 109 insertions(+) create mode 100644 modules/plugins/fun/default.nix create mode 100644 modules/plugins/fun/syntax-gaslighting/config.nix create mode 100644 modules/plugins/fun/syntax-gaslighting/default.nix create mode 100644 modules/plugins/fun/syntax-gaslighting/syntax-gaslighting.nix diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 651f9f4e..3eb8388c 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -174,6 +174,10 @@ - Added Makefile support via `languages.make`. +- Didn't Add + [`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim), + you're crazy. + [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: https://github.com/gorbit99/codewindow.nvim diff --git a/modules/modules.nix b/modules/modules.nix index 1eca042a..4c92c343 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -47,6 +47,7 @@ "ui" "utility" "visuals" + "fun" ]; # The neovim wrapper, used to build a wrapped neovim package diff --git a/modules/plugins/fun/default.nix b/modules/plugins/fun/default.nix new file mode 100644 index 00000000..489d8384 --- /dev/null +++ b/modules/plugins/fun/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./syntax-gaslighting + ]; +} diff --git a/modules/plugins/fun/syntax-gaslighting/config.nix b/modules/plugins/fun/syntax-gaslighting/config.nix new file mode 100644 index 00000000..2f7ecd8d --- /dev/null +++ b/modules/plugins/fun/syntax-gaslighting/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.fun.syntax-gaslighting; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["syntax-gaslighting"]; + pluginRC.colorful-menu-nvim = entryAnywhere '' + require("syntax-gaslighting").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/fun/syntax-gaslighting/default.nix b/modules/plugins/fun/syntax-gaslighting/default.nix new file mode 100644 index 00000000..bb0ad198 --- /dev/null +++ b/modules/plugins/fun/syntax-gaslighting/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./syntax-gaslighting.nix + ./config.nix + ]; +} diff --git a/modules/plugins/fun/syntax-gaslighting/syntax-gaslighting.nix b/modules/plugins/fun/syntax-gaslighting/syntax-gaslighting.nix new file mode 100644 index 00000000..5d75c596 --- /dev/null +++ b/modules/plugins/fun/syntax-gaslighting/syntax-gaslighting.nix @@ -0,0 +1,60 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) int str nullOr listOf bool; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.fun = { + syntax-gaslighting = { + enable = mkEnableOption "Thats no even a real option, you're crazy."; + + setupOpts = mkPluginSetupOption "syntax-gaslighting" { + gaslighting_chance = mkOption { + type = nullOr int; + default = 5; + description = "Set the chance of gaslighting per line (1-100%)."; + }; + + min_line_length = mkOption { + type = nullOr int; + default = 10; + description = "Minimum line length to apply gaslighting."; + }; + + messages = mkOption { + type = nullOr (listOf str); + default = null; + description = "Custom messages for gaslighting."; + }; + + merge_messages = mkOption { + type = bool; + default = false; + description = '' + Merge user messages with the default ones. + If disabled, the messages table will override default messages. + ''; + }; + + debounce_delay = mkOption { + type = nullOr int; + default = 500; + description = "Debounce delay for updates in milliseconds."; + }; + + auto_update = mkOption { + type = bool; + default = true; + description = "Auto-update on buffer events."; + }; + + filetypes_to_ignore = mkOption { + type = nullOr (listOf str); + default = [ + "netrw" + ]; + description = "List of filetypes to ignore."; + }; + }; + }; + }; +} diff --git a/npins/sources.json b/npins/sources.json index d9d1f9cc..a5aa2d88 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2528,6 +2528,19 @@ "url": "https://github.com/supermaven-inc/supermaven-nvim/archive/07d20fce48a5629686aefb0a7cd4b25e33947d50.tar.gz", "hash": "sha256-1z3WKIiikQqoweReUyK5O8MWSRN5y95qcxM6qzlKMME=" }, + "syntax-gaslighting": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "NotAShelf", + "repo": "syntax-gaslighting.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "4cee4c0550e82b31e07424e0c44379920d716d79", + "url": "https://github.com/NotAShelf/syntax-gaslighting.nvim/archive/4cee4c0550e82b31e07424e0c44379920d716d79.tar.gz", + "hash": "sha256-sRg6UlK4hQubxf3ycGnMLi+tNvX3zvKgnHYVuZgmvOc=" + }, "tabular": { "type": "Git", "repository": {