Open dpowers opened 1 year ago
Are you able to make a separate file then import it inside the settings text box? Also, if you have a plugin like obsidian git, it should backup and version all your settings.
All of that is possible, and it covers the utility I need. I still weakly claim that it would be a bit easier to just point it to a file path.
Do you have an example of where this might be easier?
@dpowers You can use the normal import mechanism of each language to include any arbitrary bit of code in your code blocks. How would a new feature be better than the default mechanisms of each language?
Some languages, Rust in particular for me, don't have a canonical "include this file" style of import and rely on their broader build system to do the work. Technically, Rust has https://doc.rust-lang.org/stable/std/macro.include.html, and I'll use that here, but it's generally discouraged. That said, the automated prelude of the plugin isn't canonical either :)
Idea
Allow loading of injection code from files. Currently code for some languages (ex: Rust) can be prefixed by adding it to a text box in the settings. This makes editing that code error-prone and difficult. Further, the code is not a normal file, and cannot be easily backed up or version controlled. Changing this to an optional path would fix that.