Skip to content

Syntax highlighting for TSX files #136

Closed
@ubmit

Description

@ubmit

Describe the bug
The syntax highlighting for TSX isn't working properly. You can take a look at the color of the HTML tags and the content inside them, they are the same color. I'm using the same theme settings that are in the init.lua repo. However, I've also tried another theme, the Catppuccin, and I faced inconsistencies with the syntax highlighting as well.

image

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guide in the README
  2. Open a TSX file

Desktop (please complete the following information):

  • OS: macOS Ventura 13.1
  • Terminal: Kitty 0.26.4

** Neovim Version **

  • Output of running :version from inside of neovim: NVIM v0.8.2

File example

import React from "react";

type Props = { text: string; color?: string };

function Title({ text, color }: Props) {
  const style = { color: color ?? "blueviolet" };
  return <h1 style={style}>{text}</h1>;
}

const Header = () => <header>Header component</header>;

export const App = () => (
  <>
    <Header />
    <Title text="Hello World" />
    <p>
      lorem ipsum dolor etc lorem ipsum dolor etc lorem ipsum dolor etc lorem
      ipsum dolor etc lorem ipsum dolor etc lorem ipsum dolor etc
    </p>
  </>
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions