discussion about comments api for plugin
See original GitHub issueI deleted the template because it is not suitable.
Problem:
We use printDanglingComments
and printComments
in plugin-php
. Perhaps in the future we will use printLeadingComment
and printTrailingComment
. Right now we copy/paste code from https://github.com/prettier/prettier/blob/master/src/main/comments.js in own comments.js
file (we remove logic for js
like this https://github.com/prettier/prettier/blob/master/src/main/comments.js#L401).
And this confuses us.
Some questions:
- Should plugins always implement own logic for comments?
- Maybe we can provide shared api for comments (if yes how we can move
js
related code fromcomments.js
)?
/cc @vjeux
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Comment API - MoodleDocs
Comment API provides following functionalities: Add comments; Manage comments; Delete comments. And provides a fancy ajax interface to add/ ...
Read more >Comments | REST API Handbook
The schema defines all the fields that exist within a comment record. Any response from these endpoints can be expected to contain the...
Read more >API > Comments - Ultimate WordPress Plugins by Supsystic
Publishes new comment. Parameters. activityId. Post ID. data. Object with parameters to publish. Available properties: message. Message ...
Read more >Feedback: Plugins API and Plugin Toolkit #3329 - GitHub
Hi @AmeyGohil, you can find a list of v3-ready plugins and tools in #3343. That discussion also includes some instructions on how to...
Read more >Comments - Social Plugins - Meta for Developers - Facebook
If both of these requirements are met, the user will be able to see and interact with plugins such as the 'Like' or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This sounds like it would help with some of the stuff I’ve seen in the lua plugin, I’m all for it
hello, I’m adding another point to this issue as I think what I see here is related to a problem we are having too. We are trying to build a prettier plugin for Solidity and we are finally in a good state (almost a decent beta version) and we’ve found that a lot of comments related functionality could be potentially reused. We’ve isolated what we need from prettier in a separate repository. And we think it’d be nice to have everything comments related required as a separate module. there are a lot of similarities between Solidity and JavaScript so it’d be a shame copy/paste everything from the prettier repo. What do you think we should be doing? I’d be happy to help in having a separate repo/package in the prettier org that does something very similar w/ what I’ve linked above. Thanks so much,
// cc @j-f1 @vjeux @ikatyang @suchipi @evilebottnawi
FYI: https://github.com/prettier-solidity/prettier-plugin-solidity/pull/71#issuecomment-437693298