chore: add testing files

pull/12759/head
Nikita Revenco 2025-01-31 20:42:23 +00:00
parent 0efa8207d8
commit 48dec3ee8f
3 changed files with 14 additions and 0 deletions

View File

@ -504,6 +504,7 @@ impl MappableCommand {
hover, "Show docs for item under cursor",
toggle_comments, "Comment/uncomment selections",
toggle_line_comments, "Line comment/uncomment selections",
testing1234, "a",
toggle_block_comments, "Block comment/uncomment selections",
rotate_selections_forward, "Rotate selections forward",
rotate_selections_backward, "Rotate selections backward",
@ -5179,6 +5180,13 @@ fn toggle_comments(cx: &mut Context) {
})
}
fn testing1234(cx: &mut Context) {
let doc = doc!(cx.editor);
let syntax = doc.syntax();
log::error!("{syntax:#?}");
}
fn toggle_line_comments(cx: &mut Context) {
toggle_comments_impl(cx, |line_token, block_tokens, doc, selection| {
if line_token.is_none() && block_tokens.is_some() {

View File

@ -6,6 +6,7 @@ use helix_core::hashmap;
pub fn default() -> HashMap<Mode, KeyTrie> {
let normal = keymap!({ "Normal mode"
"M" => testing1234,
"h" | "left" => move_char_left,
"j" | "down" => move_visual_line_down,
"k" | "up" => move_visual_line_up,

5
lol.html 100644
View File

@ -0,0 +1,5 @@
<p>C-c on this line should use the HTML comment token(s).</p>
<script type="text/javascript">
// C-c on this line should use the javascript comment token(s).
foo();
</script>