Bryley / neoai.nvim

Neovim plugin for intracting with GPT models from OpenAI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax highlighting for code blocks in UI and option to keep history

krishpop opened this issue · comments

Hi! First of all, a sincere thanks for building this plugin. I have been enjoying it for the past few days and would love to continue using and refining it. I had a couple of questions regarding the UI regarding some potential bugs/configuration issues, as well as some improvements.

First, my NeoAI UI does not highlight syntax as shown in the demos, and I was wondering if there was anything in particular I need to download to enable it (or just do I just need to enable LSP syntax highlighting in markdown?)
For example:
image

Second, I find myself frequently hiding and unhiding the NeoAI console since I often use splits and it obscures my code at times. However, this resets the context/erases the prior history when I toggle it off and on. Is it possible to keep add an option to keep NeoAI from erasing the history?

image

The syntax highlighting is easy to do with neovim 0.9 (I needed to upgrade), by using the treesitter API to register `neoai-output` with the markdown language parser. This is what I added to do this:
vim.treesitter.language.register('markdown', 'neoai-output')

I also set vim.o.conceallevel = 1 so the backticks are invisible in the markdown response from gpt-3.5.