Closed isaiasvallejos closed 1 month ago
@ericdallo Suggestions applied! Thanks a lot.
Also added the CHANGELOG in the unreleased section, that's correct? Let me know if we need anything else.
PS: I didn't rebase the commits, so on merge, maybe we need to do a squash.
It looks and works great! Thank you for your first contribution!
Add syntax highlighting to codeblocks from Clojure documentation when viewed in IntelliJ's documentation window, improving readability and comprehension within the docs code.
Solves issue: https://github.com/clojure-lsp/clojure-lsp-intellij/issues/38
Key changes:
markdown-clj
to version1.12.1
, which introduces the:codeblock-callback
argument that enables the integration of a callback function to parse codeblocks from the documentation markdown, facilitating the addition of a highlight function.start
and.advance
methods from lexer, handling each code token such as parentheses(
)
,defn
, variable names, etc.<span>
element, applying inline styles to mimic the desired syntax highlighting effect translating the token attributes to CSS.How to test:
Run plugin, install a theme or use a default one and try out.
Preview:
Using theme "One Dark Vivid Italic", before/after: