plugins.copilot-lua.settings

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

Type: attribute set of anything

Default: { }

Example:

{
  panel = {
    auto_refresh = true;
    enabled = true;
  };
  suggestion = {
    auto_trigger = false;
    debounce = 90;
    enabled = true;
    hide_during_completion = false;
    keymap = {
      accept_line = false;
      accept_word = false;
    };
  };
}

Declared by:

plugins.copilot-lua.settings.copilot_node_command

Define the node command to use for copilot-lua. Node.js version must be 18.x or newer.

Type: null or string

Default: lib.getExe nodePackage if nodePackage is not null, otherwise null

Plugin default: "node"

Example: lib.getExe pkgs.nodejs

Declared by:

plugins.copilot-lua.settings.filetypes

Specify filetypes for attaching copilot. Each value can be either a boolean or a lua function that returns a boolean.

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

Default: null

Plugin default:

{
  "." = false;
  cvs = false;
  gitcommit = false;
  gitrebase = false;
  help = false;
  hgcommit = false;
  markdown = false;
  svn = false;
  yaml = true;
}

Example:

{
  markdown = true; # overrides default
  terraform = false; # disallow specific filetype
  sh.__raw = ''
    function()
      if string.match(vim.fs.basename(vim.api.nvim_buf_get_name(0)), '^%.env.*') then
        -- disable for .env files
        return false
      end
      return true
    end
  '';
  javascript = true; # allow specific type
  "*" = false; # disable for all other filetypes and ignore default filetypes
}

Declared by:

plugins.copilot-lua.settings.server_opts_overrides

Override copilot lsp client settings. The settings field is where you can set the values of the options defined in https://github.com/zbirenbaum/copilot.lua/blob/master/SettingsOpts.md. These options are specific to the copilot lsp and can be used to customize its behavior.

Ensure that the name field is not overridden as is is used for efficiency reasons in numerous checks to verify copilot is actually running.

See :h vim.lsp.start_client for list of options.

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

Default: null

Plugin default: { }

Example:

{
  settings = {
    advanced = {
      inlineSuggestCount = 3;
      listCount = 10;
    };
  };
  trace = "verbose";
}

Declared by: