-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: markdown syntax highlighting doesn't work in chat #602
Comments
can you provide a reproducer? that is actually not a reproducer |
Okay. I've tried a fresh install with a bare bones configuration and local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
{
'yetone/avante.nvim',
event = 'VeryLazy',
lazy = false,
version = false,
opts = {
provider = "openai",
},
build = 'make BUILD_FROM_SOURCE=true',
dependencies = {
'stevearc/dressing.nvim',
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim',
{
'MeanderingProgrammer/render-markdown.nvim',
opts = {
file_types = { 'markdown', 'Avante' },
},
ft = { 'markdown', 'Avante' },
},
},
},
})
vim.wo.number = true
vim.wo.relativenumber = true
vim.opt.expandtab = true
vim.opt.clipboard = 'unnamedplus'
vim.g.mapleader = ' ' I tried to keep everything to a minimum. I also tried the config as suggested on the homepage of this site. |
Have you tested with other languages? If they work, could you try running |
I've tried a few languages, it's the same issue for all of them. I've tried with Treesiter and without and the result is the same 🤷♂️ |
Same also here.. |
Does it work for other |
|
I have TS installed for my plugin config {
"yetone/avante.nvim",
version = "*",
build = "make",
cmd = "AvanteChat",
opts = {
provider = "copilot",
},
}
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante", "codecompanion", "AvanteInput" },
code = {
position = "right",
},
},
ft = { "markdown", "Avante", "codecompanion", "AvanteInput" },
} You can check this video: Screen.Recording.2024-11-26.at.11.20.08.AM.movI am having same issue for Any Idea ? |
Did you open to check markdown files? I think this is render-markdown.nvim's issue |
In my case, I can't not reproduce this issue, Could you share render-markdown commit version? "avante.nvim": { "branch": "main", "commit": "71c9a7911b9cd91c946f22099a515bb495a4b256" },
"render-markdown.nvim": { "branch": "main", "commit": "82184c4a3c3580a7a859b2cb7e58f16c10fd29ef" }, |
I am also struggling with this. At first I thought it was my render-markdown.nvim package, because opening a standard *.md file would show the same non-highlighting. I was able to fix this by adding the following explicitly:
However, this did not fix the in-chat behavior of the markdown plugin. In chat, I was still getting no syntax highlighting for languages. As we would expect, the As a last attempt, I copied the entire chat buffer into a markdown file to see what would happen. Interestingly this DID screw up the syntax highlighting. On further inspection, it looks like something weird is going on in the interaction between the markdown |
Filed a potentially related bug on render-markdown.nvim -- MeanderingProgrammer/render-markdown.nvim#249 |
Describe the bug
I have a pretty bland looking chat with no colours for the code snippets:
To reproduce
Open the chat window and type a command.
Expected behavior
Avante produced code to have proper syntax highlighting.
Environment
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189
OS: macOS 14.5
Repro
The text was updated successfully, but these errors were encountered: