-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): Improve the new highlighting system #416
Comments
Thanks for your feed back! 🚀 I had no choice but poor syntax highlighting because if the language other than If you know something to fix this, please let me know. If the language other than
|
In a neovim terminal | Not in a neovim terminal |
---|---|
I think this issue need to be solved, so I remain this issue open.
I also run into the same issue when trying to change the postPatch = ''
substituteInPlace src/usecase/tui/ui.rs \
--replace-fail '("ml")' '("mk")'
''; Taking a closer look at syntect library, I come to the conclusion that it uses multiples submodules to register highlighters, listed within the I was a sublime text user a while ago, so I have tinkered with making my own syntax, and I remembered that there was also a file to map matched keywords to their respective colors. I wrote a small language definition for the HRM language, take a look at the hrm.sublime-color-scheme file. Maybe there could be a way to provide a custom one to the library? |
let ss = SyntaxSet::load_defaults_newlines();
let mut ts = ThemeSet::load_defaults();
ts.add_from_folder("./").unwrap();
// dbg!(&ts.themes);
let theme = &mut ts.themes["OneHalfDark"].clone();
let syntax = ss.find_syntax_by_extension("mk").unwrap(); Using this bit of code, I was able to successfully load a I made a branch on my fork in case you would need to test it: |
@Sigmanificient Could you please submit as PR? I'll review it asap. |
Currently, the new highlighter is calibrated to use rust, but it causes issues when rendering Makefile. As you can see comments are highlighted. Moreover, the tool would benefit a lot from a more in-depth colorizing
The text was updated successfully, but these errors were encountered: