obsidian-linter icon indicating copy to clipboard operation
obsidian-linter copied to clipboard

FR: Add Codeblock Formatting

Open BonjourL opened this issue 2 years ago • 3 comments

格式化代码块内的代码和格式化代码块外的代码

BonjourL avatar May 10 '23 02:05 BonjourL

I believe this is the English version of the request being made:

Code inside a formatted code block and code outside a formatted code block

@BonjourL , could you give a couple of examples and explain a little further on what you would like? I don't believe I understand what you are asking for.

Google translated to simplified Chinese: @BonjourL,你能举几个例子并进一步解释你想要什么吗? 我不相信我明白你在问什么。

pjkaufman avatar May 21 '23 23:05 pjkaufman

格式化代码块内的代码,比如有些java代码格式很乱,格式化后比较整齐

BonjourL avatar May 26 '23 11:05 BonjourL

Yes! this would be fantastic :pray:

Some ideas:

  • Trim all trailing whitespace on focus leave of codeblock
  • Ensure language is always specified
    • If lang is not set, option to always autoset a language

I'm not sure if we could integrate w/ a formatter (i.e., rustfmt), but that would be ultra cool.

peterkos avatar Nov 20 '23 12:11 peterkos