plugins.gitlinker.enable

Whether to enable gitlinker.nvim.

Type: boolean

Default: false

Example: true

Declared by:

plugins.gitlinker.package

The gitlinker.nvim package to use.

Type: package

Default: pkgs.vimPlugins.gitlinker-nvim

Declared by:

plugins.gitlinker.actionCallback

Callback for what to do with the url.

Can be

  • the name of a built-in callback. Example: actionCallback = "copy_to_clipboard"; is setting
  require('gitlinker.actions').copy_to_clipboard

in lua.

  • Raw lua code actionCallback.__raw = "function() ... end";.

Type: null or string or raw lua code

Default: null

Plugin default: "copy_to_clipboard"

Declared by:

plugins.gitlinker.addCurrentLineOnNormalMode

Adds current line nr in the url for normal mode.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.gitlinker.callbacks

Each key can be

  • the name of a built-in callback. Example: "get_gitlab_type_url"; is setting
  require('gitlinker.hosts').get_gitlab_type_url

in lua.

  • Raw lua code "github.com".__raw = "function(url_data) ... end";.

Learn more by reading :h gitinker-callbacks.

Type: null or (attribute set of (string or raw lua code))

Default: null

Plugin default:

{
  "bitbucket.org" = "get_bitbucket_type_url";
  "codeberg.org" = "get_gitea_type_url";
  "git.kernel.org" = "get_cgit_type_url";
  "git.launchpad.net" = "get_launchpad_type_url";
  "git.savannah.gnu.org" = "get_cgit_type_url";
  "git.sr.ht" = "get_srht_type_url";
  "github.com" = "get_github_type_url";
  "gitlab.com" = "get_gitlab_type_url";
  "repo.or.cz" = "get_repoorcz_type_url";
  "try.gitea.io" = "get_gitea_type_url";
  "try.gogs.io" = "get_gogs_type_url";
}

Declared by:

plugins.gitlinker.extraOptions

These attributes will be added to the table parameter for the setup function. Typically, it can override NixVim’s default settings.

Type: attribute set of anything

Default: { }

Declared by:

plugins.gitlinker.mappings

Mapping to call url generation.

Type: null or string or raw lua code

Default: null

Plugin default: "<leader>gy"

Declared by:

plugins.gitlinker.printUrl

Print the url after performing the action.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.gitlinker.remote

Force the use of a specific remote.

Type: null or string

Default: null

Declared by: