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

add support for Markdown in comments #199

Merged

Conversation

i582
Copy link
Contributor

@i582 i582 commented Oct 17, 2024

Hey! This PR adds support for Markdown in doc comments.

Currently it looks like this:

Before

With this changes:

After
Screen.Recording.2024-10-18.at.01.37.20.mov

Please note that this code is taken from my internal language plugin and is well tested.

@mkurnikov
Copy link
Collaborator

mkurnikov commented Oct 17, 2024

I didn't know there's an easy way to support Markdown in comments, awesome!

Still, well tested or not, I won't let PR in without tests. Please add one or two.

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Sure!

@mkurnikov
Copy link
Collaborator

Btw, if you want to contribute more, documentation comments support needs some attention. It's broken/unsupported for some language items, and uses old API.
It needs lots of tests, support for the new language items and porting to the DocumentationTarget API.

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Yep, I have already noticed some problems with the documentation

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Added several tests for the most commonly used markup constructs

@mkurnikov
Copy link
Collaborator

Does the plugin needs to be dependent on the Markdown plugin now?

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

@mkurnikov looks like you need to approve every workflow 😞

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Does the plugin needs to be dependent on the Markdown plugin now?

it works without it but let me check it for sure

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

This functionality relies on the Markdown plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.
From https://www.jetbrains.com/help/idea/markdown.html

since it's bundled it should work fine I think

@mkurnikov
Copy link
Collaborator

looks like you need to approve every workflow

I'll see what I can do. For now, I guess I'd just do it manually.

bundled

Got it, no problem then.

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Works fine even in IDEA Community

@mkurnikov
Copy link
Collaborator

Great work, thanks!

One last bit:
i'm really not a fan of merging the code I don't quite understand, so could you add some docstrings? Link to the SDK documentation on it, or reference to the docstrings in the other parts of the SDK would work too.

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

Great work, thanks!

One last bit: i'm really not a fan of merging the code I don't quite understand, so could you add some docstrings? Link to the SDK documentation on it, or reference to the docstrings in the other parts of the SDK would work too.

Yep

@i582
Copy link
Contributor Author

i582 commented Oct 17, 2024

@mkurnikov added some documentation, hopefully this code makes a little more sense now

@i582 i582 mentioned this pull request Oct 18, 2024
3 tasks
@i582 i582 force-pushed the pmakhnev/markdown-support-in-docs branch from 3d5b365 to 3a16b36 Compare October 20, 2024 17:52
@mkurnikov mkurnikov merged commit 7b807eb into pontem-network:master Oct 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants