GithubHelp home page GithubHelp logo

Comments (8)

deg0nz avatar deg0nz commented on June 8, 2024 1

OK, I just found a workaround for this (sometimes googling helps ;) ).
I installed the Auto Comment Blocks extension and reinstalled your extension, now everything works as expected.

I don't know, if your extension should handle this... It's your decision.
It works for me now though...

from doxdocgen.

cschlosser avatar cschlosser commented on June 8, 2024

Hey!

I'm not quite sure what the problem is.

Could you add a bit more detail (maybe even a gif?) when the generated line starts without an asterisk?

from doxdocgen.

deg0nz avatar deg0nz commented on June 8, 2024

Hmm... gif would be tricky for some reasons.... sorry
I try to explain it otherwise:

Some IDEs (like Eclipse afaik) automatically create a new line matching the current comment style when creating a new line in the comment. For example by adding an asterisk at the beginning of a new line when using multi-line comments.

Currently, when I press return in a comment to create a new line, it just creates a new line. When I want the new line to look like all the other ones, I have to add an asterisk to the new line manually.

Another example:

This is the original comment:

/**
 * @brief
 * 
 * Blah Blah, Blubb
 */

When I just add some new lines after "Blah, Blah, Blubb" to this comment, It looks like this:

/**
 * @brief
 * 
 * Blah Blah, Blubb




 */

But it would be nice, if it looks like this:

/**
 * @brief
 * 
 * Blah Blah, Blubb
 *
 *
 *
 *
 */

I hope, this makes it more clear

from doxdocgen.

cschlosser avatar cschlosser commented on June 8, 2024

I'm not quite sure that this is a problem with this extension but more with how VS Code deals with comments.

Just to be clear:

/**
 * @brief
 * 
 * Blah Blah, Blubb<cursor position>
 */

Case 1: Now you press enter when the cursor is at the last character of Blubb

This is what happens for me then:

/**
 * @brief 
 * 
 * Blah Blah, Blubb
 * <cursor position>
 */

Case 2: If I copy a block of newlines and insert it (using crtl-c + ctrl-v) I get this result:

/**
 * @brief 
 * 
 * Blah Blah, Blubb
 * 

<cursor position>
 */

Is case 1 or 2 what you're doing?

from doxdocgen.

deg0nz avatar deg0nz commented on June 8, 2024

Yeah, I was in doubt too, if this is a problem with the editor itself... Not with the extension.

I'm doing case 1 and no asterisk is added to the new line. Do you mean this could be a configuration in the editor?

from doxdocgen.

cschlosser avatar cschlosser commented on June 8, 2024

Actually there's another way to do this (at least it worked for me on a clean VS Code install):

You need the C/C++ extension from Microsoft ms-vscode.cpptools.
If the extension is installed VS Code will add the asterisk.

from doxdocgen.

cschlosser avatar cschlosser commented on June 8, 2024

Maybe I'll add this to the docs somewhere.

from doxdocgen.

amordo avatar amordo commented on June 8, 2024

@

Actually there's another way to do this (at least it worked for me on a clean VS Code install):

You need the C/C++ extension from Microsoft ms-vscode.cpptools. If the extension is installed VS Code will add the asterisk.

Users could use another code-helper engine (eg. clangd) and often such extensions don't get along together.
It would be nice to exclude this dependency.

from doxdocgen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.