1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-23 19:46:33 +03:00
kakoune/test/highlight/rust/comment0/script
Maxime Coste 3fc8e29d10 Add support for curly underline and separate underline color
Add support for a third color in face definition that controls
the underline and a 'c' attribute for curly underline (that takes
precedence over 'u' if both are specified)

Allow empty colors to mean default, so that `,,red+u` means the
same as `default,default,red+u`

Fixes #4138
2021-09-07 08:21:26 +10:00

8 lines
5.4 KiB
Plaintext

ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": ["final_fg","final_bg"] }, "contents": "/" }, { "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "/ make sure the color does not break" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "///" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "```" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "///" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "#" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "use" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " foo;\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "///" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "green", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo" }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "::" }, { "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "(" }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\"Hello world\"" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": ");\u000a" }], [{ "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "///" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "```" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "fn" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "cyan", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "(s: " }, { "face": { "fg": "yellow", "bg": "default", "underline": "default", "attributes": [] }, "contents": "&str" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": ") {\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "println!" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "(" }, { "face": { "fg": "magenta", "bg": "default", "underline": "default", "attributes": [] }, "contents": "\"{}\"" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": ", s);\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "}\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "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", "underline": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "underline": "default", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "underline": "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] }'