Skip to content

code completion also for user generated ts-files #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nimo23 opened this issue Nov 9, 2016 · 6 comments
Closed

code completion also for user generated ts-files #110

nimo23 opened this issue Nov 9, 2016 · 6 comments

Comments

@nimo23
Copy link

nimo23 commented Nov 9, 2016

Actually, TS IDE provides code completion when importing for example this:

// when I type '@angul' then TS IDE opens code completion '
import { Component, Input } from '@angular/core';

Imagine, I create a file "user.service.ts" within the project folder (which can be within a subdirectory of any level). Now, I want to import my "user.service.ts" within another class:

// Please provide code completion for ''./services/user.service"
// when I type './ser' then TS IDE opens NO code completion, 
// and I have to write the whole path my myself
import { UserService } from './services/user.service';

Actually, TS IDE does not help me with code completion of my class "user.service.ts", so I have to look up where it is located and write all the path by myself.

I guess, the same goes for html-files and css-files, which can also be referenced within a ts-file:

@Component({
// Please provide Code Completion to add 'title.component.html' easier.
templateUrl: 'title.component.html',

// Please provide code completion: 
// when I type 'title.co', TS Server should view code completion ( "title.co"->"title.component.css", "title.component.html")
styleUrls: [ 'title.component.css' ]
})
export class TitleComponent {
}

Would be nice to integrate code completion when importing user generated files (ts/css/html-files) within ts-files.

Thanks!

@angelozerr
Copy link
Owner

Same issue than #31. It's an issue for TypeScript tsserver.

// when I type '@angul' then TS IDE opens code completion '
import { Component, Input } from '@angular/core';

Really, this case works? Cool! Which version of TypeScritpt are you using?

I guess, the same goes for html-files and css-files, which can also be referenced within a ts-file:

To support that, we need to wait 2.1.0 which provides TypeScript extension model. See angular/angular#7482

@nimo23
Copy link
Author

nimo23 commented Nov 9, 2016

Really, this case works?

Yes, this case works in TS IDE with Eclipse.
I have globally installed Typescript Version 2.0.6

To support that, we need to wait 2.1.0

Okay, I am glad that this is coming.

By the way, will this also support content assist for angular directives within html-files?
As described here: https://github.com/angelozerr/angular2-eclipse/wiki/RoadMap

Actually, in Visual Studio Code I have angular2-code completion within html files:

When I type 'ng-', VS Code supports me with code completion. Eclipse TS IDE (with installed Angular2-Plugin) does not provide this code completion:

// VS Code: Code completion works for 'ng-' and 'user'
// Eclipse TS IDE (with Angular2-Plugin): Code completion does not work for 'ng-' and 'user'
<p ng-if="user">
    <i>Welcome, {{user}}</i>
</p>

@angelozerr
Copy link
Owner

Actually, in Visual Studio Code I have angular2-code completion within html files:

I suppose that you have installed https://github.com/chuckjaz/vscode-ng-template-service
I'm waiting for that tsserver will become extensible to add Angular2 capability. See angular/angular#7482 (comment)

@nimo23
Copy link
Author

nimo23 commented Nov 9, 2016

I suppose that you have installed

Yes.

I'm waiting for that tsserver

Cool. I am waiting, too:)

So I guess, we can close this issue, as I found that is related to

angular/angular#7482

@nimo23 nimo23 closed this as completed Nov 9, 2016
@angelozerr
Copy link
Owner

Just one question: why do you wish to use typescript.java although VSCode is more advanced?

@nimo23
Copy link
Author

nimo23 commented Nov 9, 2016

why do you wish to use typescript.java although VSCode is more advanced

In my opinion, Eclipse IDE is great for development (large projects/workspaces/etc) and your "typescript.java" is actually (and I hope, will be further) by far better than the others in the Eclipse World.

I think to go with typescript/node (Javascript) has a great future, I have developed a lot of things in Java before (JEE, JSF, etc).

You know:

Atwood's Law: Any application that can be written in JavaScript, will eventually be written in JavaScript.

Your "typescript.java" is actually the only "Typescript IDE" in the Eclipse World with a broad future. So I want to support you by finding issues to make it even better :)

I guess, it is only a matter of time when "typescript.java" is integrated in "Eclipse IDE" by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants