Obsidian-Code-Styler icon indicating copy to clipboard operation
Obsidian-Code-Styler copied to clipboard

Feature Request: Set inline syntax highlighting for file in frontmatter

Open skewballfox opened this issue 1 year ago • 4 comments

Summary

It would be really useful to be able to apply a default heading to inline code via the frontmatter of a note.

Awesome extension btw

Basic example

  1. create a new file
  2. in the frontmatter or properties editor, create a new entry inline styling: cpp or {python icon},
  3. profit?

now each time you create a new inline code block your styling selection is applied

Motivation

When copying things like tables from offline sources (ala cheatcheets), it would be a bit tedious to insert the language into every inline entry. something like default headers would also be useful when taking notes that are language specific.

Existing Requests?

I tried searching different combinations of frontmatter, YAML, default but didn't find anything relevant to this specific request. Sorry if missed something

skewballfox avatar Mar 08 '24 15:03 skewballfox

This makes a load of sense and shouldn't be hard to implement (might to a quick refactor to make parsing frontmatter options more easy). I'm currently very busy with exams but will try and address this soon!

mayurankv avatar May 05 '24 07:05 mayurankv

Exactly. Universally define your language or style for a note.

i also do not want to write {js} in front of every inline or block code. I just want to put the language at the front matter (properties) and the language is fully understood throughout the note.

DesBw avatar Sep 08 '24 05:09 DesBw

Exactly. Universally define your language or style for a note.

i also do not want to write {js} in front of every inline or block code. I just want to put the language at the front matter (properties) and the language is fully understood throughout the note.

DesBw avatar Sep 08 '24 05:09 DesBw