I have this problem that I would really like to get to the bottom of.

If I open a file on neovim it will display like the broken syntax highlighting, see image below. Now, If I run :Telescope current_buffer_fuzzy_find - it gives me a better syntax highlighting on the preview

Sometimes, it kinda fixes the syntax highlighting on the file itself. Sometimes, I can only see the better highlighting on the preview

I know that I can have a better syntax highlighting as it is what is displayed on the preview. Any ideas of what could be the issue? Telescope improves syntax highlighting 100%, but not sure what the real error here is.

Some plugins I have installed:

Plugin 'nvim-telescope/telescope.nvim'
Plugin 'nvim-treesitter/nvim-treesitter'
Plugin 'nvim-treesitter/playground'


broken syntax


fixed syntax

  • 1
    do you have the lua require 'treesitter'.setup(... line(s) in your init.vim?
    – zoomlogo
    Commented Sep 15, 2021 at 10:10
  • Possibly just missing a :redraw[!]/<C-L>
    – D. Ben Knoble
    Commented Sep 15, 2021 at 19:13
  • @pVCaecidiosporeadduced I had something there about playground, removed, but still the same issue.
    – filype
    Commented Sep 15, 2021 at 23:29
  • 1
    It must be something in vim. I tried inside and outside tmux, in other terminals and the same issue happens. running :redraw didn't fix it
    – filype
    Commented Sep 15, 2021 at 23:30

1 Answer 1


This was fixed by adding the treesitter require to my vimrc, which is described in https://github.com/nvim-treesitter/nvim-treesitter#highlight

You have to add a config like this to all treesitter plugins that I've come accross, it will enable it as it comes disabled by default. This caught me as often nothing is needed on other neovim plugins to become enabled

lua <<EOF
require'nvim-treesitter.configs'.setup {
  highlight = {
    enable = true,
    custom_captures = {
      -- Highlight the @foo.bar capture group with the "Identifier" highlight group.
      ["foo.bar"] = "Identifier",
    -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
    -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
    -- Using this option may slow down your editor, and you may see some duplicate highlights.
    -- Instead of true it can also be a list of languages
    additional_vim_regex_highlighting = false,
  • You can accept your own answer to mark this as resolved.
    – D. Ben Knoble
    Commented Sep 22, 2021 at 20:40
  • @D.BenKnoble I needed to wait a day. That's done now
    – filype
    Commented Sep 23, 2021 at 2:32
  • 1
    Thank you so much! I was having this exact problem and I thought it's the problem with the theme. Was suffering through the incomplete syntax highlighting for almost a month now until I found your post. Thanks!
    – kohane15
    Commented Dec 9, 2021 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.