artisticat1 / obsidian-latex-suite

Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
MIT License
1.43k stars 56 forks source link

[FEATURE] Support code mode for inline code and block code #265

Open langshangyuan opened 9 months ago

langshangyuan commented 9 months ago

Description of the Problem

Currently, the c snippet option only works inside the ``` ... ``` codeblock. It won't expand inside the inline code block (or verbatim view) like ` ... `. I want the code snippet to expand both inside the codeblock and inline code, whose behavior is aligned with math snippet (set by the m option).

Description of the Solution

Maybe we can implement a isWithInlineCode method which is similar to the isWithInlineMath

langshangyuan commented 9 months ago

And the code snippet defined with c option cannot expand inside the `<cursor>` codeblock, that is, the verbatim mode inside codeblock.