UNITADE.md icon indicating copy to clipboard operation
UNITADE.md copied to clipboard

[FEATURE]: Support for different editors/syntaxes

Open Servinjesus1 opened this issue 1 year ago • 2 comments

Contact details

@Servinjesus1

What the essence of your feature request

It would be awesome if certain extensions could be customized to open in different editor schemas in Obsidian. For example, @deathau created a plugin to view INI files in Obsidian which essentially registers the extension with an ini syntax highlight scheme for CodeMirror's viewer. He uses the same kind of code to syntax highlight code blocks in normal markdown files, but adapted it to open ini files in this case.

If this extension could extend this notion to cover many different syntaxes in CodeMirror, that would be an excellent first step. I am not sure if other schemas besides CodeMirror and Obsidian's markdown editor make sense, but in general I could see users being able to populate a table of extension, schema, and syntax where each file type could be assigned an editor and a syntax to control highlighting.

The work required for this might be a little nontrivial, though, as currently the plugin doesn't seem to support dynamic registration reloading or catching errors associated with already registered extensions (c.f. other requests)

On what OS you want to maintain your request.

Windows, macOS

Code of conduct

  • [X] I agree to follow this project's code of conduct

Issue policy

  • [X] I agree to follow this project's issue policy

Servinjesus1 avatar Dec 11 '23 20:12 Servinjesus1