Skip to content
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

Open
matthewblott opened this issue Sep 18, 2024 · 4 comments
Open

bug: markdown syntax highlighting doesn't work in chat #602

matthewblott opened this issue Sep 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@matthewblott
Copy link

Describe the bug

I have a pretty bland looking chat with no colours for the code snippets:

Screenshot 2024-09-18 at 00 59 38

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

require('user.plugins')
require('user.config')
@matthewblott matthewblott added the bug Something isn't working label Sep 18, 2024
@aarnphm
Copy link
Collaborator

aarnphm commented Sep 18, 2024

can you provide a reproducer? that is actually not a reproducer

@matthewblott
Copy link
Author

matthewblott commented Sep 18, 2024

Okay. I've tried a fresh install with a bare bones configuration and lazy.nvim installed at ${HOME}/.local/share/nvim/lazy.nvim. The result is the same. Here is the init.lua config in full:

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.

@ddillert
Copy link
Contributor

Have you tested with other languages? If they work, could you try running :TSInstall ruby? This command installs the Tree-sitter plugin for Ruby.

@matthewblott
Copy link
Author

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 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants