Closed TheOneKevin closed 2 years ago
Updated with new changes 😄
Awesome! Can you update the changelog file and set a prerelease version? (See history) Then it will get released automatically after I merge this.
Awesome! Did you test this feature?
Please fix formatting, then I can merge this! Probably will do some refactoring later though. Thanks a lot for this cool feature!
The only testing I did was with the files under examples/linking. I added some nodes to cover the new cases. Other than that, I ran Prettier so it should conform to the style guides now.
Thank you! Will soon be available in Draw.io insiders!
Thanks so much for this incredible plugin!
If I understood this feature right, it allows to link a node in a draw.io-drawing to another file (e.g. a CAD-File, or another drawio-File) within the VScode controlled folder (and/or?) workspace. Click on the node would then open the other file (within VSCode if appropriate) I was very hopeful to have it already available, as in 2022 it was "soon be available".
Maybe I am just to stupid to find it or understand how it works.
Could you please add this feature and usecase to your documentation and usage examples to allow me and others to easily understand and use it? (Or did I just did not see it? And you could point me to it?)
@janklostermann: Hey! Check out docs/code-link.md for examples on this. The examples/linking/ directory also contains examples on how to use this. If I remember correctly, this linking feature allows you to link symbols inside a document -- I believe you need a language server support for this? Not sure about arbitrary files.
@TheOneKevin That's exactly where I tried to find it. But as you already mentioned, it seems to support only symbols.
Are files of a folder or workspace considered as symbols? (I don't actually know what symbols mean exactly in this context.) Otherwise an function extention might be needed to allow relative paths or links to files within the workspace, when symbols within these files are not available.
By the way, for a more specific usecase: Linking to another *.drawio[.png/.svg]: Do these drawio-files (languages?) provide symbols?
That would already resolve my current problem to expanding a box in a .drawio.png-file by clicking on it to open another .drawio.png file, showing the content of that box. (needed, as neither png nor svg support multi-pages, and I would like to use one of these more generally compatible formats in my repository. Great thanks they exist!!!)
This PR adds the ability to create code links to hierarchical document symbols. The main contribution of this PR is the addition of a new command:
Some notes:
291
167
.
which may cause issues in languages where.
is a symbol. I can't think of any mainstream languages that do this, so for now it should be fine. A long-term solution is to enable escaping, but that adds unnecessary complexity.