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

Ctrl-c doesn't comment the line in OCaml, it uses (* ... *) style comments #7694

Closed
jumpnbrownweasel opened this issue Jul 21, 2023 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@jumpnbrownweasel
Copy link

jumpnbrownweasel commented Jul 21, 2023

Summary

For ocaml in languages.toml we have:

comment-token = "(**)"

This puts (**) at the start of the line, which has no effect. The line(s) must be surrounded with (* and *) instead, which isn't currently possible with Ctrl-c.

Reproduction Steps

I tried this:

  1. Ctrl-c

I expected this to happen: Line is commented by surrounding with (* and *).

Instead, this happened:

Line is prefixed with (**) which has no effect.

Helix log

No response

Platform

Linux

Terminal Emulator

Gnome terminal

Helix Version

helix 23.05 (9ccca81)

@jumpnbrownweasel jumpnbrownweasel added the C-bug Category: This is a bug label Jul 21, 2023
@jumpnbrownweasel
Copy link
Author

This may require a new feature, so perhaps this should be labeled differently.

One idea is to allow comment-token to be an array of two strings, in which case they are used to surround the line(s). That way an ocaml-specific fix is not needed. I would be willing to try implementing that, or whatever approach is the right way to do it.

@gabydd
Copy link
Member

gabydd commented Jul 21, 2023

we don't currently support this kind of comments, I am working on it though

duplicate of #1505

@gabydd gabydd closed this as completed Jul 21, 2023
@jumpnbrownweasel
Copy link
Author

we don't currently support this kind of comments

Yes, I know.

, I am working on it though
duplicate of #1505

Oh, I saw that issue title but didn't realize it will address this. Thanks for working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants