Incorrect indentation on JSX/TSX/React files

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

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • 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.

  • 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.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 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
  • AstroNvim 4.7.1

    1 project | news.ycombinator.com | 16 May 2024
  • Neovim 0.10 Release

    1 project | news.ycombinator.com | 16 May 2024