How do you enable semantic highlighting for Python?

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

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com
featured
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
  • mason.nvim

    Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.

  • I have pyright installed via mason which apparently support "semantic token highlighting" but have been having a hard time getting these colors to show up in a buffer. It seems Neovim has changed how it handles semantic highlighting a few times so there's still some conflicting information online. It's hard to know what's current and what's not. Any help would be greatly appreciated.

  • pylyzer

    A fast static code analyzer & language server for Python

  • That explains why I didn't see textDocument/semanticTokens/full or anything like it in pyright's code. Do you happen to know of any Python LSP that has semantic tokens? pylsp, pyright, and jedi-language-server all don't have it. The only one I could find that might support it is https://github.com/mtshiba/pylyzer but I haven't tried that LSP yet

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • pyright

    Static Type Checker for Python

  • Unfortunately, pyright explicitly stated that they are not interested in inlay hints or other language server features, that those will only be added to pylance. That's why I added it myself instead of submitting a pull request to pyright. See https://github.com/microsoft/pyright/issues/4325

  • pyright-inlay-hints

    Static Type Checker for Python

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

  • Using a venv with Neovim's Python LSP

    2 projects | dev.to | 5 Apr 2024
  • Mason can't install gopls (or gofumpt, or goimports)

    2 projects | /r/neovim | 6 Dec 2023
  • Neovim documentation is pretty bad

    1 project | /r/neovim | 18 Jul 2023
  • language server not installed or missing from path

    1 project | /r/neovim | 5 Jul 2023
  • Neovim lsp diagnostic outdated

    1 project | /r/ocaml | 5 Jun 2023