-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
It would be cool to add more tokens so different parts of the code can be highlighted differently. Prism seems more granular than CodeMirror, but it's still missing some nice tokens compared to Atom and VS Code.
For JavaScript, it would be nice to have these:
token parameter
function add(a, b) { // <-- `a` and `b` receive `parameter`
return a + b;
}token property definitionandtoken property access
const obj = {
example: true // <-- `example` receives `property` and `definition`
};
obj.example; // <-- `example` receives `property` and `access`token function method
this.func(); // `func` receives `method` if being called on an objecttoken keyword module
All keywords here should receive the module token.
import { thing as thingy } from 'thing';
export default thingy;token keyword special
"special"(?) keywords like this
token variable dom
window
document
navigator
performance
localStoragetoken console
console.log('hello'); // <-- `console` receives this tokentoken operator spread
const copy = [...arr]; // <- `...` receives this tokenianwalter
Metadata
Metadata
Assignees
Labels
No labels