Describe the bug
When I am using Copilot, my syntax highlighting is not working. What am I doing wrong? Here is my configuration:
{
"jellydn/CopilotChat.nvim",
branch = "canary",
dependencies = { "zbirenbaum/copilot.lua" },
opts = {
mode = "split",
debug = false,
prompts = {
Explain = "Explain how it works.",
Review = "Review the following code and provide concise suggestions.",
Tests = "Briefly explain how the selected code works, then generate unit tests.",
Refactor = "Refactor the code to improve clarity and readability.",
Spelling = "Please correct any grammar and spelling errors in the following text.",
Wording = "Please improve the grammar and wording of the following text.",
},
},
build = function()
vim.defer_fn(function()
vim.cmd("UpdateRemotePlugins")
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
end, 3000)
end,
event = "VeryLazy",
keys = {
{ "<leader>cce", "<cmd>CopilotChatExplain<CR>", desc = "CopilotChat - Explain code" },
{ "<leader>cct", "<cmd>CopilotChatTests<CR>", desc = "CopilotChat - Generate tests" },
{ "<leader>ccr", "<cmd>CopilotChatReview<CR>", desc = "CopilotChat - Review code" },
{ "<leader>ccR", "<cmd>CopilotChatRefactor<CR>", desc = "CopilotChat - Refactor code" },
{ "<leader>ccS", "<cmd>CopilotChatSpelling<CR>", desc = "CopilotChat - Correct spelling" },
{ "<leader>ccw", "<cmd>CopilotChatWording<CR>", desc = "CopilotChat - Improve wording" },
},
},
Reproduction
default config
System Info
System:
OS: macOS 14.3
CPU: (8) arm64 Apple M1 Pro
Memory: 88.34 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.2.0 - ~/.nvm/versions/node/v21.2.0/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v21.2.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v21.2.0/bin/npm
Browsers:
Chrome: 121.0.6167.139
Firefox: 120.0.1
Safari: 17.3
Used Package Manager
yarn
Validations
Describe the bug
When I am using Copilot, my syntax highlighting is not working. What am I doing wrong? Here is my configuration:
{ "jellydn/CopilotChat.nvim", branch = "canary", dependencies = { "zbirenbaum/copilot.lua" }, opts = { mode = "split", debug = false, prompts = { Explain = "Explain how it works.", Review = "Review the following code and provide concise suggestions.", Tests = "Briefly explain how the selected code works, then generate unit tests.", Refactor = "Refactor the code to improve clarity and readability.", Spelling = "Please correct any grammar and spelling errors in the following text.", Wording = "Please improve the grammar and wording of the following text.", }, }, build = function() vim.defer_fn(function() vim.cmd("UpdateRemotePlugins") vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.") end, 3000) end, event = "VeryLazy", keys = { { "<leader>cce", "<cmd>CopilotChatExplain<CR>", desc = "CopilotChat - Explain code" }, { "<leader>cct", "<cmd>CopilotChatTests<CR>", desc = "CopilotChat - Generate tests" }, { "<leader>ccr", "<cmd>CopilotChatReview<CR>", desc = "CopilotChat - Review code" }, { "<leader>ccR", "<cmd>CopilotChatRefactor<CR>", desc = "CopilotChat - Refactor code" }, { "<leader>ccS", "<cmd>CopilotChatSpelling<CR>", desc = "CopilotChat - Correct spelling" }, { "<leader>ccw", "<cmd>CopilotChatWording<CR>", desc = "CopilotChat - Improve wording" }, }, },Reproduction
default config
System Info
System: OS: macOS 14.3 CPU: (8) arm64 Apple M1 Pro Memory: 88.34 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 21.2.0 - ~/.nvm/versions/node/v21.2.0/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v21.2.0/bin/yarn npm: 10.2.3 - ~/.nvm/versions/node/v21.2.0/bin/npm Browsers: Chrome: 121.0.6167.139 Firefox: 120.0.1 Safari: 17.3Used Package Manager
yarn
Validations