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
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,
I've followed the instructions in this URL (https://github.com/react-component/calendar) to install a component app in my dependencies. I have succesfully installed it, imported it and it is visible and usable in my web app.
npm install rc-calendar
import Calendar from 'rc-calendar';
<Calendar />
However, I can't seem to edit it or find a 'Calendar.js' file to make changes to it? I'm able to see it in my package.json file but not more than that
You'll find the source files in your node_modules folder in your project. But I would not edit them there. If you want to use that plugin as a starting point and edit it from there, I recommend downloading the source files from the github repo and including it in your project as a regular .js file / regular component. Then you can edit from there. It looks like that plugin has many files that are written in typescript.
TL;DR You can, but you shouldn't.
When you use npm it's supposed that you don't change those packages, what you can do is create your own version. If you want to find the source code, some packages come with it, you'll find it in: <project folder>/node_modules/rc-calendar.
The typical convention is to not edit packages installed via npm . However, you can clone the package repo and include it in your project. There, you can do what ever you want.
I've tried following these instructions:
https://code.visualstudio.com/Docs/runtimes/nodejs
I am not getting the green/red swiggly lines at all. Is there something I'm missing?
You can also see the same thing in this video:
https://youtu.be/sE8_bTEBlFg?t=1m37s
As far as I know, they're running the default editor. I've tried installing typings and typescript using npm. I've Followed that tutorial to get Javascript intellisense for node.js, but I fail to get either error/warning checking or any type information for node.js modules.
Is there a location the type files should be installed to in order to make them global to every JS project you create in VS Code?
OK, so I managed get get some code suggestions working after reading up online. Without using the whole Typings tools, I acquired node.d.ts (found it on my computer inside C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions) and placed that in my project's directory structure inside the ".vscode" folder. At the top of my .js file I added the following line:
/// <reference path=".vscode/node.d.ts" />
The code seems to be recognized now.
I read up on this tip here: How to Import Intellisense files into vsCode (Visual Studio Code)
If you are using ESLint and you have an .eslint.js file in the project root you also need the eslint dependency installed in the project. Otherwise, if there is a .eslint.js file but the ESLint dependency is not installed Visual Studio Code will report nothing in the editor.
Maybe you didn't use the -g flag to install them globally? Alternately, perhaps it's a missing jsconfig.json file?
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
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.