Closed roobert closed 1 year ago
Tested, and I needed to change all the require('CodeGPT')
to require('codegpt')
My config:
{
"roobert/CodeGPT.nvim",
branch = 'loading-status',
config = function()
-- optional configuration
vim.g["codegpt_hooks"] = {
request_started = function()
print("CodeGPT is loading..")
end,
request_finished = function()
print("CodeGPT has finished")
end
}
lvim.builtin.lualine.on_config_done = function(lualine)
local config = lualine.get_config()
table.insert(config.sections.lualine_x, 1, { require("codegpt").status })
lualine.setup(config)
end
end,
-- lazy = false,
-- priority = 1000,
dependencies = {
{ "MunifTanjim/nui.nvim" },
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope.nvim" }
}
}
I'm not sure about the lazy
and priority
options...
@roobert sorry for the delay, I really liked the idea but wanted to refactor it a bit. I pulled in your changes then add some changes on top here https://github.com/dpayne/CodeGPT.nvim/pull/20/files?w=1. Do you mind reviewing it to make sure it still covers your usecase and for any improvements you would want?
@roobert sorry for the delay, I really liked the idea but wanted to refactor it a bit. I pulled in your changes then add some changes on top here https://github.com/dpayne/CodeGPT.nvim/pull/20/files?w=1. Do you mind reviewing it to make sure it still covers your usecase and for any improvements you would want?
@dpayne - nice one, looks good! The reason for the unique IDs was if you wanted to have individual loading statuses for different requests but in retrospect I think it's probably overkill and your solution is much nicer. 👍
Is the loading status now implemented? I installed the plugin and it works well, but I don't see any loading/spinner status.
you need to implement the hooks or use something like this https://github.com/dpayne/codegpt.nvim#lualine-status-component
Apologies for the formatting change - if you let me know which formatter/settings you use I can reformat the file!