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

Possiblity to ignore certain lines #38

Open
Thaodan opened this issue Aug 14, 2023 · 7 comments
Open

Possiblity to ignore certain lines #38

Thaodan opened this issue Aug 14, 2023 · 7 comments

Comments

@Thaodan
Copy link

Thaodan commented Aug 14, 2023

Some modes post content in the buffer that is read-only and not related to the actual content that the user writes.

For example in have or ERC/Circe the messages sent by other users or for Mastodon the same and the keybinds shown.

@tmalsburg
Copy link
Owner

I don't have much experience with such modes. Any suggestions as to how this could be implemented? Is it safe to assume that read-only content should always be ignored?

@Thaodan
Copy link
Author

Thaodan commented Aug 15, 2023 via email

@tmalsburg
Copy link
Owner

What about a regex? E.g. ignore everything after ^#.*

I don't think it's that simple. Content after # is not necessarily read-only and should not generally be ignored. In Python, for instance, I'd want to do the opposite: ignore everything that does not follow # because we would like to do language guessing based on the comments, not based on the code.

@Thaodan
Copy link
Author

Thaodan commented Aug 17, 2023 via email

@tmalsburg
Copy link
Owner

Tbh, this sounds like a difficult-to-implement feature and it would have to be implemented for different modes separately.

Alternative proposal: How about a way to guess the language only based on the current paragraph, not the entire buffer? Wouldn't this also solve your use case?

@Thaodan
Copy link
Author

Thaodan commented Sep 8, 2023 via email

@tmalsburg
Copy link
Owner

I won't have time to work on this myself, but feel free to sketch an PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants