Closed mafsi closed 5 months ago
Hello @mafsi,
Are you using Neovim Tree-sitter LaTeX parser?
I can see that the default colors are not ideal in that case, however, is there a particular element in your example document that I must change? I can make some changes, but not being an expert in LaTeX all I can do is choose my own aesthetic to make things nicer. Let me know your main explicit issues, screenshots would be appreciated highlighting the inconsistencies.
Are there other Neovim color-schemes which highlight LaTeX well? If so, can you tell me; I can install and look at their implementation.
Best regards.
Thank you for your response, @bluz71
To clarify, I am not using the Neovim Tree-sitter LaTeX parser. I am using the default LaTeX syntax highlighting. The main issue I’m experiencing is the inconsistency in color highlighting for different LaTeX elements, which affects readability and aesthetics.
Attached is a screenshot of my current LaTeX document (The document is in Romanian language). Here are the specific issues I noticed:
% ...
): They are not distinct enough and can blend in with other text, making it hard to differentiate comments from the code.\section, \label, \begin, \end
): These should stand out more clearly. Currently, they don't have a distinct color that separates them from other text.quote, verse, versewidth
): The keywords for beginning and ending environments should be more visually distinct.\cite{}, \ref{}, \pageref{}, \autocite{}
): These should also be highlighted differently to be easily identifiable. Especially the page numbers and the key and the brackets from \autocite[page no. here]{key:here}
\gl{}
is a custom command that translates: \newcommand{\gl}[1]{\enquote{#1}}
And I would like to see a different color for the brackets and the text inside. There are also complex citation, see the Aristotle example in the image, where it would be nice to see the entire citation:I hope this helps, and thanks a lot for your reply!
\begin
should remain as violet since violet indicates keyword, \section
should be changed, I will experimenttextStatement
highlight group, so it will not be possible to assign unique colors since the underlying LaTeX syntax highlighter treats them all the sameThere is a little bit I can do, but not as much as you expect, there are real limitations with the underlying Vim/Neovim LaTeX syntax highlighter, many elements will be highlighted the same or not at all.
Most important, please provide me a LaTeX document that makes use of everyone one of notations you mention. Also, if know of another colorscheme that highlights LaTeX well, please provide it's name.
From what I have seen, some other Neovim colorschemes seem to have worse LaTeX highlighting.
Ok, I have implemented some style tweaks for LaTeX which hopefully improve the situation for you. To my eye, LaTeX documents look better now than before.
Note however, there are real limitations with the default underlying LaTeX syntax highlighter. It is not possible to provide individual colors to the elements you want because they are all highlighted by the same highlight-group.
You may want to also explore the Neovim Tree-sitter LaTeX parser, it seems there is greater disambiguation with that engine than the legacy Vim/Neovim reg-ex syntax highlighter.
Best regards.
Thank you for implementing the style tweaks for LaTeX! I appreciate your efforts to improve the appearance of LaTeX documents. The changes you made definitely enhance the look.
I understand the limitations with the default LaTeX syntax highlighter regarding individual colors for elements. I'll take your advice and explore the Neovim Tree-sitter LaTeX parser. It sounds promising, especially if it offers better disambiguation compared to the legacy Vim/Neovim regex syntax highlighter.
Thanks again for your help!
Best regards.
Issue Description: First, I would like to express my gratitude for the incredible work you've done with the Nightfly color scheme for Neovim. The theme is not only visually appealing but also enhances the coding experience significantly.
I am writing to request the addition of consistent color support for LaTeX. Currently, while using Nightfly with LaTeX, I've noticed some inconsistencies in the color highlighting, which can be a bit distracting and affects the overall readability of the code.
Details: Language: LaTeX Current Behavior: Inconsistent color highlighting for various LaTeX elements such as commands, environments, sections, etc. Expected Behavior: Uniform and consistent color scheme that aligns with the rest of the Nightfly theme, improving readability and maintaining the aesthetic integrity of the theme. Example: Here is a snippet of a typical LaTeX document where the inconsistency is noticeable:
Suggested Solution: Implementing a cohesive color scheme for LaTeX elements that blends seamlessly with the Nightfly colors. This could involve defining specific colors for commands, environments, sections, mathematical expressions, and other LaTeX-specific syntax elements.
Additional Context: Having consistent LaTeX support will greatly enhance the user experience for those of us who frequently work with LaTeX documents in Neovim. It will ensure that the beautiful aesthetics of Nightfly are maintained across different file types and improve the overall usability.
Thank you for considering this request. Your work is greatly appreciated, and I look forward to seeing Nightfly evolve even further.