hugetim / jupyterlab_stata_highlight2

JupyterLab extension for Stata syntax highlighting similar to the Stata IDE's
MIT License
3 stars 3 forks source link

Fontification color #1

Closed roblem closed 1 year ago

roblem commented 1 year ago

Hi,

I just installed this using the nbstata instructions, and the usual green fontification isn't working but rather a weakish red/magenta color:

image

In your demo gif it looks dark green, which is definitely more readable.

On the same jupyter instance, the python code is highlited as expected (dark/bold green).

roblem commented 1 year ago

I just reverted to jupyterlab_stata_highlight and things work as expected. Are there downsides to not using v2?

hugetim commented 1 year ago

My original impetus for making a new version was this: https://github.com/kylebarron/jupyterlab-stata-highlight/issues/12#issue-1405224223

There are also some relatively minor changes to command/function highlighting, where I'm being more conservative in what to highlight. Some of the changes are shown in this abandoned pull request: https://github.com/kylebarron/jupyterlab-stata-highlight/pull/13/files

But the colors are the main difference. I'm targeting the Stata IDE's highlighting rather than the default Jupyter Python highlighting. I haven't figured out how to match the colors exactly yet (as a CSS noob). But that may not be the main cause of the "weak" color: the Stata IDE's color-scheme just has less contrast than Jupyter's default, at least to me (as I'm red-green color-blind, so not the best judge of colors).

The ultimate goal is for this extension to provide a couple options for the colors as themes, one matching the original jupyterlab-stata-highlight and one matching the Stata IDE precisely. But I won't be able to do that in the short term.

hugetim commented 1 year ago

Here's a diff that shows all the substantial changes (as of this date): https://www.diffchecker.com/44NFIGa9/

hugetim commented 1 year ago

In your demo gif

Oh, and I should say: that demo gif is taken directly from https://github.com/kylebarron/stata_kernel, just to show an example of a Stata notebook. The functionality shown is the same, now, though, apart from the highlighting. I plan to create my own demo gif soon.

roblem commented 1 year ago

Ok, thanks.