GithubHelp home page GithubHelp logo

Comments (15)

darsain avatar darsain commented on May 24, 2024 2

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.

cloud-walker avatar cloud-walker commented on May 24, 2024 1

Stylus still not supported?

from sublime-jsdocs.

spadgos avatar spadgos commented on May 24, 2024

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.

timkelty avatar timkelty commented on May 24, 2024

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.

spadgos avatar spadgos commented on May 24, 2024

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.

timkelty avatar timkelty commented on May 24, 2024

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.

spadgos avatar spadgos commented on May 24, 2024

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.

darsain avatar darsain commented on May 24, 2024

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.

Aratramba avatar Aratramba commented on May 24, 2024

+1 @darsain, couldn't agree more.

from sublime-jsdocs.

benfrain avatar benfrain commented on May 24, 2024

👍 Yes, this would be great. Love DocBlockr and I'd love to get the default behaviour in style sheets too.

from sublime-jsdocs.

spadgos avatar spadgos commented on May 24, 2024

This basic behaviour works already.

from sublime-jsdocs.

benfrain avatar benfrain commented on May 24, 2024

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.

benfrain avatar benfrain commented on May 24, 2024

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.

spadgos avatar spadgos commented on May 24, 2024

Pull requests still welcome :)

from sublime-jsdocs.

jlmakes avatar jlmakes commented on May 24, 2024

@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)

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.