diff --git a/doc/copilot.txt b/doc/copilot.txt index 081e5108..0600ffc3 100644 --- a/doc/copilot.txt +++ b/doc/copilot.txt @@ -53,7 +53,7 @@ Install the plugin with your preferred plugin manager. For example, with packer.nvim : >lua - use { "zbirenbaum/copilot.lua" + use { "zbirenbaum/copilot.lua" requires = { "copilotlsp-nvim/copilot-lsp", -- (optional) for NES functionality }, @@ -198,14 +198,14 @@ Default configuration ~ root_dir = function() return vim.fs.dirname(vim.fs.find(".git", { upward = true })[1]) end, - should_attach = function(_, _) - if not vim.bo.buflisted then + should_attach = function(buf_id, _) + if not vim.bo[buf_id].buflisted then logger.debug("not attaching, buffer is not 'buflisted'") return false end - if vim.bo.buftype ~= "" then - logger.debug("not attaching, buffer 'buftype' is " .. vim.bo.buftype) + if vim.bo[buf_id].buftype ~= "" then + logger.debug("not attaching, buffer 'buftype' is " .. vim.bo[buf_id].buftype) return false end