Skip to content
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

No comment injection for latex grammar #4921

Closed
epbuennig opened this issue Nov 28, 2022 · 0 comments · Fixed by #4922
Closed

No comment injection for latex grammar #4921

epbuennig opened this issue Nov 28, 2022 · 0 comments · Fixed by #4922
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug

Comments

@epbuennig
Copy link
Contributor

Summary

Currently, the injection of comment highlights which add highlights such as #1234 for issue numbers @username for usernames and perhaps most importantly TODO and friends for comments related to bugs and todos are not correctly injected for LaTeX.

It seems that this was partially fixed in #4528, however I noticed that the highlights.scm query for LaTeX also mentions comment_environment and block_comment, and if we highlight those as comments then we also want comment injections for them.

Reproduction Steps

I tried this:

  1. Create a file like this:
\begin{document}
	Lorem Ipsum
\end{document}


\begin{comment}
	comment invironment
	FIXME: lorem @username ipsum #12333
\end{comment}


\iffalse
	block comment
	FIXME: lorem @username ipsum #12333
\fi


% line comment
% FIXME: lorem @username ipsum #12333
  1. hx <file>

I expected this to happen:
Things such as TODO or @username are highlighted as for languages like rust or bash for all comment types.

Instead, this happened:
Things such as TODO or @username are only highlighted for line_comments on master and not at all on stable.

Helix log

~/.cache/helix/helix.log
2022-11-28T11:50:14.937 helix_view::theme [WARN] Theme: malformed hexcode: fg
2022-11-28T11:50:14.941 helix_view::editor [ERROR] Failed to initialize the LSP for `source.tsq` { LSP not defined }
2022-11-28T11:51:06.674 helix_view::theme [WARN] Theme: malformed hexcode: fg
2022-11-28T11:51:06.680 helix_view::editor [ERROR] Failed to initialize the LSP for `source.tsq` { LSP not defined }
2022-11-28T11:51:58.949 helix_view::theme [WARN] Theme: malformed hexcode: fg
2022-11-28T11:51:58.954 helix_view::editor [ERROR] Failed to initialize the LSP for `source.tsq` { LSP not defined }
2022-11-28T11:53:36.276 helix_view::theme [WARN] Theme: malformed hexcode: fg
2022-11-28T11:53:36.283 helix_view::editor [ERROR] Failed to initialize the LSP for `source.tsq` { LSP not defined }
2022-11-28T11:59:43.518 helix_view::theme [WARN] Theme: malformed hexcode: fg
2022-11-28T12:00:17.727 helix_view::theme [WARN] Theme: malformed hexcode: fg

Platform

Linux 6.0.9-arch1-1

Terminal Emulator

alacritty 0.11.0

Helix Version

helix 22.08.1

@epbuennig epbuennig added the C-bug Category: This is a bug label Nov 28, 2022
@kirawi kirawi added the A-language-support Area: Support for programming/text languages label Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants