add TODO comment highlighting
This commit is contained in:
parent
4bff607758
commit
fb04102fe3
|
@ -46,7 +46,9 @@ add-highlighter shared/rust/line_doctest/code default-region ref rust
|
||||||
add-highlighter shared/rust/line_code_rest region ^\h*//[!/]\h*``` ^\h*//[!/]\h*```$ fill documentation # reset invalid doctest
|
add-highlighter shared/rust/line_code_rest region ^\h*//[!/]\h*``` ^\h*//[!/]\h*```$ fill documentation # reset invalid doctest
|
||||||
add-highlighter shared/rust/line_comment2 region //[!/]{2} $ fill comment
|
add-highlighter shared/rust/line_comment2 region //[!/]{2} $ fill comment
|
||||||
add-highlighter shared/rust/line_doc region //[!/] $ fill documentation
|
add-highlighter shared/rust/line_doc region //[!/] $ fill documentation
|
||||||
add-highlighter shared/rust/line_comment1 region // $ fill comment
|
add-highlighter shared/rust/line_comment1 region // $ group
|
||||||
|
add-highlighter shared/rust/line_comment1/comment fill comment
|
||||||
|
add-highlighter shared/rust/line_comment1/todo regex (TODO|NOTE|FIXME): 1:meta
|
||||||
|
|
||||||
add-highlighter shared/rust/block_comment2 region -recurse /\*\*\* /\*\*\* \*/ fill comment
|
add-highlighter shared/rust/block_comment2 region -recurse /\*\*\* /\*\*\* \*/ fill comment
|
||||||
add-highlighter shared/rust/block_doc region -recurse /\*\* /\*\* \*/ regions
|
add-highlighter shared/rust/block_doc region -recurse /\*\* /\*\* \*/ regions
|
||||||
|
@ -60,7 +62,9 @@ add-highlighter shared/rust/block_doc/doctest/inner/comment regex ^\h*\* 0:docum
|
||||||
add-highlighter shared/rust/block_doc/doctest/inner/code ref rust
|
add-highlighter shared/rust/block_doc/doctest/inner/code ref rust
|
||||||
add-highlighter shared/rust/block_doc/code_rest region ``` ``` fill documentation
|
add-highlighter shared/rust/block_doc/code_rest region ``` ``` fill documentation
|
||||||
add-highlighter shared/rust/block_doc/doc default-region fill documentation
|
add-highlighter shared/rust/block_doc/doc default-region fill documentation
|
||||||
add-highlighter shared/rust/block_comment1 region -recurse /\* /\* \*/ fill comment
|
add-highlighter shared/rust/block_comment1 region -recurse /\* /\* \*/ group
|
||||||
|
add-highlighter shared/rust/block_comment1/comment fill comment
|
||||||
|
add-highlighter shared/rust/block_comment1/todo regex (TODO|NOTE|FIXME): 1:meta
|
||||||
|
|
||||||
add-highlighter shared/rust/macro_attributes region -recurse "\[" "#!?\[" "\]" regions
|
add-highlighter shared/rust/macro_attributes region -recurse "\[" "#!?\[" "\]" regions
|
||||||
add-highlighter shared/rust/macro_attributes/ default-region fill meta
|
add-highlighter shared/rust/macro_attributes/ default-region fill meta
|
||||||
|
|
1
test/highlight/rust/todo/cmd
Normal file
1
test/highlight/rust/todo/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
9
test/highlight/rust/todo/in
Normal file
9
test/highlight/rust/todo/in
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// TODO: some totally awesome comment
|
||||||
|
// NOTE: some note
|
||||||
|
// FIXME: fix some bug
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: some totally awesome comment
|
||||||
|
* NOTE: some note
|
||||||
|
* FIXME: fix some bug
|
||||||
|
*/
|
3
test/highlight/rust/todo/rc
Normal file
3
test/highlight/rust/todo/rc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
source "%val{runtime}/colors/default.kak"
|
||||||
|
source "%val{runtime}/rc/filetype/rust.kak"
|
||||||
|
set buffer filetype rust
|
7
test/highlight/rust/todo/script
Normal file
7
test/highlight/rust/todo/script
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": ["final_fg","final_bg"] }, "contents": "/" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": "/ " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "TODO" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": some totally awesome comment" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": "// " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "NOTE" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": some note" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": "// " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "FIXME" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": fix some bug" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": "/*\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " * " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "TODO" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": some totally awesome comment\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " * " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "NOTE" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": some note\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " * " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "FIXME" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": ": fix some bug\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " */" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }'
|
||||||
|
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
|
Loading…
Reference in New Issue
Block a user