Skip to content
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

Turning off built-in Typescript in VSCode loses useful features #130

Closed
wagenet opened this issue Apr 1, 2021 · 14 comments
Closed

Turning off built-in Typescript in VSCode loses useful features #130

wagenet opened this issue Apr 1, 2021 · 14 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@wagenet
Copy link
Contributor

wagenet commented Apr 1, 2021

For instance, if I type assert it no longer suggests importing from @ember/debug.

@dfreeman dfreeman added the bug Something isn't working label Apr 2, 2021
@dfreeman
Copy link
Member

dfreeman commented Apr 2, 2021

It looks like we're not handling completion items with associated code actions (like adding an import) correctly.

@bakerac4
Copy link

I can second this. I lost the ability to remove unused imports. The other thing is that if it does recommend adding an import it always seems to recommend the relative path which is not what I have in my settings

@wagenet
Copy link
Contributor Author

wagenet commented Apr 27, 2021

FWIW, I think the only conflict I've seen with built-in TS is the use of private scope in templates. For now I'll stick with protected as we had already been doing and leave built-in TS on.

@runspired
Copy link

I lost most code-hinting and all hover-for-code-doc abilities.

@dfreeman
Copy link
Member

I lost most code-hinting

Can you give examples of what you mean by code hinting?

The main thing we know we drop on the floor today is what the LSP refers to as "code actions," either affiliated with a completion item (like adding the needed import statement when you pick an identifier) or as standalone directions like cleaning up unused imports. If things that don't fall into that category are missing, that may be something we're unaware of or it may be a bug.

all hover-for-code-doc abilities.

This sounds like a definite bug, independent of the other things outlined here. Can you file a separate issue with an example of what's failing? (Ideally with some code that I could drop into a Glint-enabled project and see the issue live)

@dfreeman
Copy link
Member

If anyone is interested adding support for translating the TypeScript language service's code actions (auto-importing new identifiers, removing unused imports, etc) to the LSP equivalent, I'm happy to provide what guidance I can.

@dfreeman
Copy link
Member

dfreeman commented Apr 14, 2023

Note that @chadhietala did a massive chunk of work to support general code actions in #499, which is included in recent 1.x beta releases.

We're still missing support for auto-import as part of accepting a completion item (rather than as an after-the-fact independent action), however.

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Jan 2, 2024

Anyone want to implement this?

Related: #626

@machty
Copy link
Contributor

machty commented Jan 2, 2024

Quick 👍 / 👎 : if you're a VS Code user running into this, are you 👍 leaving TS enabled alongside Glint, or 👎 doing without the TS niceties (like auto-import)?

@NullVoxPopuli NullVoxPopuli added good first issue Good for newcomers and removed help wanted labels Jan 5, 2024
@wagenet
Copy link
Contributor Author

wagenet commented Jan 10, 2024

@machty There's a third option here, which is that you turn it on and off as you get annoyed with one or the other 😬

@wagenet
Copy link
Contributor Author

wagenet commented Jan 10, 2024

One of the big issues with leaving TS on is that it doesn't recognize .gts files.

@spuxx1701
Copy link

I have been running both language servers in parallel. It's been the lesser evil for me.

@NullVoxPopuli
Copy link
Contributor

With 1.3, you should be able to disable the TS one again

@NullVoxPopuli
Copy link
Contributor

I think we can close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants