spadgos / sublime-jsdocs

Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++
MIT License
3.11k stars 276 forks source link

ST 3103: Function name and params are not automatically transferred #408

Open Tilogorn opened 8 years ago

Tilogorn commented 8 years ago

It doesn't matter if the context is a plain php file or a php class, neither if leading spaces are involved or not (see #406), if I invoke the command, the function name and params are not automatically transferred into the docblock, which leads to results like this:

Console:

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: tab
command: jsdocs

Code:

/**
 * @param  [type]
 * @param  [type]
 * @return [type]
 */
function hello($p1, $p2)
{
    echo 'test';
}

Tested on Mac OS X 10.10.5 with Sublime Text 3 (3103 stable).

Complete console output at startup:

startup, version: 3103 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/<username>/Library/Application Support/Sublime Text 3/Packages
state path: /Users/<username>/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/<username>/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.330003
using gpu buffer for window
first paint time: 0.402566
startup time: 0.42609
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.profile_syntax_definition
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Python.syntax_test_python
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-tabulate
reloading plugin 0_package_control_loader.02-bz2
reloading plugin 0_package_control_loader.50-backrefs
reloading plugin 0_package_control_loader.50-oauthlib
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin 0_package_control_loader.50-requests
reloading plugin 0_package_control_loader.51-requests-oauthlib
reloading plugin AutoWrap.autowrap
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin DocBlockr.jsdocs
reloading plugin HexViewer.hex_checksum
Hex Viewer: md2 hash is not available!
Hex Viewer: mdc2 hash is not available!
Hex Viewer: md4 hash is not available!
Hex Viewer: sha hash is not available!
Hex Viewer: ripemd160 hash is not available!
reloading plugin HexViewer.hex_common
reloading plugin HexViewer.hex_editor
reloading plugin HexViewer.hex_finder
reloading plugin HexViewer.hex_highlighter
reloading plugin HexViewer.hex_inspector
reloading plugin HexViewer.hex_notify
reloading plugin HexViewer.hex_viewer
reloading plugin HexViewer.hex_writer
reloading plugin HexViewer.sum_hashes
reloading plugin HexViewer.tiger
reloading plugin HexViewer.whirlpool
reloading plugin Javascript Beautify.jsbeautify
reloading plugin JsFormat.js_formatter
reloading plugin JSON Reindent.sublime_json_reindent
reloading plugin LaTeXing.LaTeXing
reloading plugin Open Folder.OpenFolder
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin Pretty JSON.PrettyJson
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SublimeLinter-csslint.linter
SublimeLinter: csslint linter loaded 
reloading plugin SublimeLinter-jshint.linter
SublimeLinter: jshint linter loaded 
reloading plugin SublimeLinter-json.linter
SublimeLinter: json linter loaded 
reloading plugin SublimeLinter-php.linter
SublimeLinter: php linter loaded 
reloading plugin TrailingSpaces.trailing_spaces
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin LaTeXTools.change_environment
reloading plugin LaTeXTools.delete_temp_files
reloading plugin LaTeXTools.getRegion
reloading plugin LaTeXTools.getTeXRoot
reloading plugin LaTeXTools.jumpto_tex_file
reloading plugin LaTeXTools.jumpToPDF
reloading plugin LaTeXTools.kpsewhich
reloading plugin LaTeXTools.latex_cite_completions
reloading plugin LaTeXTools.latex_cwl_completions
reloading plugin LaTeXTools.latex_env_completions
reloading plugin LaTeXTools.latex_input_completions
reloading plugin LaTeXTools.latex_installed_packages
reloading plugin LaTeXTools.latex_ref_cite_completions
reloading plugin LaTeXTools.latex_ref_completions
reloading plugin LaTeXTools.latexCommand
reloading plugin LaTeXTools.latexDocumentationViewer
reloading plugin LaTeXTools.latexEnvCloser
reloading plugin LaTeXTools.latexEnvironment
reloading plugin LaTeXTools.latexFillAll
reloading plugin LaTeXTools.latextools_default_settings
reloading plugin LaTeXTools.makePDF
reloading plugin LaTeXTools.migrate
reloading plugin LaTeXTools.parseTeXlog
reloading plugin LaTeXTools.texMacro
reloading plugin LaTeXTools.texSections
reloading plugin LaTeXTools.texSyntaxListener
reloading plugin LaTeXTools.toggle_auto
reloading plugin LaTeXTools.toggle_focus
reloading plugin LaTeXTools.toggle_fwdsync
reloading plugin LaTeXTools.toggle_show
reloading plugin LaTeXTools.viewPDF
reloading plugin PHP_CodeSniffer.PHP_CodeSniffer
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
plugins loaded
SublimeLinter: debug mode: off 
Package Control: Skipping automatic upgrade, last run at 2016-02-16 12:45:32, next run at 2016-02-16 13:45:32 or after
imbrish commented 8 years ago

Same problem here using Windows 8.1 and Sublime Text 3 (3103).

Some magic that made it work for me:

  1. Disabled Emmet package
  2. Restarted Subilme → DocBlockr works like charm
  3. Reenabled Emmet → It still works :smile:

Dry guess - DocBlockr works if it is registered before Emmet - some hack precedence issue? I have no idea what I'm talking about though, as I switched to Sublime just today :)

hansanghoon commented 8 years ago

Experienced same problem here... sublime version: 3103 osx x64 channel: stable, Mac OS X 10.11.4 and i found another magic...

  1. open user setting file for DocBlockr(Preferences -> Package Settings -> DocBlockr -> Setting - User)
  2. type empty object literal({})
  3. save and restart

I don't get it... but it worked for me.

AlexEscalante commented 8 years ago

@hansanghoon worked for me too! Seems like someone forgot to put an exception handler on the config loader…

FabioGou commented 8 years ago

Worked great for me. ST2 on Windows 7 and ST3 on Win 8. Thanks !

Tilogorn commented 8 years ago

Seems fixed to me, even when the user setting file for DocBlockr is empty, the behavior works now as expected.

pirDOL commented 8 years ago

@hansanghoon worked for me. ST3114 on Win7. Thx

seekwe commented 8 years ago

worked for me. ST3114 on Win8. Thx