Improve syntax-aware auto indentation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 64/100
Research direction
Start with the scanner described in issue #59 and reproduce the block-comment example from this issue. Track lexical state across lines so delimiters inside block comments do not affect indentation, and verify that pressing Enter after the example's second line no longer adds an indentation level; multi-line strings and JavaScript regex literals remain out of scope.
Written by the indexing model from the issue text.
Description
The scanner in #59 only reads the current line and carries no state across lines, so it cannot recognize that a line is still inside a comment.
For example, pressing Enter after the second line below incorrectly adds an indentation level:
/*
* setup {
*/
A follow-up should track lexical state across lines so delimiters inside block comments do not affect indentation. Multi-line strings and JavaScript regex literals also remain outside the current scanner's scope.
- Dominant language
- Rust
- Stars
- 54
- Forks
- 8
- Avg merge
- 11h 57m
- Merged PRs (30d)
- 44
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sysprog21/codetrial
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
All issues in sysprog21/codetrial
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100