I'm new to Atom and JavaScript, Atom seems to be pretty good for web developing.
But to my best knowledge, it seems that there is no Atom package for enabling JavaScript autocomplete.
Does anyone know a package doing this or does Atom have a plan to support JavaScript autocomplete?
Since JavaScript is loosely coupled, providing a working autocomplete solution is not as easy as for statically typed languages like Java. Your best bets with Atom are the following packages:
autocomplete-plus - this is now bundled with Atom as the default autocomplete provider
ternjs - this looks pretty good, but requires some configuration.
I suggest you give these a try.
I think you should go for atom-ternjs
This is java script intelligence for atom
You need to change(Enable) setting for atom-ternjs
Use autocomplete-snippets
Display both autocomplete-snippets and function name
and many more depends on your requirements ...
If you are using modern JavaScript or TypeScript or Node then atom-typescript is good. It uses tsserver (like vscode) which gives autocomplete, go to definition, syntax checking and other ide goodies. By default it's not enabled for JavaScript. Follow the docs to enable for .js files - https://github.com/TypeStrong/atom-typescript/blob/master/docs/faq.md#i-want-to-use-atom-typescript-with-javascript-too. Configuration for tsserver is done by .jsconfig file - https://code.visualstudio.com/docs/languages/jsconfig.
install "autocomplete-plus"
install "atom-ternjs"
create or open any js file in your project
click on Packages -> Atom Ternjs -> Configure Project
below libs enable the item "browser"
scroll down and click on “Save and Restart Server”
Recommended Atom Packages
atom-ternjs:
Adds code intelligence to Atom.
https://atom.io/packages/atom-ternjs
autoclose-html-plus:
Will help you automatically close HTML tags.
https://atom.io/packages/autoclose-html-plus
emmet:
Adds code expansion to Atom.
https://atom.io/packages/emmet
csslint:
Adds CSS error checking abilities to Atom.
https://atom.io/packages/csslint
pigments:
Adds the ability to display colour in Atom code files.
https://atom.io/packages/pigments
language-ejs:
Adds EJS language support to Atom.
https://atom.io/packages/language-ejs
atom-beautify:
Helps to automatically format your code in Atom.
Related
I have some legacy java & fx code that built perfectly in older versions of Java and Netbeans (using ANT).
I recently revisited this to upgrade the ide and jdk/jre for java and fx. Of course, it fails to build because Nashorn was pulled out. Ok - I got that.
I have to admit, I am freaking stumped at how I can just get graalvm set to take over in nashorn compatibility mode to process the build javascript.
Some will say dump ant and go with maven, etc., but for right now, I just want to build this without restructuring anything.
So, is there anyone out there who knows exactly where in Netbeans (12.5) I have to make changes and which changes I have to make so that javascript will work again like it did under Nashorn and ANT?
I've read all the docs and frankly, my head is spinning. Graalvm does many more things than I need right now.
Can anyone help?
Thanks!
While Nashorn was removed from JDK 15, it lives on as a standalone OpenJDK project (similar to e.g. JavaFX).
You could drop-in standalone Nashorn JAR file as a dependency to your Ant build and carry on. That'd be the minimal change you'd need.
Putting it in your Ant lib directory should work. By default that's $ANT_HOME/lib but some Ant installations use a different location, e.g. homebrew-installed Ant will use /usr/local/share/ant. If you don't want to put it in the lib, you can also put it with your project and use <classpath> or <classpathref> within the <script> tag to point to it.
You can downloaded the JAR from Maven Central; be sure to check the POM file for the the dependencies you'll also have to get (few ASM JARs.) If you're using some dependency manager (Gradle, Maven, what have you) then it will pull them automatically.
I am trying to build + make changes to AlphaTab, a tablature reader that can be displayed on the web using SVG. It is a Visual Studio solution, but I cannot figure out how to build it successfully (I also have little experience with VS). I am using Visual Studio 2017 Enterprise, which I have access to as a student.
There are multiple projects within the solution, but the build I want is the JavaScript file. I know that it first compiles to Haxe and then to JavaScript, first using Phase, a C# -> Haxe compiler, which was also written by the AlphaTab creator.
Unfortunately this is all the info I have.. there aren't build instructions on the repo and I tried to reach out on his Contact page. I really like the look + simplicity of using AlphaTab and want to add some changes, but also if there are other open source tab editors (display on browser) that look as nice, please link if possible!
There is an unmaintained haxe version of alphatab on the haxe branch of the main repo, did you try experimenting with that?
https://github.com/CoderLine/alphaTab/tree/Haxe
open the .hxproj file in HaxeDevelop
https://haxedevelop.org/
Or in Visual Studio Code
https://github.com/vshaxe/vshaxe
To see if it has enough features try the html in the bin folder.
For the project I use EJS (http://ejs.co/) as express templating engine. It is good and easy to use, but editing files is a bit of a problem - text highlight is worse than average and I could not find any tools to auto format files.
My main IDE is VS Code and I have tried Atom.
For VS code I used QassimFarid.ejs-language-support, which has way more installs than all others and I found it lacking. Tried DigitalBrainstem.javascript-ejs-support, but it is getting confused with my code pretty soon too.
For Atom I go with language-ejs (atom.io/packages/language-ejs) which is very good.
Sadly, both VS Code and Atom do not have any autoformat capabilities (read packages), and pure JS formatters are confused with ejs markup.
What do you use to format your ejs templates?
P.S.
I do not mind trying some other IDEs/editors or even some standalone formatters.
Your question is quite subjective, so I can't really offer a definitive answer. But I get the feeling you're just using the base text editor rather than installing packages.
Both VS Code and Atom come with package systems. In VS Code you can click on the "Extensions" icon on the left hand panel (under the debug item). This will let you search for extensions that offer things such as auto-complete and syntax highlighting. Just by typing in "ejs" there are 4 different syntax highlighting and evaluators.
Atom also has a similar system to search for and install packages. From here you should be able to find one which suits your needs for EJS.
I am using Eclipse Oxygen.
I have web features already installed, I think some packages are missing for javascript files.
When I try to create a new javascript file, I see that there is no javascript file. How to add this feature into eclipse?
screenshot:
You just look in the wrong "folder" ("Web") to create a new JavaScript-file, the proper path is "JavaScript > JavaScript Source File".
You can also take advantage of the search in the Wizards when you type the desired search term at type filter text.
You must be using a perspective, which is not suitable for web development.
Try opening a perspective which suits your development domain. Web and Java EE perspectives for example supports JavaScript development. If such is not available in you Eclipse installation, you have to install additional tools. Which Eclipse package are you using?
In the right perspective you will have the JavaScript Source File option in the New pop-up dialog right clicking your project or an appropriate project folder (eg. WebContent).
I'm trying to configure a NetBeans build to call jslint and produce errors that I can click on to take me to the source.
Using the Maven build script from Maven plugins to analyze javascript code quality, jslint is running and producing errors but I can't click on them. The text in the NetBeans output window looks like this:
[jslint] C:\Documents and Settings\arx\My Documents\Progs\jsweb\src\main\wwwroot\jsweb.js:125:48: 'keydown' is not defined.
I'm running NetBeans 6.9.1 on Windows. The spaces in the path aren't an issue. I tried it with a spaceless path and it still didn't work.
Ultimately I want to edit a simple javascript+html project in NetBeans and have clickable errors from jslint. I'm not wedded to Maven. Any suggestions gratefully received.
Update: A solution
If I put jslint4java directly into an Ant project (rather than an Ant project wrapped in a Maven plugin) the output doesn't include the [jslint] prefix and I can click on the errors.
This is a bit of a chore because it seems to be necessary to explicitly list the locations of all the jar file dependencies, but it works.
Another Update
I'm having another go at making this work in Maven because its java dependency management is nice. The problem is definitely the [jslint] prefix in the output, which is produced by Ant.
There doesn't seems to be any way of making NetBeans ignore the prefix, which is odd because Ant is NetBeans's default build tool.
The prefix can be suppressed by setting the emacsmode property on Ant's DefaultLogger. NetBeans does this when it lauches Ant iself (if "build.compiler.emacs=true" is set in Options), but maven-antrun-plugin doesn't (and looking at the source, there's not currently any way of persuading it to).
Possible fixes are:
Make NetBeans better at decoding Ant output.
Add an emacsmode option to maven-antrun-plugin.
Find a native Maven jslint plugin (so Ant isn't used at all).
Option 3 looked like potentially the simplest so I used TortoiseSVN to download the source for http://mojo.codehaus.org/jslint-plugin/ from https://svn.codehaus.org/mojo/trunk/sandbox/jslint-plugin and got it working. But it produces NetBeans-unfriendly output like:
[ERROR]jssvg.js:2690:48:'keydown' is not defined.
The easiest way is to add this plug-in. Supports the Netbeans 7.3.