-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support for updating existing JSDoc comments? #121
Comments
@zeitchef Thank you for comment. |
@heavenshell Thanks for your quick response. It seems much more intuitive to me that comments are updated automatically when the function signature changes. I would go so far as to say this should perhaps be default behavior, but I would be just as happy with a config option to override existing comments. |
Thank you for comment!
Yeah, I know update automatically is very useful, but it's hard to merge old and new. /**
* Edit this line by manually
*
* @param {number} arg1
* @param {string} edit this line manually
* @param {any} same2
*/
function foo(arg1: number, before1: string, same2: any) {
} /**
* foo. <-- Preserve or update?
*
* @param {number} arg1
* @param {string} after1 <-- Preserve this or update?
* @param {any} same2
*/
function foo(arg1: number, after1: string, same2: any) {
} I think I will provide override option. |
Yeah I think override sounds good as A trick (as a user) I found is that move existing comments not right above the function (say add a new line between comment and function) and run |
@ryuheechul Thanks for comment.
Yeah, you can do it by your self(by manual editing or writing Vim script), but I'll add override option. |
Hello! has this override feature been released? :-) |
Sorry for late response and not yet. |
FYI, Neogen is also having the same issue and the logic to tackle the issue seems to be tricky. Perhaps AI approach like this one, https://github.com/jameshiew/nvim-magic could be an alternative in the meantime. |
@ryuheechul Most easiest implementation is override previous comment completely. If user want to keep previous comment, maybe we should ask user to keep or override by each line(like interactive patching). So maybe I'll implement override previous comment completely for first release. |
@heavenshell Yeah I have the similar view as yours. |
@ryuheechul Mabye I will introduce |
@heavenshell that seems intuitive! |
Just found this plugin and enjoying using it. Something I'm testing is that existing JSDoc comments are not changed/updated when a function signature changes. Is this intentional? Or have I overseen something in the usage?
The text was updated successfully, but these errors were encountered: