diff --git a/lua/CopilotChat/context.lua b/lua/CopilotChat/context.lua index 5775b456..160cdabb 100644 --- a/lua/CopilotChat/context.lua +++ b/lua/CopilotChat/context.lua @@ -75,7 +75,7 @@ end ---@param bufnr number ---@return CopilotChat.copilot.embed? function M.build_outline(bufnr) - local ft = vim.bo[bufnr].filetype + local ft = string.gsub(vim.bo[bufnr].filetype, 'react', '') local name = vim.api.nvim_buf_get_name(bufnr) local parser = vim.treesitter.get_parser(bufnr, ft) if not parser then diff --git a/lua/CopilotChat/debuginfo.lua b/lua/CopilotChat/debuginfo.lua index 15b75d23..0a43d20e 100644 --- a/lua/CopilotChat/debuginfo.lua +++ b/lua/CopilotChat/debuginfo.lua @@ -36,7 +36,6 @@ function M.setup() local height = math.min(vim.o.lines - 3, #lines) local opts = { title = 'CopilotChat.nvim Debug Info', - footer = "Press 'q' to close this window.", relative = 'editor', width = width, height = height, @@ -46,6 +45,10 @@ function M.setup() border = 'rounded', } + if not utils.is_stable() then + opts.footer = "Press 'q' to close this window." + end + local bufnr = vim.api.nvim_create_buf(false, true) vim.bo[bufnr].syntax = 'markdown' vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines)