-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide custom editor widget for given file extension via plugin #22354
Comments
Hey @zuckerruebe, thanks for reporting. You said:
This is not possible at the moment but we'll work on it for Spyder 6.1, to be released at the beginning of next year. It's important for us to solve it because that way users will be able to open Jupyter notebooks directly in our Spyder-notebook plugin. If it's ok for you, could you share why you need this functionality? |
Hi @ccordoba12 ! Sure, thanks for your reply. I'm one of the developers of pytrnsys. It's a PyQt based GUI to draw hydraulic schemes like this one: From the graphical hydraulic scheme you'd then export a textual description of the system in a so-called "deck" file which then serves as the input to But before your simulation is ready to be run, you'd first have to implement a few things - chiefly the control strategy of the system - within To do that, you need a text editor, of course - ideally one with an idea of the structure of a deck file for syntax highlighting, navigation, etc. (LSP!). Currently, we're using, e.g., Visual Studio Code for that. But that means having to switch back and forth between programs, telling users to also install Code, etc. Hence the idea to be able to edit both the ddck file and the graphical diagram within Spyder. I'm glad to hear that this is something you're thinking about for the next release. Is there something on the development branch with regards to this that I can program against/try out or is it too early days? Cheers! |
@ccordoba12 We'll soon have to take a decision on whether we have to fork or can go with only a plugin, so a quick feedback would be much appreciated. |
I am developing the Spyder notebook plugin. I plan in the next weeks to take the existing but outdated PR #8798 and update it for the latest release of Spyder so that notebook files can be opened in the notebook plugin. This mechanism should also work for ddck files, as I understand it. |
Hi @jitseniesen Thanks for your reply. Would that PR also address opening a file by clicking on it in the explorer/file system tree plugin? If I undestand correctly, you'd "backport" it to the latest release of Spyder? Or merge it into main? |
@zuckerruebe Yes, you can also open the file in your plugin by clicking on it in the File or Project explorer, at least that is my intention. Thanks for mentioning it, I will check in due time that this actually works. My expectation is that this will be included in Spyder 6.1.0 but that is not up to me. |
To complement what @jitseniesen said, our 6.1.0 version will be available in six months or so. |
Thanks, everyone! |
Issue Report Checklist
N/A
Problem Description
Is it possible to associate a file extension with a plugin's widget such that when a user requests opening a file the plugin's widget is used to open/edit the file and not the built in editor plugin?
What steps reproduce the problem?
N/A
What is the expected output? What do you see instead?
N/A
Paste Traceback/Error Below (if applicable)
N/A
Versions
Newest release version
Dependencies
N/A
The text was updated successfully, but these errors were encountered: