简体   繁体   中英

How do I set up JavaScript in Sublime 3?

I am new to JavaScript and wanted to set up my work environment. My problems might be basic or I look totally in the wrong direction so please advise me.

I am used to work with Sublime 3 and wanted to use it for writing JS code as well.

I spend half of a day on reserach for various autocomplete/support plugins for JavaScript but none of them seems to be working properly. Topics on subject are either outdated or misleading.

For example, none of them recognizes basic objects like: document. or window.onload etc. (there is no autocompletion although it would be highlighted properly).

I tried:

So in the end my question is: How do I set up Sublime and JavaScript or how can I get basic autocompletion in for JavaScript in Sublime 3?

Some suggestions

  • You can use JSHint
  • You can use Ternjs
  • You can use Emmet
  • You can use SublimeCodeIntel
  • You can use Zen Coding
  • Generate.sublime-completion file manually
  • Adding Snippets Custom / PackageControl / GitHub

Have you tried LSP? It works for both ST3 and ST4. https://github.com/sublimelsp/LSP-typescript

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM