Closed aergonaut closed 5 years ago
I've noticed this issue with .tsx
files, too. In my case, I'm able to consistently trigger a few ways (definitely not sure if this list is exhaustive):
.tsx
file.tsx
file in the left-most tabThis also seems related to the new tree-sitter parser enabled by default in Atom 1.32. With the "Core > Use Tree Sitter Parsers" setting disabled, I do not run into this issue.
Maybe related: with Tree Sitter enabled, the scope of .tsx
files is source.ts
(TypeScript), but the Tree Sitter disabled, it's source.tsx
(TypeScriptReact). I wonder if this is bumping into theia-ide/typescript-language-server#90 somehow?
Thanks for the workaround @mcous. Turning off tree-sitter also fixes the problem for me.
I still needed to use tree-sitter
for other languages like Rust, so I instead removed the tree-sitter
grammars from the language-typescript
package and then everything worked out fine with the "Core > Use Tree Sitter Parsers" still enabled.
Install language-typescript
with apm
even though it is bundled with Atom:
apm install language-typescript
Then delete the tree-sitter
grammars from the language-typescript
package:
rm ~/.atom/packages/language-typescript/grammars/tree-sitter*.cson
Restart Atom
Thanks, turning off tree-sitter worked for me too. Hopefully I'll be able to re-enable it again soon.
Upgrading to v0.8.0 of the package seems to break JSX in .tsx files.
With v0.8.0, all of the JSX tags in my .tsx files are highlighted as errors, with error messages like "Cannot find name span", etc. Additionally, the
import React from "react"
import at the top of my files is highlighted as unused.With v0.7.9, there are no errors in my files.
As an example, you can check this file from one of my public projects: https://github.com/aergonaut/jiken/blob/master/app/javascript/incidents/Incident.tsx