Skip to content
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

[Feature]: Make clickable paths to .uml files (for the uml directive) #817

Open
annetre opened this issue May 13, 2024 · 2 comments
Open
Labels
api Issues that relate to APIs enhancement New feature or request lsp Issues that relate to the language server
Milestone

Comments

@annetre
Copy link

annetre commented May 13, 2024

What would you like to see

Hi,

The extension works fine and makes clickable paths and open files with their paths for common directives (figure, image,literalinclude and so on) with Ctrl + Click.

image

Please, introduce the same behavior for the uml directive.

image

@annetre annetre added enhancement New feature or request triage Issues needing triage labels May 13, 2024
@alcarney alcarney added lsp Issues that relate to the language server api Issues that relate to APIs and removed triage Issues needing triage labels May 14, 2024
@alcarney alcarney added this to the 1.0 milestone May 14, 2024
@alcarney
Copy link
Member

I assume that the .. uml:: directive is from the sphinxcontrib-plantuml extension?

I definitely want to make sure that it is possible to support this. However, I won't be adding support for this directly to esbonio itself.

Since roles and directives can do practically anything, esbonio needs to be "taught" how each role/directive behaves and what features it should try and provide. So while it makes sense for esbonio support whatever Sphinx provides, it would be impractical to try and add built-in support for the wider ecosystem.

For this reason I've always intended for esbonio to be extensible and my hope is with the upcoming 1.0 release this will finally become a reality. To cut a long story short, my aim is in the worst case scenario you would have to add a few lines to your conf.py to "teach" esbonio about the .. uml:: directive

def setup(app):
    """This is just a sketch, I'm sure the details will change!"""
    if hasattr(app, 'esbonio'):
        app.esbonio.register_directive("uml", argument_provider='filepath')

Best case, the 1.0 release is a huge success and extensions themselves start including the necessary integrations with esbonio and everything Just WorksTM out of the box! 😅

Anyway, I'm going to need an API like this myself in order to re-implement features like this for the 1.0 release so you can be reasonably confident that a solution you can try will be available in a reasonable time frame :)

@annetre
Copy link
Author

annetre commented May 15, 2024

Hi @alcarney ,

Yes, you are correct; this directive pertains to the sphinxcontrib-plantuml extension.

Thank you for your engagement and interest in this feature. I hope this feature will be implemented in the future.

Wishing you great success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues that relate to APIs enhancement New feature or request lsp Issues that relate to the language server
Projects
Status: Todo
Development

No branches or pull requests

2 participants