Allow setting relativenumber in config #196
-
The chat window has relativenumber off by default. Allow changing this option in the config. This would make it more comfortable for us vim users that use relative numbers to move around. I find it particularly useful when yanking just a few lines from the suggestion in the chat window. Thanks for creating this plugin! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Replied this also on the PR but they are just buffers so you can work with them like you normally work with buffers for eveything else, imo confguration is not necessary: vim.api.nvim_create_autocmd("BufEnter", {
pattern = 'copilot-*',
callback = function()
vim.opt_local.relativenumber = true
vim.opt_local.number = true
end
}) EDIT: But also maybe it would be good idea to actually have the buffer names documented in README as atm we dont |
Beta Was this translation helpful? Give feedback.
-
I don't remember ever seeing buffer names in other plugins' READMEs. But I think it is a good idea, anyways these are the ones I could find for copilot chat:
On EDIT 2 that is a good point. However I don't know if this was a deliberate choice for user experience for example with wrap, copilot gives long sentences or even paragraphs in a single line. So the plugin having full control of this option is actually a good thing. Thank you for the suggestion, it works great. Let me know if I could raise any PRs for the other comments in the edits or maybe we should just close this issue. |
Beta Was this translation helpful? Give feedback.
-
Yea that should be all of them. And on EDIT 2, everything other than relativenumbers was deliberate choice because of what you said, but relativenumbers config is not rly necessary. So I think opening PR for extending the documentation + maybe example with autocommand and removal of relativenumber override we are setting is proably fine. |
Beta Was this translation helpful? Give feedback.
Replied this also on the PR but they are just buffers so you can work with them like you normally work with buffers for eveything else, imo confguration is not necessary:
EDIT: But also maybe it would be good idea to actually have the buffer names documented in README as atm we dont
EDIT2: Also we probably dont need to overwrite relativenumber at all for the window, so it could be straight up removed so it takes users default config.