sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
47.6k stars 1.18k forks source link

Maybe patch the newest lisp syntaxes? #2969

Closed ccqpein closed 1 month ago

ccqpein commented 1 month ago

What steps will reproduce the bug?

Create new lisp file by:

echo '(defun test () :a-from-b)' > ./test.lisp

What happens?

Then, when I use bat ./test.lisp, the -from- inside a-from-b is highlighted like keyword. But it shouldn't be.

What did you expect to happen instead?

Render it like the normal value.

How did you install bat?

cargo

bat version and environment

v0.24.0 and macOS 14.5

how I fix it

I reinstall the newest syntaxes from sublime as the README provided adding-new-syntaxes--language-definitions

➜ ls "$(bat --config-dir)/syntaxes"
Lisp.sublime-syntax #<= the master version of sublime Package repo

Then run the bat cache --build. And the highlight is good enough.

So, does Bat need one more patch to update the Lisp.sublime-syntax? I noticed that the version of assets/syntaxes/01_Packages was years ago.

Thank you

ccqpein commented 1 month ago

Gave a potential fix in PR #2970