Skip to content

[Bug] cmd override in copilot.lua setup doesn't produce any effect #22

Description

@pidgeon777

My packer.nvim config:

    {
      "zbirenbaum/copilot.lua",
      -- event = {"VimEnter"},
      after = "nvim-cmp",
      requires = {"zbirenbaum/copilot-cmp"},
      config = function()
        local cmp_source = { name = "copilot", group_index = 2 }
        table.insert(lvim.builtin.cmp.sources, cmp_source)
        local plugin_manager_path = require("lvim.utils").join_paths(get_runtime_dir(), "site", "pack", "packer")
        vim.defer_fn(function()
          require("copilot").setup {
            plugin_manager_path = plugin_manager_path,
            server_opts_overrides = {
              cmd = { "node", require("copilot.util").get_copilot_path(plugin_manager_path) }
            },
          }
        end, 100)
      end,
    },

As a result, copilot.lua starts a LSP server using the default cmd string.

This also applies to other server_opts_overrides fields such as trace and name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions