emacs-php / emacs-php/php-ts-mode

Syntax highlighting

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
28
Forks
7
PR merge metrics
No merged PRs in 30d

Description

To track issues to resolve:

- [ ] Should `?` (nullable type), `|` (union type) and `&` (intersection type) be have `font-lock-operator-face` or `@font-lock-type-face`. Currently `font-lock-operator-face` is going to be applied
- [x] const_element (name) highlights `CONST_NAME = 'value'` in class declaration instead of just `CONST_NAME` https://github.com/emacs-php/php-ts-mode/pull/16
- [ ] string interpolation is missing - I'm not sure how much we have to care about `${XX}` syntax as it's deprecated in 8.2
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
- [x] class_interface_clause (name) applied highlight to `implements` and `,` instead of just interface names https://github.com/emacs-php/php-ts-mode/pull/16
- [ ] `;` ( `expression_statement ";") in for is not highlighted
- [ ] object_creation_expression is not highlighted https://github.com/emacs-php/php-ts-mode/pull/68
- [x] binary_expression is not highlighted (or, and, xor) - should there be just keywords? https://github.com/emacs-php/php-ts-mode/pull/15
- [x] Highlight `$` in variable name https://github.com/emacs-php/php-ts-mode/pull/16
- [ ] Highlight `this` in variable name https://github.com/emacs-php/php-ts-mode/pull/68
- [x] Highlight object member https://github.com/emacs-php/php-ts-mode/pull/16
- [x] Highlight `list` https://github.com/emacs-php/php-ts-mode/pull/16
- [x] Highlight `array` https://github.com/emacs-php/php-ts-mode/pull/16

Missing keywords:
- [x] readonly https://github.com/emacs-php/php-ts-mode/pull/9
- [x] fn https://github.com/emacs-php/php-ts-mode/pull/9
- [x] for https://github.com/emacs-php/php-ts-mode/pull/9
- [x] yield https://github.com/emacs-php/php-ts-mode/pull/9
- [x] yield from https://github.com/emacs-php/php-ts-mode/pull/14
- [x] never https://github.com/emacs-php/php-ts-mode/pull/11

Rework `treesit-font-lock-feature-list`

- [x] Comply with `treesit-font-lock-level` here is a gist from the documentation: https://github.com/emacs-php/php-ts-mode/pull/19

```
Its value is 3

Decoration level to be used by tree-sitter fontifications.

Major modes categorize their fontification features into levels,
from 1 which is the absolute minimum, to 4 that yields the maximum
fontifications.

Level 1 usually contains only comments and definitions.
Level 2 usually adds keywords, strings, data types, etc.
Level 3 usually represents full-blown fontifications, including
assignments, constants, numbers and literals, etc.
Level 4 adds everything else that can be fontified: delimiters,
operators, brackets, punctuation, all functions, properties,
variables, etc.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.