Skip to content

Plugin Settings

Dasu Pradyumna edited this page Nov 15, 2024 · 2 revisions

Supported Settings

This section provides a concise list of all supported plugin settings, along with their default values.

local default_settings = {
  confirm_choice = false,
  task = {
    ui = {
      display = 'float',
      float = {
        size = 'medium',
        config = {
          title_pos = 'center',
          footer_pos = 'right',
          border = 'rounded',
          zindex = 49, -- one unit lesser than neovim default
        },
      },
      hsplit_height = 30,
      vsplit_width = 50,
    },
    env = {},
    insert_mode_on_launch = false,
  },
}

require('launch').setup(default_settings)

Full Documentation

Listed below is the full set of supported plugin settings with documentation on the corresponding behavior.

  • confirm_choice
    type: boolean
    When set to true, the user is asked to confirm their choice after selecting the task or debug configuration to launch.
    When false, task or debug configurations are launched immediately upon selection.

  • task
    type: TaskSettings
    Table of options that configure the task runner behavior.

    • TaskSettings.ui
      type: TaskSettingsUI
      Table of options that configure the task runner UI appearance.

      • TaskSettingsUI.display
        type: 'float' | 'vsplit' | 'hsplit'
        Controls how the task instance is rendered : floating window, vertical split or horizontal split.
        This setting can be overridden at the task configuration level.

      • TaskSettingsUI.float
        type: TaskSettingsUIFloat
        Table of options that configure the task UI in floating window mode.
        Only used for the tasks whose display is set to float mode.

        • TaskSettingsUIFloat.size
          type: 'small' | 'medium' | 'large'
          Size of the floating window that is created when a task is launched.

        • TaskSettingsUIFloat.config
          type: vim.api.keyset.win_config
          Task UI floating window configuration. Supported options are title_pos, footer_pos, border, and zindex.
          Refer to :h nvim_win_open() for more information about supported options.

      • TaskSettingsUI.hsplit_height
        type: integer
        Percentage of neovim editor height to use for creating the horizontally split window.
        Only used for the tasks whose display is set to hsplit mode.

      • TaskSettingsUI.vsplit_width
        type: integer
        Percentage of neovim editor width to use for creating the vertically split window.
        Only used for the tasks whose display is set to vsplit mode.

    • TaskSettings.env
      type: { string: string | number }
      Dictionary of environment variables to be defined in the task environment before execution.
      This dictionary can be extended / overridden at the task configuration level.

    • TaskSettings.insert_mode_on_launch
      type: boolean
      Controls whether to enter insert mode in the terminal buffer that runs the selected task.

Clone this wiki locally