plugins.neocord.settings

Options provided to the require('neocord').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  auto_update = true;
  blacklist = [ ];
  client_id = "1157438221865717891";
  debounce_timeout = 10;
  editing_text = "Editing...";
  enable_line_number = false;
  file_assets = null;
  file_explorer_text = "Browsing...";
  git_commit_text = "Committing changes...";
  global_timer = false;
  line_number_text = "Line %s out of %s";
  log_level = null;
  logo = "auto";
  logo_tooltip = null;
  main_image = "language";
  plugin_manager_text = "Managing plugins...";
  reading_text = "Reading...";
  show_time = true;
  terminal_text = "Using Terminal...";
  workspace_text = "Working on %s";
}

Declared by:

plugins.neocord.settings.enable_line_number

Displays the current line number instead of the current project.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neocord.settings.auto_update

Update activity based on autocmd events. If false, map or manually execute :lua package.loaded.neocord:update()

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.neocord.settings.blacklist

A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.neocord.settings.buttons

Button configurations which will always appear in Rich Presence. Can be a list of attribute sets, each with the following attributes: label: The label of the button. e.g. "GitHub Profile". url: The URL the button leads to. e.g. "https://github.com/<NAME>". Can also be a lua function: function(buffer: string, repo_url: string|nil): table

Type: null or (list of ((submodule) or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.neocord.settings.client_id

Use your own Discord application client id. (not recommended)

Type: null or string or raw lua code

Default: null

Plugin default: "1157438221865717891"

Declared by:

plugins.neocord.settings.debounce_timeout

Number of seconds to debounce events. (or calls to :lua package.loaded.neocord:update(<filename>, true))

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 10

Declared by:

plugins.neocord.settings.editing_text

String rendered when an editable file is loaded in the buffer. Can also be a lua function: function(filename: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Editing %s"

Declared by:

plugins.neocord.settings.file_assets

Custom file asset definitions keyed by file names and extensions. List elements for each attribute (filetype): name: The name of the asset shown as the title of the file in Discord. source: The source of the asset, either an art asset key or the URL of an image asset. Example:

  {
    # Use art assets uploaded in Discord application for the configured client id
    js = [ "JavaScript" "javascript" ];
    ts = [ "TypeScript" "typescript" ];
    # Use image URLs
    rs = [ "Rust" "https://www.rust-lang.org/logos/rust-logo-512x512.png" ];
    go = [ "Go" "https://go.dev/blog/go-brand/Go-Logo/PNG/Go-Logo_Aqua.png" ];
  };

Type: null or (attribute set of list of string)

Default: null

Declared by:

plugins.neocord.settings.file_explorer_text

String rendered when browsing a file explorer. Can also be a lua function: function(file_explorer_name: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Browsing %s"

Declared by:

plugins.neocord.settings.git_commit_text

String rendered when committing changes in git. Can also be a lua function: function(filename: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Committing changes"

Declared by:

plugins.neocord.settings.global_timer

if set true, timer won’t update when any event are triggered.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neocord.settings.line_number_text

String rendered when enableLineNumber is set to true to display the current line number. Can also be a lua function: function(line_number: number, line_count: number): string

Type: null or string or raw lua code

Default: null

Plugin default: "Line %s out of %s"

Declared by:

plugins.neocord.settings.log_level

Log messages at or above this level.

Type: null or one of “debug”, “info”, “warn”, “error” or raw lua code

Default: null

Plugin default: null

Declared by:

Update the Logo to the specified option (“auto” or url).

Type: null or string or raw lua code

Default: null

Plugin default: "auto"

Declared by:

plugins.neocord.settings.logo_tooltip

Sets the logo tooltip

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neocord.settings.main_image

Main image display (either “language” or “logo”)

Type: null or one of “language”, “logo” or raw lua code

Default: null

Plugin default: "language"

Declared by:

plugins.neocord.settings.plugin_manager_text

String rendered when managing plugins. Can also be a lua function: function(plugin_manager_name: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Managing plugins"

Declared by:

plugins.neocord.settings.reading_text

String rendered when a read-only/unmodifiable file is loaded into the buffer. Can also be a lua function: function(filename: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Reading %s"

Declared by:

plugins.neocord.settings.show_time

Show the timer.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.neocord.settings.terminal_text

Format string rendered when in terminal mode.

Type: null or string or raw lua code

Default: null

Plugin default: "Using Terminal"

Declared by:

plugins.neocord.settings.workspace_text

String rendered when in a git repository. Can also be a lua function: function(project_name: string|nil, filename: string): string

Type: null or string or raw lua code

Default: null

Plugin default: "Working on %s"

Declared by: