Comments (10)
Any updates?
from language-typescript.
This also happens with other Typescript scopes: https://discuss.atom.io/t/cant-seem-to-style-element-based-on-cursor-scope/51526
from language-typescript.
Bump. Is anyone actually responsible for this project at the moment?
from language-typescript.
@lierdakil The team was on a bug bash and retreat last month so we are somewhat behind on triage.
from language-typescript.
The grammar comes from upstream and is supposed to work in a variety of editors - from their README;
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as Visual Studio Code, The TypeScript Sublime Plugin, Atom TypeScript, and possibly others.
I'm not aware that any other editor can handle spaces in the names correctly besides VSCode so either that upstream repository isn't the one we all want to use after all or they need to consider not closing the issue with "works in VSCode" :(
from language-typescript.
FWIW, Sublime seems to handle it correctly:
while in Atom it's
when it should be
(I'm not familiar enough with Sublime to make any informed claims, but it seems that it just uses whitespace as a scope delimiter, so if grammar yields a scope with whitespace, Sublime just treats that as two scopes)
from language-typescript.
Might it might be easier to fix on Atom side?.. At least I believe a quick fix should amount to a single-line change (didn't look at the sources yet though, so allow for a ± couple lines). A "correct" fix might prove to be a bit more involved, but probably not drammatically so.
from language-typescript.
The problem is if I hack the grammar files here then we're effectively detached from upstream unless we keep remembering to make those changes every time we pull...
Also not sure what the right fix would actually be. Sure they've put multiple grammar scope names in a name but there isn't an Atom-compatible syntax for that so we'd just have to choose one or come up with some kind of combo name.
Open to suggestions or PRs (should probably sync upstream again before anyone bothers with that)
from language-typescript.
I was more thinking along the lines of patching first-mate to handle scopes with spaces actually.
A technically "correct" fix on the grammar side would be a scope-within-a-scope. So essentially (and forgive me if it doesn't work, it was a while since I last touched grammar)
match: '...'
name: 'meta.definition.function.ts'
captures: 0: name: 'entity.name.function.ts'
... although it isn't nestable, or at least I can't say from the top of my head how it could be.
from language-typescript.
And by "nestable" I actually meant "can handle more than two scopes". Sorry, long day.
from language-typescript.
Related Issues (20)
- Failed to load a language-typescript package grammar HOT 1
- Flow files no longer have `source.js` scope, snippets broken HOT 2
- TypeScript `export =` syntax not highlighted with inline declarations HOT 5
- Multiline arguments types invalid highlight HOT 2
- Type parameters on JSX open tag identifiers cause the JSX block to be highlighted incorrectly HOT 11
- It's broken. fIx it
- NoSubstitutionTemplateLiteral breaks coloring HOT 1
- Variables that start with capital letter marked as types
- Template literals
- Package snippets don't work HOT 6
- update TextMate grammar HOT 3
- syntax highlighting issues.
- No syntax highlighting at all HOT 6
- .ts files are not auto detected HOT 2
- Type generics for React components break syntax highlighting HOT 1
- Failed to load a language-typescript package grammar HOT 1
- Failed to load a language-typescript package grammar HOT 10
- Support for "abstract" keyword
- I didn't find the Automatic Indenting of JSX feature.
- Classes with generic mixins applied to base do not highlight correctly #1573 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-typescript.