diff --git a/plugins/by-name/gitportal/default.nix b/plugins/by-name/gitportal/default.nix new file mode 100644 index 00000000..27bc0401 --- /dev/null +++ b/plugins/by-name/gitportal/default.nix @@ -0,0 +1,15 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "gitportal"; + package = "gitportal-nvim"; + + description = "Bridges Neovim and Git hosting platforms, enabling users to open files in browser and open Git permalinks in Neovim."; + + maintainers = [ lib.maintainers.phinze ]; + + settingsExample = { + always_include_current_line = true; + default_remote = "upstream"; + switch_branch_or_commit_upon_ingestion = "ask_first"; + }; +} diff --git a/tests/test-sources/plugins/by-name/gitportal/default.nix b/tests/test-sources/plugins/by-name/gitportal/default.nix new file mode 100644 index 00000000..15acd9d5 --- /dev/null +++ b/tests/test-sources/plugins/by-name/gitportal/default.nix @@ -0,0 +1,33 @@ +{ lib, ... }: +{ + empty = { + plugins.gitportal.enable = true; + }; + + defaults = { + plugins.gitportal = { + enable = true; + + settings = { + always_include_current_line = false; + always_use_commit_hash_in_url = false; + browser_command = lib.nixvim.mkRaw "nil"; + default_remote = "origin"; + git_provider_map = lib.nixvim.mkRaw "nil"; + switch_branch_or_commit_upon_ingestion = "always"; + }; + }; + }; + + example = { + plugins.gitportal = { + enable = true; + + settings = { + always_include_current_line = true; + default_remote = "upstream"; + switch_branch_or_commit_upon_ingestion = "ask_first"; + }; + }; + }; +}