mayurankv / Obsidian-Code-Styler

A plugin for Obsidian.md for styling codeblocks and inline code
Other
281 stars 9 forks source link

Feature Request: Set inline syntax highlighting for file in frontmatter #235

Open skewballfox opened 8 months ago

skewballfox commented 8 months ago

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

mayurankv commented 6 months ago

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!

DesBw commented 2 months ago

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 commented 2 months ago

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.