onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.83k stars 282 forks source link

[question]How to use extension for Python syntax highlighting? #1899

Open mirobeka opened 4 years ago

mirobeka commented 4 years ago

Hey guys, I'm trying to use onivim for daily Python development. However, the syntax highlighting for Python doesn't work correctly. Functions and function arguments are all red.

Screenshot 2020-06-08 at 14 56 49

I've installed vscode extension for python, that didn't change a thing. I've uninstalled the extension (by removing it from extension folder) and installed another extension magicpython. This didn't help either.

Am I missing something in configuration? Should I enable the extension? Is there any way to change default syntax highlighting? I've search for answers all around the place, but I didn't find any satisfying answer. Thanks for help!

Cheers, miro✌️

bryphe commented 4 years ago

Thanks for logging the issue, @mirobeka !

Indeed, I can reproduce with our default OneDark theme and python extension.

It's strange because it actually looks better in other themes:

Monokai: image

Gruvbox: image

So it seems like our default theme isn't working well with the python syntax. It looks like it has specific customizations for Python that we may not be picking up:

https://github.com/onivim/oni2/blob/d773a256d5e06327e2abadf68df5462aa0a754c3/extensions/onedark-pro/themes/OneDark-Pro.json#L478

bryphe commented 4 years ago

A workaround would be to test out another theme - but we should support these language-specific customizations, too.