-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
macOS version: 26.1 (25B78)
Syntax Highlight Version 2.1.27 (76)
Syntax Highlight reports an error when trying to quicklook any rust file.
highlight: Could not read input file: '/Users/toto/Documents/hello_world/src/main.rs'.
Changing the file extension to .c will colorize the file and quicklook it as expected.
Error reported when Quicklooking the main.rs file (any rust file) with the following colorize.log:
2025-12-11 14:09:47.513 Start processing /Users/toto/Documents/hello_world/src/main.rs …
2025-12-11 14:09:47.513 Detected UTI: org.rust-lang.rust
2025-12-11 14:09:47.516 Highlight dataDir: /Applications/Syntax Highlight.app/Contents/Resources/highlight/share
2025-12-11 14:09:47.516 Highlight theme: /Applications/Syntax Highlight.app/Contents/Resources/highlight/share/themes/edit-xcode
2025-12-11 14:09:47.516 Highlight syntax: rust
2025-12-11 14:09:47.516 Start colorizing /Users/toto/Documents/hello_world/src/main.rs …
2025-12-11 14:09:47.516 Executing '/Applications/Syntax Highlight.app/Contents/Resources/highlight/colorize.sh' '/Users/toto/Documents/hello_world/src/main.rs'
2025-12-11 14:09:47.000 Starting `colorize.sh`
2025-12-11 14:09:47.000 # Install `gdate` with `brew install coreutils` to show the nanoseconds time stamp #
2025-12-11 14:09:47.000 Target to colorize: '/Users/toto/Documents/hello_world/src/main.rs'
2025-12-11 14:09:47.000 Resolved to language: rust
2025-12-11 14:09:47.000 Reader: cat '/Users/toto/Documents/hello_world/src/main.rs'
2025-12-11 14:09:47.000 Highlight: /Applications/Syntax Highlight.app/Contents/Resources/highlight/bin/highlight
2025-12-11 14:09:47.000 Generating the preview…
2025-12-11 14:09:47.000 $ "/Applications/Syntax Highlight.app/Contents/Resources/highlight/bin/highlight" -T '/Users/toto/Documents/hello_world/src/main.rs' --syntax=rust --quiet --include-style --encoding=UTF-8 --replace-tabs=4 --font=SFMono-Regular --font-size=14.00 --out-format=rtf --page-color --char-styles -v -v --ls-exec=/Users/toto/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rust-analyzer --data-dir=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share --style=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share/themes/edit-xcode.theme --validate-input -i '/Users/toto/Documents/hello_world/src/main.rs'
Loading language definition:
/Applications/Syntax Highlight.app/Contents/Resources/highlight/share/langDefs/rust.lang
Description: Rust
LUA GLOBALS:
AddKeyword: function
AddPersistentState: function
Categories: table
Comments: table
Description: string [ Rust ]
Digits: string [ (?:0x|0o|0b)[0-9a-fA-F\_uif]+|\d+[\.]?[\d\_uif]+(?:[eE][\-\+][\d\_uif]+)?|\d+ ]
DisableHighlighting: boolean [ 0 ]
EnableIndentation: boolean [ 1 ]
HL_BLOCK_COMMENT: number [ 4 ]
HL_BLOCK_COMMENT_END: number [ 17 ]
HL_EMBEDDED_CODE_BEGIN: number [ 25 ]
HL_EMBEDDED_CODE_END: number [ 26 ]
HL_ESC_SEQ: number [ 5 ]
HL_ESC_SEQ_END: number [ 18 ]
HL_FORMAT_ANSI: number [ 5 ]
HL_FORMAT_BBCODE: number [ 9 ]
HL_FORMAT_HTML: number [ 0 ]
HL_FORMAT_LATEX: number [ 3 ]
HL_FORMAT_ODT: number [ 11 ]
HL_FORMAT_PANGO: number [ 10 ]
HL_FORMAT_RTF: number [ 4 ]
HL_FORMAT_SVG: number [ 8 ]
HL_FORMAT_TEX: number [ 2 ]
HL_FORMAT_TRUECOLOR: number [ 7 ]
HL_FORMAT_XHTML: number [ 1 ]
HL_FORMAT_XTERM256: number [ 6 ]
HL_IDENTIFIER_BEGIN: number [ 23 ]
HL_IDENTIFIER_END: number [ 24 ]
HL_INTERPOLATION: number [ 10 ]
HL_INTERPOLATION_END: number [ 21 ]
HL_KEYWORD: number [ 13 ]
HL_KEYWORD_END: number [ 22 ]
HL_LANG_DIR: string [ /Applications/Syntax Highlight.app/Contents/Resources/highlight/share/langDefs/ ]
HL_LINENUMBER: number [ 8 ]
HL_LINE_COMMENT: number [ 3 ]
HL_LINE_COMMENT_END: number [ 16 ]
HL_NUMBER: number [ 2 ]
HL_OPERATOR: number [ 9 ]
HL_OPERATOR_END: number [ 20 ]
HL_OUTPUT: number [ 4 ]
HL_PLUGIN_PARAM: string [ ]
HL_PREPROC: number [ 6 ]
HL_PREPROC_END: number [ 19 ]
HL_PREPROC_STRING: number [ 7 ]
HL_REJECT: number [ 101 ]
HL_SRInstance: userdata
HL_STANDARD: number [ 0 ]
HL_STRING: number [ 1 ]
HL_STRING_END: number [ 14 ]
HL_UNKNOWN: number [ 100 ]
Identifiers: string [ [a-zA-Z_]\w* ]
IgnoreCase: boolean [ 0 ]
Keywords: table
OnStateChange: function
Operators: string [ \(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^' ]
OverrideParam: function
RemoveKeyword: function
StoreValue: function
Strings: table
_VERSION: string [ Lua 5.4 ]
assert: function
collectgarbage: function
coroutine: table
debug: table
dofile: function
error: function
getmetatable: function
io: table
ipairs: function
load: function
loadfile: function
math: table
next: function
os: table
pairs: function
pcall: function
print: function
rawequal: function
rawget: function
rawlen: function
rawset: function
require: function
select: function
setmetatable: function
string: table
table: table
tonumber: function
tostring: function
type: function
utf8: table
warn: function
xpcall: function
REGEX:
State 13 (HL_KEYWORD): (\w+\!?)\s*\(
State 13 (HL_KEYWORD): b'(?:[\x00-\x08\x0B\x0C\x0E-\x26\x28-\x5B\x5D-\x7F]|\\(?:[0tnr\'\\]|x[0-9a-fA-F]{2}))'
State 13 (HL_KEYWORD): #+\"
State 13 (HL_KEYWORD): \"#+
State 4 (HL_OUTPUT): \/\*
State 17 (HL_BLOCK_COMMENT_END): \*\/
State 3 (HL_LINE_COMMENT): //
State 23 (HL_IDENTIFIER_BEGIN): [a-zA-Z_]\w*
State 2 (HL_NUMBER): (?:0x|0o|0b)[0-9a-fA-F\_uif]+|\d+[\.]?[\d\_uif]+(?:[eE][\-\+][\d\_uif]+)?|\d+
State 1 (HL_STRING): "
State 10 (HL_INTERPOLATION): \{\S*?\}
State 5 (HL_ESC_SEQ): \\[\'\\\"aftnrv]|\\x[0-9a-fA-F]{2}|\\U\{[0-9a-fA-F]{8}\}|\\u\{[0-9a-fA-F]{4}\}|\\x??
State 9 (HL_OPERATOR): \(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^'
KEYWORDS:
Self(1) abstract(1) alignof(1) as(1) async(1) auto(1) await(1) become(1) box(1) break(1) catch(1) char(2) const(1) continue(1) crate(1) default(3) do(1) dyn(3) else(1) enum(2) extern(1) f32(2) f64(2) false(1) final(1) fn(1) for(1) i16(2) i32(2) i64(2) i8(2) if(1) impl(1) in(1) isize(2) let(1) loop(1) macro(1) match(1) mod(1) move(1) mut(1) offsetof(1) override(1) priv(1) pub(1) pure(1) ref(1) return(1) self(1) sizeof(1) static(1) str(2) struct(2) super(1) trait(1) true(1) try(1) type(1) typeof(1) u16(2) u32(2) u64(2) u8(2) union(3) unsafe(1) unsized(1) use(1) usize(2) virtual(1) where(1) while(1) yield(1)
highlight: Could not read input file:
'/Users/toto/Documents/hello_world/src/main.rs'
2025-12-11 14:09:47.000 Error 1!
2025-12-11 14:09:47.000 -------------------------------------------------
2025-12-11 14:09:47.000 First try failed, second try with txt language…
2025-12-11 14:09:47.000 Generating the preview…
2025-12-11 14:09:47.000 $ "/Applications/Syntax Highlight.app/Contents/Resources/highlight/bin/highlight" -T '/Users/toto/Documents/hello_world/src/main.rs' --syntax=txt --quiet --include-style --encoding=UTF-8 --replace-tabs=4 --font=SFMono-Regular --font-size=14.00 --out-format=rtf --page-color --char-styles -v -v --ls-exec=/Users/toto/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rust-analyzer --data-dir=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share --style=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share/themes/edit-xcode.theme --validate-input -i '/Users/toto/Documents/hello_world/src/main.rs'
Loading language definition:
/Applications/Syntax Highlight.app/Contents/Resources/highlight/share/langDefs/txt.lang
Description: Plain text
LUA GLOBALS:
AddKeyword: function
AddPersistentState: function
Categories: table
Comments: table
Description: string [ Plain text ]
Digits: string [ [a-zA-Z_]\w* ]
DisableHighlighting: boolean [ 0 ]
EnableIndentation: boolean [ 1 ]
HL_BLOCK_COMMENT: number [ 4 ]
HL_BLOCK_COMMENT_END: number [ 17 ]
HL_EMBEDDED_CODE_BEGIN: number [ 25 ]
HL_EMBEDDED_CODE_END: number [ 26 ]
HL_ESC_SEQ: number [ 5 ]
HL_ESC_SEQ_END: number [ 18 ]
HL_FORMAT_ANSI: number [ 5 ]
HL_FORMAT_BBCODE: number [ 9 ]
HL_FORMAT_HTML: number [ 0 ]
HL_FORMAT_LATEX: number [ 3 ]
HL_FORMAT_ODT: number [ 11 ]
HL_FORMAT_PANGO: number [ 10 ]
HL_FORMAT_RTF: number [ 4 ]
HL_FORMAT_SVG: number [ 8 ]
HL_FORMAT_TEX: number [ 2 ]
HL_FORMAT_TRUECOLOR: number [ 7 ]
HL_FORMAT_XHTML: number [ 1 ]
HL_FORMAT_XTERM256: number [ 6 ]
HL_IDENTIFIER_BEGIN: number [ 23 ]
HL_IDENTIFIER_END: number [ 24 ]
HL_INTERPOLATION: number [ 10 ]
HL_INTERPOLATION_END: number [ 21 ]
HL_KEYWORD: number [ 13 ]
HL_KEYWORD_END: number [ 22 ]
HL_LANG_DIR: string [ /Applications/Syntax Highlight.app/Contents/Resources/highlight/share/langDefs/ ]
HL_LINENUMBER: number [ 8 ]
HL_LINE_COMMENT: number [ 3 ]
HL_LINE_COMMENT_END: number [ 16 ]
HL_NUMBER: number [ 2 ]
HL_OPERATOR: number [ 9 ]
HL_OPERATOR_END: number [ 20 ]
HL_OUTPUT: number [ 4 ]
HL_PLUGIN_PARAM: string [ ]
HL_PREPROC: number [ 6 ]
HL_PREPROC_END: number [ 19 ]
HL_PREPROC_STRING: number [ 7 ]
HL_REJECT: number [ 101 ]
HL_SRInstance: userdata
HL_STANDARD: number [ 0 ]
HL_STRING: number [ 1 ]
HL_STRING_END: number [ 14 ]
HL_UNKNOWN: number [ 100 ]
Identifiers: string [ [a-zA-Z_]\w* ]
IgnoreCase: boolean [ 0 ]
Keywords: table
OverrideParam: function
RemoveKeyword: function
StoreValue: function
_VERSION: string [ Lua 5.4 ]
assert: function
collectgarbage: function
coroutine: table
debug: table
dofile: function
error: function
getmetatable: function
io: table
ipairs: function
load: function
loadfile: function
math: table
next: function
os: table
pairs: function
pcall: function
print: function
rawequal: function
rawget: function
rawlen: function
rawset: function
require: function
select: function
setmetatable: function
string: table
table: table
tonumber: function
tostring: function
type: function
utf8: table
warn: function
xpcall: function
REGEX:
State 23 (HL_IDENTIFIER_BEGIN): [a-zA-Z_]\w*
State 2 (HL_NUMBER): [a-zA-Z_]\w*
highlight: Could not read input file:
'/Users/toto/Documents/hello_world/src/main.rs'
2025-12-11 14:09:47.000 Error 1!
2025-12-11 14:09:47.000 -------------------------------------------------
2025-12-11 14:09:47.000 Reached the end of the file. That should not happen.
2025-12-11 14:09:47.591 ERROR: colorize.sh failed with exit code 101:
2025-12-11 14:09:47.591 OS Appearance: light
#######
# ENV:
extraFlagsHL=--replace-tabs=4•--font=SFMono-Regular•--font-size=14.00•--out-format=rtf•--page-color•--char-styles•-v•-v•--ls-exec=/Users/toto/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rust-analyzer•--data-dir=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share•--style=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share/themes/edit-xcode.theme
logHL=/Users/toto/Desktop/colorize.log
TMPDIR=/var/folders/sh/r70brl_10r9b318l9xdnkjd00000gn/T/
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
XPC_SERVICE_NAME=org.sbarex.SourceCodeSyntaxHighlight.XPCRender
textEncoding=UTF-8
pathHL=/Applications/Syntax Highlight.app/Contents/Resources/highlight/bin/highlight
LOGNAME=toto
webkitTextEncoding=UTF-8
syntaxHL=rust
SHELL=/bin/zsh
HIGHLIGHT_DATADIR=/Applications/Syntax Highlight.app/Contents/Resources/highlight/share
pathDos2unix=/Applications/Syntax Highlight.app/Contents/Resources/dos2unix
PATH=/usr/bin:/bin:/usr/sbin:/sbin
OSLogRateLimit=64
useLSP=1
XPC_FLAGS=0x0
HOME=/Users/toto
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.DYnqPhsZXz/Listeners
USER=toto
####### ENV end
Metadata
Metadata
Assignees
Labels
No labels