Skip to content

Instantly share code, notes, and snippets.

@jenia
Created September 12, 2025 21:54
Show Gist options
  • Save jenia/11a5bd885d750fb3faffa181a60f28b2 to your computer and use it in GitHub Desktop.
Save jenia/11a5bd885d750fb3faffa181a60f28b2 to your computer and use it in GitHub Desktop.

What the problem:

I can't get nvim to use lsp on jsx files. As soon as I do :TSInstall jsx I get

Installation not possible: ...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:87: Parser not available for language "jsx"
See https://github.com/nvim-treesitter/nvim-treesitter/#adding-parsers on how to add a new parser! 

Can someone tell me please, how do get jsx to work on nvim?

What I see on startup

I don't really see any helpful tips. I expect to see something when I put my mouse on ${person.name} here but I only see very basic highlighting:

function greet(person: Person): string {
  return `Hello, my name is ${person.name} and I am ${person.age} years old.`;
}

I do see some warning though when I just start nvim:

[NvimTree]
Unknown option: renderer.icons.show_only_dirs                                                                                                                                                                                                
Unknown option: renderer.icons.symlink_destination                                                                                                                                                                                           
Unknown option: renderer.icons.show_git_status                                                                                                                                                                                               
Unknown option: renderer.icons.show_folder                                                                                                                                                                                                   
Unknown option: renderer.icons.show_hidden                                                                                                                                                                                                   
Unknown option: renderer.indent_markers.icons.top                                                                                                                                                                                            
                                                                                                                                                                                                                                             
see :help nvim-tree-opts for available configuration options   

version

nvim --version 
NVIM v0.11.4
Build type: RelWithDebInfo
LuaJIT 2.1.1753364724
Run "nvim -V1 -v" for more info

:checkhealth nvim-treesitter

==============================================================================
nvim-treesitter:                                                            ✅

Installation ~
- ✅ OK `tree-sitter` found 0.25.9 (a467ea8502d95562171f97953a6dc5b2a8622609) (parser generator, only needed for :TSInstallFromGrammar)
- ✅ OK `node` found v20.19.4 (only needed for :TSInstallFromGrammar)
- ✅ OK `git` executable found.
- ✅ OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (GCC) 15.2.1 20250813
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "6.16.6-arch1-1",
  sysname = "Linux",
  version = "#1 SMP PREEMPT_DYNAMIC Wed, 10 Sep 2025 00:38:07 +0000"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

:checkhealth vim.treesitter

==============================================================================
vim.treesitter:                                                             ✅

Treesitter features ~
- Treesitter ABI support: min 13, max 15
- WASM parser support: false

Treesitter parsers ~
- ✅ OK Parser: bash                      ABI: 15, path: /usr/share/nvim/runtime/parser/bash.so
- ✅ OK Parser: c                         ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/c.so
- ✅ OK Parser: c                    (not loaded), path: /usr/share/nvim/runtime/parser/c.so
- ✅ OK Parser: javascript                ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/javascript.so
- ✅ OK Parser: lua                       ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/lua.so
- ✅ OK Parser: lua                  (not loaded), path: /usr/share/nvim/runtime/parser/lua.so
- ✅ OK Parser: markdown                  ABI: 15, path: /usr/share/nvim/runtime/parser/markdown.so
- ✅ OK Parser: markdown_inline           ABI: 15, path: /usr/share/nvim/runtime/parser/markdown_inline.so
- ✅ OK Parser: python                    ABI: 14, path: /usr/share/nvim/runtime/parser/python.so
- ✅ OK Parser: query                     ABI: 15, path: /usr/share/nvim/runtime/parser/query.so
- ✅ OK Parser: tsx                       ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/tsx.so
- ✅ OK Parser: typescript                ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/typescript.so
- ✅ OK Parser: vim                       ABI: 14, path: /home/jenia/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/vim.so
- ✅ OK Parser: vim                  (not loaded), path: /usr/share/nvim/runtime/parser/vim.so
- ✅ OK Parser: vimdoc                    ABI: 15, path: /usr/share/nvim/runtime/parser/vimdoc.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment