Closed m-thorsen closed 3 years ago
The following adjustment seems to fix this problem....
src/doc.js from line 127:
// templateString = "/**\n" + templateString + "\n */"; <-- remove this line
let stop = 0;
templateString = templateString.replace(/###/gm, function () {
stop++;
return stop + "";
});
templateString = templateString.replace(/^$/gm, " *");
templateString = templateString.replace(/^(?!(\s\*|\/\*))/gm, " * $1");
templateString = "\n" + templateString + "\n */"; // <-- insert modified line here
Hi @m-thorsen thanks for reporting. I'm not seeing the same issue as you. Can you paste in your config or is this from the default set up? (I may disappear for a while as my wife could go in to labour any time now)
It was indeed related to a setting - the culprit seems to be "editor.autoClosingBrackets": "never",
.
Something must have changed in VSCode regarding this as I didn't have this issue before the latest version.
Setting this to "languageDefined"
seems to work for now.
Worth it adding a notice in the readme that this setting can cause issues?
I was also experiencing this issue, and when I changed:
"editor.autoClosingBrackets": "languageDefined"
it also worked.
Interesting, apologies for not looking at this sooner. I've not long just become a father so thing have been a bit busy at home but I hope to soon get back to clearing up some of these niggles. Thanks for working out what the issue is, hopefully we can support both settings with a bit of work going forward
Congratulations @neild3r! Guess I'll use the work around for now but rather not have auto closing anything as it gets in the way.
Would m-thorsen's initial adjustment be appropriate for integration given what we know now? https://github.com/neild3r/vscode-php-docblocker/issues/127#issuecomment-533543014
Fixed as of v2.6.1
When typing
/**<tab>
I've been getting this lately (with only this extension enabled):Note that a second set of delimiters is inserted, giving me
/**/**
and effectively closing the Docblock