Incorrect indentation on JSX/TSX/React files

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. nvim

    A non-minimal Neovim config built to work most efficiently with Frontend Development (by ecosse3)

    I experience same issue with my Ecovim config. Looks like it's the issue with treesitter TSX parser anyway.

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. vim-jsx-pretty

    :flashlight: [Vim script] JSX and TSX syntax pretty highlighting for vim.

    I’ve always had issues with treesitter indent, not just with JSX, but for almost every language, so I just straight turn it off. What I do is enable regex highlighting in the treesitter options and use something like https://github.com/MaxMEllon/vim-jsx-pretty for JSX files, I doesn’t override treesitter highlighting but it does provides indentation.

  4. vim-jsx-improve

    Syntax and indent plugin for React jsx.

    This drives me nuts, too. The only solution I've found is to use vim-jsx-improve. I haven't managed to get it to set the filetype automatically, so I just throw the following comment at the top of my .jsx files:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Anyone have multiple language syntax highlighting with treesitter working?

    4 projects | /r/emacs | 13 Oct 2022
  • Even though I have plugins installed, syntax-highlighting isn't working well for JSX and TSX files

    4 projects | /r/neovim | 12 Jan 2022
  • Is their any good colorscheme for jsx file? because html tag color won't properly match.

    4 projects | /r/neovim | 6 Mar 2021
  • Every Developer Should Try Vim

    6 projects | dev.to | 19 Jun 2025
  • When Life Gives You Time Off Install and Configure Neovim

    2 projects | dev.to | 4 Jun 2025

Did you know that Vim Script is
the 37th most popular programming language
based on number of references?