sublime-jsdocs icon indicating copy to clipboard operation
sublime-jsdocs copied to clipboard

add ability to extend parser settings

Open kerbyfc opened this issue 10 years ago • 0 comments

Hi, i know nothing about sublime text plugin architecture, but i'll be happy to have an ability to use codo with this plugin. There are minimal (but may be not valid) changes to make it possible.

My use case for codo:
  #<enter>
  render: ->
    <div>LDAP VIEW</div>

  # becomes

  #
  # [render description]
  # @return {[type]} [description]
  #
  render: ->
    <div>LDAP VIEW</div> 
Keymap:
    // open a docblock with enter
    {
        "keys": [
            "enter"
        ], 
        "command": "jsdocs",
        "args": {
            "prefix": "#",
            "options": {
                "commentCloser": "#"
            }
        },
        "context": [
            { 
                "key": "setting.auto_indent",
                "operator": "equal",
                "operand": true,
                "match_all": true 
            },
            { 
                "key": "selection_empty",
                "operator": "equal",          
                "operand": true,                         
                "match_all": true 
            },
            { 
                "key": "auto_complete_visible", 
                "operator": "equal",          
                "operand": false,                        
                "match_all": true 
            },
            { 
                "key": "selector", 
                "operator": "equal", 
                "operand": "source.coffee" 
            },
            { 
                "key": "preceding_text",        
                "operator": "regex_contains", 
                "operand": "^\\s*(#)\\s*$", 
                "match_all": true 
            }
        ]
    }

Thanks, anyway.

kerbyfc avatar Jan 01 '15 13:01 kerbyfc