ide-typescript
ide-typescript copied to clipboard
Not recognizing TypeScript files in project
Some of my TS projects are working just fine. Getting outlines, linting, errors, etc.
But this project isn't getting any IDE support and I'm not sure why https://github.com/corvid-coder/nuthatch
Try opening this file in Atom after cloning and see what happens: https://github.com/corvid-coder/nuthatch/blob/master/packages/debug/src/index.ts

Please open the dev tools window in Atom and see if there are any errors reported.
If there are not please enter atom.config.set('core.debugLSP', true) and press enter then restart Atom to see diagnostics information for ide-typescript and let us know of any relevant messages.
Same issue here, nothing in DevTools console.
It was a problem in my tsconfig.json
When I turned on the debug messages I got:

So I modified my tsconfig.json over and over trying to fix it. What finally fixed it for me was modifying the tsconfig.json and then reloading the atom window and then it worked!
(trailing comma after "inlineSourceMap: false, was the culprit.)
We just hit this issue as well and this time it was due to a trailing comma before a closing curly brace. We also noticed that tsc --init generates a JSON configuration file that contains comments (which are invalid in actual JSON).
We should probably:
- Parse this file as JavaScript so that the parser is more forgiving (which seems to match TypeScript and VSCode expectations)
- Surface errors like this to the user via a notification instead of having to enable
core.debugLSP. If we weren't on the core team and didn't know aboutcore.debugLSP, we probably would have given up and just used VS Code.
I am going to re-open this because it's a show-stopping issue when users have a configuration file that contains technically invalid JSON that TypeScript nevertheless accepts.
/cc: @damieng @daviwil
We can probably wire up notifications if we see them - I'm not sure if we have any way to tell the typescript language server to treat .json files any differently from the current behavior. (This might be a limitation of the sourcegraph wrapper in which case a fix would need to go upstream)
Hi! is this issue fixed now?
check the tree setter to fix the issue. settings-core-treesetter
check the tree setter to fix the issue. settings-core-treesetter
Specifically, check the "Use Tree Sitter Parsers" box. This worked for me!