datsfilipe / min-theme.nvim

Porting Min Theme from Visual Studio Code to Neovim.
MIT License
37 stars 2 forks source link

JSX highlight not working #5

Open mybadclan opened 1 month ago

mybadclan commented 1 month ago

Min Theme apply colors to jsx syntax like image below:

screenshot-dark

When I use min-theme.nvim, I have the result below:

Screenshot_20240525_194444

datsfilipe commented 1 month ago

Do you have your treesitter correctly setup? and you installed the parser for jsx?

mybadclan commented 1 month ago

I run :checkhealth nvim-treesitter and get the result below:

Screenshot_20240525_203308

Screenshot_20240525_203528

My treesitter config is like the code below:

return {
  "nvim-treesitter/nvim-treesitter",
  build = ":TSUpdate",
  config = function()
    -- Tree sitter config
    local config = require("nvim-treesitter.configs")

    config.setup({
      ensure_installed = { "lua", "javascript", "typescript", "html", "json", "css", "tsx" },

      -- auto_install = true,
      highlight = {
    enable = true,
    additional_vim_regex_highlighting = false,
      },
      indent = { enable = true },
    })
  end,
}
datsfilipe commented 1 month ago

I have these lines configured in mine treesitter config, see if it helps you:

local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.tsx.filetype_to_parsername = { 'javascript', 'typescript.tsx' }

The theme works well for me in tsx/jsx files, so I think it probably is some configuration problem.