pichillilorenzo / JavaScriptEnhancements

JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
MIT License
637 stars 41 forks source link

Not checking non-flow files #7

Closed scarlac closed 6 years ago

scarlac commented 6 years ago

Plugin actively avoids auto-completing projects that are not using flow on the file being edited. Attempting to set flow_checker_enabled or use_flow_checker_on_current_view in projet settings has no effect.

The plugin could really work for so much more code if I could say "Use Flow checking on all of these dirs" in my project settings or simply "Use Flow checking on all open files".

pichillilorenzo commented 6 years ago

@scarlac Do you mean auto-completions or errors?? Because flow_checker_enabled is used for checking errors, instead auto-completions works on every javascript file, but errors are shown only for file with // @flow comment. In case could you paste here console logs from Sublime Text? Thanks

scarlac commented 6 years ago

Both.

const myStr = 'hello';
myStr.|

The pipe indicates where the cursor is. Pressing CTRL+Space flashes the auto-complete menu for .1s with 3 items: hello, myStr, const but it does not show toString as a suggestion, etc.

https://www.dropbox.com/s/1rjl2kt74xihuwb/javascript-enhancements-completion.mov?dl=0

pichillilorenzo commented 6 years ago

@scarlac Ok, then paste here the console logs from Sublime Text (go to View > Show Console and copy the logs). Maybe there are some errors!

scarlac commented 6 years ago
startup, version: 3156 osx x64 channel: dev
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/***/Library/Application Support/Sublime Text 3/Packages
state path: /Users/***/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/***/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["All Autocomplete", "JavaScript", "Kite", "laravel-blade", "Python", "PyV8", "SaltStack-related syntax highlighting and snippets", "sublime-haproxy", "SublimeCodeIntel", "SublimeLinter-flow", "TypeScript", "Vintage"]
pre session restore time: 0.382072
using gpu buffer for window
startup time: 0.497685
scan: /Users/***/jobs/***/src/***/3rd has been seen before, skipping (using inode) previous path: /Users/***/jobs/***/3rd inode: 4297184619
scan: /Users/***/jobs/***/src/***/components/*** has been seen before, skipping (using inode) previous path: /Users/***/jobs/***/3rd/*** inode: 4297184620
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
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.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
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.quick_panel
reloading plugin Default.rename
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.settings
reloading plugin Default.show_scope_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 Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.50-markupsafe
reloading plugin 0_package_control_loader.50-pymdownx
reloading plugin 0_package_control_loader.50-python-markdown
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin 0_package_control_loader.51-python-jinja2
reloading plugin 0_package_control_loader.55-mdpopups
reloading plugin Color Highlighter.color_converter
reloading plugin Color Highlighter.color_highlighter
reloading plugin Color Highlighter.color_hover_listener
reloading plugin Color Highlighter.color_scheme
reloading plugin Color Highlighter.color_scheme_color_highlighter
reloading plugin Color Highlighter.color_searcher
reloading plugin Color Highlighter.color_selection_listener
reloading plugin Color Highlighter.colors
reloading plugin Color Highlighter.content_listener
reloading plugin Color Highlighter.convert_color_command
reloading plugin Color Highlighter.css_colors
reloading plugin Color Highlighter.dummy_event_listener
reloading plugin Color Highlighter.gutter_icons_color_highlighter
reloading plugin Color Highlighter.load_resource
reloading plugin Color Highlighter.main
reloading plugin Color Highlighter.path
reloading plugin Color Highlighter.phantoms_color_highlighter
reloading plugin Color Highlighter.pick_color_command
reloading plugin Color Highlighter.regex_compiler
reloading plugin Color Highlighter.regions
reloading plugin Color Highlighter.set_setting_command
reloading plugin Color Highlighter.settings
reloading plugin Color Highlighter.st_helper
reloading plugin Color Highlighter.topsort
reloading plugin EditorConfig.EditorConfig
reloading plugin ESLint-Formatter.ESLint-Formatter
reloading plugin GitGutter.plugin
reloading plugin JSON Reindent.sublime_json_reindent
reloading plugin LESS.less_completions
reloading plugin LoremIpsum.LoremIpsum
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_settings
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin TerminalView.exec
reloading plugin TerminalView.gateone_terminal_emulator
reloading plugin TerminalView.linux_pty
reloading plugin TerminalView.pyte_terminal_emulator
reloading plugin TerminalView.sublime_terminal_buffer
reloading plugin TerminalView.sublime_view_cache
reloading plugin TerminalView.TerminalView
reloading plugin TerminalView.utils
reloading plugin Text Pastry.text_pastry
reloading plugin Text Pastry.text_pastry_addons
reloading plugin Text Pastry.text_pastry_clipboard
reloading plugin Text Pastry.text_pastry_selection
reloading plugin URLEncode.urlencode
reloading plugin WordHighlight.word_highlight
reloading plugin Babel.Babel
reloading plugin CSScomb.CSScomb
reloading plugin emmet-sublime-master.emmet-plugin
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin JavaScript Enhancements._generated_2018_01_03_at_03_39_39
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
reloading plugin SublimeLinter-contrib-eslint.linter
SublimeLinter: eslint linter loaded 
plugins loaded
Traceback: error.

Output:

Error:
/bin/sh: convert: command not found

Highlighting colors with gutter icons is not supported with current ImageMagick setup. Try configuring the "icon_factory setting"
Emmet: No need to update PyV8
environment variables loaded using: /bin/bash -l
v9.2.1
5.6.0
Package Control: No updated packages
pichillilorenzo commented 6 years ago

@scarlac thank you! there are no errors, but I think I know where is the problem. I'm working on it!

pichillilorenzo commented 6 years ago

@scarlac I updated the plugin! Try to install the new release and let me know if now it works. If it doesn't work yet, please paste here again the console logs of Sublime Text.

If you have problems with recognition of node.js or npm binaries, see Wiki - Installation

scarlac commented 6 years ago

Ah. I got it working now. Problem is that it doesn't work with JavaScript (Babel) syntax! Once I change to JavaScript I get auto-completions just fine.

I do need babel support, because of JSX and ES6. How can I make this work?

screen shot 2018-01-03 at 14 16 11

pichillilorenzo commented 6 years ago

@scarlac Ok, I released a new version of the plugin! Now it should work with JavaScript (Babel) syntax 😃 . Let me know.

scarlac commented 6 years ago

Works! Great job and thank you for the quick response! 💯

pichillilorenzo commented 6 years ago

@scarlac Thank you for your support! 👍