gp.nvim
gp.nvim copied to clipboard
wip: macro support
@teto btw. it's good to see you around. Would you be willing to try out this branch for a while? (needs "hrsh7th/nvim-cmp" as dependency for autocomplete).
I'm kinda procrastinating on merging this, any feedback would be welcome.
What are good ways to test this ? Maybe you would get more feedback with a description in hte first message. I saw this PR yesterday but without dscription and draft status, I looked the other way :p
@teto If you use default shortcuts, they should resolve to editable commands with some prefiled macros
For code commands such as rewrite:
@agent xy # allows changing command on the fly while writing command
@target_filetype # xy for setting filetype of new buffer made with commands such as GpEnew
@target_filename` path` # ditto as above
@with_repo_instructions serves for adding .gp.md repo instructions optionally (when present they were always added)
@with_current_buf adds current buffer for context
@with_file ` path ` adds arbitrary file for context
The last two should also be usable in chat buffers.
Besides this there are some additional changes concerning Chat buffers:
- most chat logic is now handled via custom filetype (chats have markdown.gpchat, so people could use ftplugin/gpchat for customization)
:GpChatHelpto toggle help visibility- chat header uses yaml frontmatter syntax for compatibility with plugins such as Obsidian
- chats are auto renamed to include topic.
Some startup optimizations tho shed off milliseconds for people who start new neovim instances a lot and maybe some other things I forgot in the meantime.