I'm building a plugin that will need to open a yml file, take Python code from one of its keys, and enable developing from there. The development language itself would be Python. I'm not sure what would be the right design, as it is not clear that there's a need for custom language support here. (seems like an overkill)
Illustration for yml file:
print ('this is my python code')
I want to take the code under the script key, have it displayed in the editor, and that people would be able to continue developing Python code from there.
Is the right approach here to do a custom language support, or is there a simpler way? The file itself is yml, I planned to assign it with a unique ending, and then when a file of this kind would be opened, put in only the value of the yml key that has code in it (it's a constant key).
As the development language itself is Python, I don't see language injection as the right fit here (I don't have a mix of language, I want to do file manipulation to take in only the Python part).
No need for a separate editor as well since people need only the Python code.
Also, I couldn't find any option to modify a file between it being open till displayed in the editor (so I could pull the script part from the yml), is there one?
Would love your thought about what would be the right approach to create a plugin here.