Open Gnurou opened 2 years ago
@Gnurou hey man, so glad to hear that :)
No actually writing an adapter is easier than you can think. However there is a huge problem in doing so with the neovim. Currently Pro Colors is built on top of the grammars that ship for the vscode. In theory you can use the same grammars on say Sublime, Atom, TextMate or any other system that supports the tmLanguage specification and you're going to be good. However while you can very easily write an adapter that translates the very basic rules like comment
, keyword
... it is going to be really hard to make an adapter that understands the 500+ rules inside the Pro Color's definition which relies on about 40~50 different grammar files directly on the vscode or in its store.
I'm actually a huge fan of the possibility of this because then I can ship Pro Colors to many other places (which I really would love to) but I'm blocked on the matter of each editor having their own very incompatible grammars. If you can dig into the problem and see what's possible, it could turn amazing.
Thanks for the details!
I guess one could just have a mapping table between the VSCode grammar's and Vim's highlight groups (or what any other editor uses). There would probably be holes here and there, but since the VScode grammar looks rather complete it probably makes sense to use it as the reference one.
I'll see if I can come with something for the basic rules first, while keeping looking at how Vim's highlight groups are organized.
That could be really interesting. I'd love to ship Pro Colors to other editors really :)
I tried taking a short look but after installing themex (`sudo npm -g install themex) I cannot build ProColors:
$ make
themex pro-colors.themeX
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• themeX ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✓ parsing theme files
✕ Internal Error: "Error: Cannot find module '../../libs/tmTheme'
Require stack:
- /usr/local/lib/node_modules/themex/build/adaptors/sublime.adaptorX/index.js
- /usr/local/lib/node_modules/themex/build/buildcore.js
- /usr/local/lib/node_modules/themex/build/main.js"
✓ running adaptor vscode.adaptorX (v1.0.0)
cp -f pro-colors.themeX/builds/sublime/karyprocolors-dark.tmTheme foo/karyprocolors-dark.tmTheme
cp: cannot stat 'pro-colors.themeX/builds/sublime/karyprocolors-dark.tmTheme': No such file or directory
make: *** [Makefile:18: karyprocolors-dark.tmTheme] Error 1
Do you have any idea about what I am doing wrong here?
Wow, okay that's my bad :) perks of using mac to code :)
You're probably using Windows or Linux and the file source/adaptors/sublime.adptorX/index.ts
is requiring the tmTheme
file. Now the second T in the naming is not capital in the actual source code address and its tmtheme
so your file system is not finding it... You have to fix the file name to tmTheme and it'll work.
Hi,
Kary Pro Colors is my absolute favorite theme and I'd love to be able to use it in Neovim. The idea behind themeX is great, but at the moment it seems to support only a few editors - do you think it would be difficult to write an adaptor for Neovim?