Neovim does not highlight functions and methods.
In Neovim:
In Vscode:
CodePudding user response:
By default, Neovim uses syntax highlighting based on regular expressions. The default syntax file for Python does not include rules to highlight methods and functions.
If you want to add such functionality, you have a few options:
- Extend the built-in syntax highlight for Python. You can add new syntax rules in your configuration file (see
- Another option is to use LSP semantic syntax highlighting. I'm not sure if there are any LSP servers for Python which supports this feature, but there is a plugin that implements that for C . Therefore, you can also consider this option if you encounter a similar problem in other languages.