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.
My
packer.nvimconfig:{ "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.luastarts a LSP server using the defaultcmdstring.This also applies to other
server_opts_overridesfields such astraceandname.