I have installed the Sublime Text suggested packages, however nothing seems to work well for syntax highlighting, code linting and auto suggestion. Can someone suggest a complete package for Jade.
The Jade package on Package Control has 146,000 installs at the time of commenting. I'm pretty sure it works fine.
https://packagecontrol.io/packages/Jade
A highlighter using Python instead of JavaScript is also included for use with PyJade, you can either manually select Jade (Python) from the syntaxes list or give your file the extension .py.jade to select automatically (only on Sublime Text). Also included is a test.py.jade file that can be compiled with pyjade to test it.
You'll need to install Package Control first before installing any packages from there. It's really easy to do, just follow the instructions here. https://packagecontrol.io/installation (make sure you choose the correct version).
I've run into similar issues and would try a few things first:
First, if you happened to have your Jade file open when you did the install, you just need to close the file and re-open it to see package working.
If Step 1 isn't the issue, see if the package is enabled. Package Control > Enable Package > Jade. If you don't see it in the list of available options, that means it's already enabled. If it is in the list, then enable it.
If it is already enabled, first disable it with Package Control > Disable Package > Jade then re-enable it with Package Control > Enable Package > Jade.
Restart Sublime (probably not needed, but doesn't hurt).
This should get the package working for you.
Related
I already have Eclipse IDE for JAVA Developers, and have different projects created for Cucumber/JAVA. I want to create a project for Javascript now, but I am not getting the option in New Project, I tried installing Plugins too but it did not worked for me.
Can someone please help. I am new to Javascript.
Is it possible to do so without having to install another eclipse? I have my projects in the previous one which i don't want to loose. I tried installing previous version of eclipse for Eclipse Javascript but I am not able to do so and the only one i see is Eclipse IDE again.
Install https://marketplace.eclipse.org/content/eclipse-web-developer-tools-0 , and then work with your JavaScript files using the Generic Text Editor. No project wizard or type is required.
First go to help>marketplace and search for javascript plugin and install it.
After installation you can find an option here,
So I was starting researching about angular2 and since I saw so many references to typescript being prefered I am trying to switch to it from javascript. Problem is, I saw a nice little guide I could follow to install it all in eclipse (angular, javascript, everything needed to launch the 5 minute guide code on the main page of angular), so I did it and managed to get it to work.
Now I would like to do the same with typescript, but I find myself lost since it doesn't seem to be working, I can't launch code, it's like node.js isn't working anymore, but since I do not know what the expected result is, I am not sure what is missing.
For example, I re did the 5 minute guide and notice as a difference that I do not have the installation of the modules, nor any run-as configuration ready, in fact, I can't manage to run as any typescript code I try to do.
What I did was:
1- Install Eclipse Mars, other guys uses older versions
2- Install Node.js
3- Install WildFly Server
4- Install TypeScript plugin https://marketplace.eclipse.org/content/typescript
5- Import my project in eclipse, you may have to create a new static web project and add your files in there. The 5 minute quick start is not an eclipse web project so you may not be able to import this. Do not forget to copy and past the same structure with the node modules that you have
6- Right click on the project > Configure > Enable Typescript Builder
7- Right Click the project > Properties > TypeScript > Compiler and configure as follows:
I hope this will do it for you.
Remember, this plugin does not respect json configuration file, so you have to do this manually as in the screenshot. Also, if you are going to provide arguments to your component constructor, You will have errors. Let me know if you got those. Another thing to mention is that using some annotations like #Input will not work, you will have to use inputs:[] inside your #Component annotation.
You can try to add those plugins on top of Mars:
https://github.com/angelozerr/angular2-eclipse
https://github.com/angelozerr/typescript.java
Those 2 are incubating but already provide good features. There is another one, that I didn't try but which has some popularity:
https://github.com/palantir/eclipse-typescript
Eclipse >= Neon
sudo npm install -g angular-cli (ng help must work)
See: https://github.com/angelozerr/angular2-eclipse
Install it and restart Eclipse
Open a .ts file
Eclipse Oxygen
Default javascript installation, then added the default free plugin for angular 2 / typescript from here:
angular2.ide - http://oss.opensagres.fr/angular2-eclipse/1.3.0/
After installing I opened an existing Angular 4 / TS project, worked fine. I then installed support for .scss from http://www.liclipse.com/text/updates. All setup and configured with Typescript 2.4.1 / nodejs v6.9.4.
But within days it now fails to open .ts files at all. Re-installation of the ng plugin did not fix it, I uninstalled liclipse plugin and no change either. It basically leaves eclipse unusable for ng4 projects as is.
The logs show the following errors.
org.eclipse.core.runtime.CoreException: Plug-in "ts.eclipse.ide.jsdt.ui" was unable to instantiate class "ts.eclipse.ide.jsdt.internal.ui.editor.TypeScriptEditor".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
...
Caused by: java.lang.NoClassDefFoundError: org/eclipse/wst/jsdt/ui/text/JavaScriptSourceViewerConfiguration
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
...
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.wst.jsdt.ui (441).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:112)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
...
Caused by: java.lang.ClassFormatError: Name index 1 in LocalVariableTable has bad constant type in class file org/eclipse/wst/jsdt/internal/core/JavaModelManager
I found
TypeEcs plugin for Typescript
it provide below.
•Syntax highlighting
•Code Completion
•Code Outline
•Find References
•Rename / Refactor
•Open Type
•Code Compilation
•Format Code
•Comment Code
•Open Declaration
•Mark Occurences
•Type Script Debug
So the autocomplete+ comes with Atom when you install it and is enabled by default.
When I am writing code, nothing shows up, why?
Is there any file I need to configure before it works properly?
In autocomplete-plus settings page there is option "File Blacklist":
and by default there is all files back listed "*.*"
so autocomplete works only in those files which have special addon installed
I have put "*.none" and autocomplete started to work in all files for me
For atom-typescript and any new typescript project in general, for things like autocomplete to work correctly, you must have a tsconfig.json file. atom-typescript has a command to generate you a file, when you're editing a .ts file.
Simple, just install atom-ternjs package.
Just install to your Atom Editor current plugin
I would like Visual Studio Code to autocomplete all words within the open document instead of the just the scope specific variables it finds. What should I change in the settings?
edit: code version 0.3.0 at time of question.
I just figured it out. This will use all words on the page for auto complete.
// Always include all words from the current document.
"javascript.suggest.alwaysAllWords": true,
// Complete functions with their parameter signature.
"javascript.suggest.completeFunctionCalls": true,
Even though it has been quite some time for this question, I thought I might be of help to anyone else who bumbles across the same question.
So here goes . And this is for the latest version of VS Code as of writing.
For a true intellisense, i.e. for example you intend to get all the methods related to "console" as soon as you press '.' , you can use the respective Typescript definition file.
Now I agree that this fix is targeted at node,and needs the same along with npm on your system. But still, works for all Major JavaScript work you might run across.
on Linux, for this, you'd need "npm" and install TypeScript Definition Manager (tsd) globally.
npm install -g tsd
then within your current project directory (or by changing to the project directory) , open a terminal window and add the following lines
tsd query node --action install
tsd query express --action install
then, as soon as you'll open your .js file in the current directory, you'll get proper autocomplete / intellisense for all DOM object and other possible stuff.
It worked for me, and this is the only reason I use VSCode on linux (for JavaScript at least, even though I like LightTable too)
for further information (and clarifications if I somehow couldnt manage to be clear enough) visit the following link:
Node.js applications on VS Code
I am using sublime text 3 autocompletion for JavaScript.
For if-statement, it added a semicolon at the end.
if (true) {};
Using JSHint, it gives me an error for most of my code written.
I would like to ask how to customise this autocompletion as my preference?
Open the Sublime Text Folder by going to Preferences → Browse Packages.
Then find the folder called JavaScript
Then open if.sublime-snippet and delete the semi-colon so your snippet now looks like this:
<snippet>
<content><![CDATA[if (${1:true}) {${0:$TM_SELECTED_TEXT}}]]></content>
<tabTrigger>if</tabTrigger>
<scope>source.js</scope>
<description>if</description>
</snippet>
Since #wesbos answer did not do the trick for me here is what I found out.
Sublime 3 does not extract packages. You will find your packages (on linux) in either /opt/sublime_text/Packages/ for default packages or ~/.config/sublime-text-3/Installed Packages for packages you installed, in a zip archive with the extension .sublime-package.
To change the content of a package install the Package Resource Viewer and execute the command : Open resource browse to the file you want to change (if.sublime-snippet, I would also change the for-()-{}.sublime-snippet since it has the same strange semicolon in there) and edit it.
Once you save the file it will save it to ~/.config/sublime-text-3/Packages/JavaScript/if.sublime-snippet. This file then overwrites the default file in the original zip package.
As I understood it is important to know that files that you overwrite in this way will not be updated when you update packages, since they overwrite whatever is in the updated package!