Comments (14)
Hey,
sorry for my late response :/ Can you provide a simple example?
from brackets-funcdocr.
Yes, sure.
So, what happens in this case, is that I'm wrapping the long line by hitting 'Enter' and then trying to re-indent it by hitting 'Tab'.
Maybe there were some other cases, when it behaved similarly, but right now I can't remember.
FuncDocr 0.8.26, Brackets 1.3
In the screen capture I forgot curly brackets around {Error}
, but it doesn't change the behavior anyway.
from brackets-funcdocr.
Hmm thanks, yeah I think I will need some time to solve it. Thanks for the issue and stay tuned!
from brackets-funcdocr.
Hi @yuretz
this one is the new version which isn't good as well :/
The problem is that I have a maximum padding which aligns the descriptions but probably you would like to see something like this?
FYI the current implementation of @throws
is:
"throws": "@throws [[Description]]",
there is no name field for the name of the error.
from brackets-funcdocr.
Maybe you would like to test the newest version 0.8.27
(Install from url)
It's not perfect but unfortunately it is more complex than I thought of...
from brackets-funcdocr.
Hi Wikunia,
Thanks for your replies. I'll definitely try it tomorrow. Would I be able to install it directly from the repo url?
from brackets-funcdocr.
Yes it is in the master branch
from brackets-funcdocr.
Hi again,
Thanks for the new version. It's really nice to see that small (but very useful) things like FuncDocr get their deal of support and attention!
I have tested the new version a little bit. It seems like it solves part of the issue, but not all of it. And you are probably right, this looks like a more complex general problem with manual editing of auto-generated comments.
When I add @throws
, or any other jsdoc tag after existing auto-generated tags, what I do is
- I place the cursor at the end of the line, after which I would like to add my new tag and hit 'enter' to add an empty line. If, for example, previous line was
@param {type} name description
, the cursor gets aligned with the description start on the previous line. And that's fine and totally make sense at this point. - I start typing
@throws
, auto-completion menu appears amd I choose@throws [[Description]]
template. It is inserted, but it stays aligned with the previous line description and that of course doesn't make sense anymore. - I manually delete indentation before
@throws
to make it aligned properly with other tags and then hit 'Tab' to navigate to the missing [[Description]] placeholder, and the line gets wrongly re-aligned again.
Regarding the solution, it's hard to tell which one is the best. There is no doubt that all @<tag_name>
parts should be aligned in the start. From there, as I see it, you have two options:
- Align the rest of the fields in columns by fields' relative position. Like, 1st field is always in the first column after the tag, 2nd is in the 2nd and so on. This one is probably the easiest option.
- Align the rest of the fields in columns, taking into account the field purpose. Like, all names get their own separate column, all type names get their separate column, all textual descriptions too, and so on. This will probably look better, but might be more difficult to implement, and eats more screen space for indentation.
As for me, I could definitely live with any of those options implemented, as long as manual re-indentation is not necessary (or minimal) to make the jsdoc comment block look reasonable.
BTW, would it be possible to support both @throws
template with and without exception type included?
from brackets-funcdocr.
Again version v0.8.27 ;) Would be great if you would install it from url!
Changes:
- The tags will be sorted now so
@throws
and@this
will be shown at the top and not@author
, when typing@th
:D - the wrong alignment on tabbing should be fixed now
- the cursor is aligned under
[[Description]]
and you include a@
tag it will be on the most left side
Thanks for your support.
With the current implementation two hints for @throws
aren't possible because I might want to use the number of [[...]]
for a specified tag for alignment which isn't easily possible with two different implementations for @throws
.
But I think @throws
should have always an exception type, right? Then it's better documented I think ;)
from brackets-funcdocr.
Hi,
Thanks for the updated version. I'm testing it right now, and it looks good so far.
I agree that having documentation with explicit exception types is much better than without them. I personally always use it with the type.
from brackets-funcdocr.
Okay and then it will look like @throws {[[ExType]]} [[Description]]
and ExType
can be filled if the syntax throw new UserException("...");
is used right?
from brackets-funcdocr.
Exactly!
from brackets-funcdocr.
Hi @yuretz ,
It's 2017 now and wow just read our small conversation again. Looks like I can close this issue, right?
Otherwise just reopen it! ;)
from brackets-funcdocr.
Sure, thank you!
from brackets-funcdocr.
Related Issues (20)
- Running FuncDocr shouldn't instantly save the document
- Support exported functions HOT 4
- Add @author with array of authors, please HOT 10
- Lowercase types in JS HOT 1
- Greedy backspace behavior HOT 6
- How do I install this? HOT 1
- Use consistent indentation
- Support ES6 Default Parameters HOT 1
- /* triggers a JSDoc comment block instead of /** HOT 4
- Default value setting has to be the first line HOT 1
- Default value setting has to be single line HOT 1
- @private tag HOT 7
- @since tag HOT 1
- Support generator function auto-completition HOT 2
- Named function expression with the key being a string is not recognized HOT 7
- Autocomplete for javascript @constructor
- Spurious logs HOT 4
- Install fails on brackets-electron HOT 1
- Not working in Brackets 1.9 HOT 3
- Add support for Typescript files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-funcdocr.