z_mirror/kak-fastbuild
git clone https://git.raiguard.me/z_mirror/kak-fastbuild
8f81486
trunk
1# https://www.fastbuild.org 2 3hook global BufCreate .*[.](bff) %{ 4 set-option buffer filetype fastbuild 5} 6 7hook global WinSetOption filetype=fastbuild %{ 8 require-module fastbuild 9 10 set-option buffer comment_line '//' 11} 12 13provide-module fastbuild %{ 14 add-highlighter shared/fastbuild regions 15 add-highlighter shared/fastbuild/code default-region group 16 add-highlighter shared/fastbuild/comment region '(//|;)' $ fill comment 17 add-highlighter shared/fastbuild/single_string region "'" "'" fill string 18 add-highlighter shared/fastbuild/double_string region '"' '"' fill string 19 20 add-highlighter shared/fastbuild/code/constant regex "\b[A-Z_]*\b" 0:value 21 add-highlighter shared/fastbuild/code/directive regex "#(define|elif|else|endif|if|import|include|once)\b" 0:keyword 22 add-highlighter shared/fastbuild/code/function_call regex "\b(\w*)\b\s*\(" 1:function 23 add-highlighter shared/fastbuild/code/operator regex "(!=|-|=|\+)" 0:operator 24 add-highlighter shared/fastbuild/code/variable regex "\.(\w*)\b" 0:variable 25 26 add-highlighter shared/fastbuild/code/builtin regex "\b(_CURRENT_BFF_DIR_|_FASTBUILD_VERSION_STRING_|_FASTBUILD_VERSION_|_FASTBUILD_EXE_PATH_|_WORKING_DIR_|Alias|Compiler|Copy|CopyDir|CSAssembly|DLL|Error|Exec|Executable|ForEach|If|Library|ListDependencies|ObjectList|Print|RemoveDir|Settings|Test|TextFile|Unity|Using|VCXProject|VSProjectExternal|VSSolution|XCodeProject|exists|file_exists)\b" 0:builtin 27} 28 29hook -group fastbuild-highlight global WinSetOption filetype=fastbuild %{ 30 add-highlighter window/fastbuild ref fastbuild 31 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/fastbuild } 32}