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.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neocord.settings.auto_update

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

Plugin default: true

Type: null or boolean or raw lua code

Default: null

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.

Plugin default: []

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

Default: null

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

Plugin default: []

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

Default: null

Declared by:

plugins.neocord.settings.client_id

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

Plugin default: "1157438221865717891"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neocord.settings.debounce_timeout

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

Plugin default: 10

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

Default: null

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

Plugin default: "Editing %s"

Type: null or string or raw lua code

Default: null

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

Plugin default: "Browsing %s"

Type: null or string or raw lua code

Default: null

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

Plugin default: "Committing changes"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neocord.settings.global_timer

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

Plugin default: false

Type: null or boolean or raw lua code

Default: null

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

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

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neocord.settings.log_level

Log messages at or above this level.

Plugin default: null

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

Default: null

Declared by:

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

Plugin default: "auto"

Type: null or string or raw lua code

Default: null

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”)

Plugin default: "language"

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

Default: null

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

Plugin default: "Managing plugins"

Type: null or string or raw lua code

Default: null

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

Plugin default: "Reading %s"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neocord.settings.show_time

Show the timer.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neocord.settings.terminal_text

Format string rendered when in terminal mode.

Plugin default: "Using Terminal"

Type: null or string or raw lua code

Default: null

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

Plugin default: "Working on %s"

Type: null or string or raw lua code

Default: null

Declared by: