question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

discussion about comments api for plugin

See original GitHub issue

I 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 from comments.js)?

/cc @vjeux

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
suchipicommented, Sep 15, 2018

This sounds like it would help with some of the stuff I’ve seen in the lua plugin, I’m all for it

2reactions
mattiaerrecommented, Mar 21, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found