Comments (15)
These 3 functions enabled globally in any context is all we need:
I don't see any possible issues, but if there are, a simple option would solve this:
docblock: true, // runs everywhere
docblock: ['css', 'scss', 'styl'], // runs in specific contexts
This has to be trivial to implement. You already have all the stuff working, just a little restructuring to enable it for different contexts.
Since this got renamed from jsDoc to a general DocBlockr, it should run wherever a DocBlock is needed, honestly.
I would submit a PR, but I don't do Python, and I really don't want to spend a considerable amount of time learning it just so I can copy & paste with confidence.
from sublime-jsdocs.
Stylus still not supported?
from sublime-jsdocs.
As I read it (after only a brief glance), there's nothing which could be inferred from the source, and the best that a plugin could do would be provide custom autocomplete. Is this what you are talking about?
from sublime-jsdocs.
Possibly...
This same issue has come up with a few things for me switching from TextMate.
Basically, TextMate has a 'source' bundle (scoped to source), so you can have commands/snippets like 'insert comment block' and anything scoped to source will get them (source.php, source.js, source.css, etc.).
I've had the same issue trying to replicate textmate's ⇧ + ⌘ + ↩ to add a semicolon at the end of the current line and go to the next. Textmate does this in the 'Source' bundle, and the acutal line terminator is defined in the languages.
I'm not sure why ST2 doesn't have this source bundle, or if there is just a different approach to this kind of thing.
Any of that make sense?
from sublime-jsdocs.
AFAIK, Sublime has full support for textmate bundles. You should be able to just drop it into your Packages directory and it'll "just work"
from sublime-jsdocs.
I'll check it out. I think the issue is the commands are all in Ruby, and I think they need to be in Python for ST2...?
Thanks for the help though.
from sublime-jsdocs.
Closing this now, because (like mentioned earlier), there's very little documentation which could be inferred from the source (as compared to in Javascript or PHP), plus, I don't feel as though CSSDoc has a large enough user-base to make this feature useful.
from sublime-jsdocs.
I'm really missing basic DocBlock functionality in a lot of languages. Specifically CSS related (stylus, sass, ...)
I'd really appreciate if I could set an array of contexts in which DocBlock should run in its basic form. Which is...
When I press tab here:
/**|
Create a DocBlock:
/**
* |
*/
And when I press enter in the DocBlock above, add a new line with [space]*[space][indentation]
before the cursor:
/**
*
* |
*/
I don't want to install another package that does the exact same thing just in other contexts, and with possible small differences that would drive me insane.
Please? :)
from sublime-jsdocs.
+1 @darsain, couldn't agree more.
from sublime-jsdocs.
👍 Yes, this would be great. Love DocBlockr and I'd love to get the default behaviour in style sheets too.
from sublime-jsdocs.
This basic behaviour works already.
from sublime-jsdocs.
Just to add, since @spadgos comment I tried disabling Emmet and as soon as you do that, DocBlockr works as you wish in CSS/Sass
from sublime-jsdocs.
One further update. If using Emmet alongside DocBlockr if you type /**
and then Enter in CSS/Sass then you get a working comment block ;)
from sublime-jsdocs.
Pull requests still welcome :)
from sublime-jsdocs.
@darsain I have no Python skills either—but looking through the python, I don’t even see where the CSS and SCSS support comes from, let alone how to add Stylus support.
from sublime-jsdocs.
Related Issues (20)
- Override package
- SASS Variable not working
- Incorrect param tags due to trailing commas
- Perl Support
- User settings seemed to not work in Sublime(3154) HOT 3
- Support ES6 constructor syntax
- php7,unsupported variable type array with default value HOT 1
- Variable names are not recognized in Typescript
- SassDoc
- Undocumented config options
- @return added with no return statement in function
- Feture Request: Add auto comment on tag end in HTML
- Bulk DocBlock Generation for a file or folder
- PHP7.4 bool getting confused by boolean HOT 1
- PHP7.4 Return type not being detected HOT 1
- DockBlock can't support go language
- Feature: param name position setting
- Default value for jsdocs_decorate
- How to format {{datetime}} as 'YYYY-MM-DD HH: mm: ss'?
- why sublime 4.x function's doc has not contain @return
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 sublime-jsdocs.