I don't now how to communicate this because it's not a bug in the code but in the configuration example of the wiki, because the function has_words_before is not defined.
indent with tab will give the same error as in closed issue below.
@jalvesaq : as in R-nvim/cmp-r#5 (comment) : I'm sorry! Trying to simplify the example, I suppressed the function has_words_before
config = function() -- existing code
local cmp = require("cmp") -- existing code, I added it below, it works again
local function has_words_before()
if vim.bo.buftype == 'prompt' then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
-- stylua: ignore
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil
end
Can you tell me how to communicate this in the future without opening an issue. Perhaps in Discussion (?)
Best regards
Roman