plugins.copilot-lua.enable

Whether to enable copilot.lua.

Type: boolean

Default: false

Example: true

Declared by:

plugins.copilot-lua.package

Which package to use for the copilot.lua plugin.

Type: package

Default: <derivation vimplugin-copilot.lua-2024-02-28>

Declared by:

plugins.copilot-lua.copilotNodeCommand

Use this field to provide the path to a specific node version such as one installed by nvm. Node.js version must be 16.x or newer.

Type: string

Default: "/nix/store/k8wn5ikx2grckc89bwlqn41mlyq2jqqb-nodejs-18.20.5/bin/node"

Declared by:

plugins.copilot-lua.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.copilot-lua.filetypes

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

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
    \'\';
  }

The key "*" can be used to disable the default configuration. Example:

  {
    javascript = true; # allow specific filetype
    typescript = true; # allow specific filetype
    "*" = false; # disable for all other filetypes and ignore default `filetypes`
  }

Plugin default:

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

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

Default: null

Declared by:

plugins.copilot-lua.serverOptsOverrides

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.

Example:

  {
    trace = "verbose";
    settings = {
      advanced = {
        listCount = 10; # number of completions for panel
        inlineSuggestCount = 3; # number of completions for getCompletions
      };
    };
  }

Plugin default: {}

Type: null or (attribute set)

Default: null

Declared by: