diff --git a/configuration.nix b/configuration.nix index c7b0f288..870460af 100644 --- a/configuration.nix +++ b/configuration.nix @@ -178,6 +178,7 @@ isMaximal: { diffview-nvim.enable = true; yanky-nvim.enable = false; leetcode-nvim.enable = isMaximal; + nvim-surfers.enable = false; # needs mplayer to be run motion = { hop.enable = true; leap.enable = true; diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 621e976f..bb25b141 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -44,9 +44,12 @@ [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim +[nvim-surfers]: https://github.com/fpeterek/nvim-surfers - Add Haskell support under `vim.languages.haskell` using [haskell-tools.nvim]. +- Add [nvim-surfers] as an accessibility tool under `vim.utility.nvim-surfers`. + [horriblename](https://github.com/horriblename): [blink.cmp]: https://github.com/saghen/blink.cmp diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 372a4f53..b916a956 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -16,5 +16,6 @@ ./wakatime ./yanky-nvim ./leetcode-nvim + ./nvim-surfers ]; } diff --git a/modules/plugins/utility/nvim-surfers/config.nix b/modules/plugins/utility/nvim-surfers/config.nix new file mode 100644 index 00000000..d78e378a --- /dev/null +++ b/modules/plugins/utility/nvim-surfers/config.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.utility.nvim-surfers; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [ + "nvim-surfers" + ]; + + lazy.plugins.nvim-surfers = { + package = "nvim-surfers"; + setupModule = "nvim-surfers"; + inherit (cfg) setupOpts; + }; + + extraPackages = [ + pkgs.mplayer + ]; + }; + }; +} + diff --git a/modules/plugins/utility/nvim-surfers/default.nix b/modules/plugins/utility/nvim-surfers/default.nix new file mode 100644 index 00000000..ce846877 --- /dev/null +++ b/modules/plugins/utility/nvim-surfers/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./nvim-surfers.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/nvim-surfers/nvim-surfers.nix b/modules/plugins/utility/nvim-surfers/nvim-surfers.nix new file mode 100644 index 00000000..418bd1d8 --- /dev/null +++ b/modules/plugins/utility/nvim-surfers/nvim-surfers.nix @@ -0,0 +1,19 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.types) str; +in { + options.vim.utility = { + nvim-surfers = { + enable = mkEnableOption "nvim-surfers"; + setupOpts = mkPluginSetupOption "nvim-surfers" { + tmux = mkEnableOption "using tmux for nvim-surfers"; + path = mkOption { + type = str; + default = "resources/surfers.mp4"; + description = "Path of the Subway Surfers gameplay to watch."; + }; + }; + }; + }; +} diff --git a/npins/sources.json b/npins/sources.json index d6fb562f..511eb3cd 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1550,6 +1550,18 @@ "url": "https://github.com/petertriho/nvim-scrollbar/archive/6994eb9f73d5fdc36ee2c8717940e8c853e51a49.tar.gz", "hash": "0h01gcaqgjkb2392zl2jwvlsh5qmz10k9sy5rhyz1kwizmw7nw7y" }, + "nvim-surfers": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "fpeterek", + "repo": "nvim-surfers" + }, + "branch": "master", + "revision": "aaebf28849e2eadfebe02549dcb2cb20c7875b3d", + "url": "https://github.com/fpeterek/nvim-surfers/archive/aaebf28849e2eadfebe02549dcb2cb20c7875b3d.tar.gz", + "hash": "sha256-jKduxXhqKUadREeFtrOVYQCKlkJCzjHKnanx3TGucDA=" + }, "nvim-surround": { "type": "Git", "repository": { @@ -2068,4 +2080,4 @@ } }, "version": 3 -} \ No newline at end of file +}