mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-10-26 11:08:40 +03:00
A Community-led Hyper-Hackable Text Editor
adfdd05472
There's a hard-to-grok setting for language injections that allows a deeper layer to monopolize the scope application for a range. In most cases, an injection is placed into a node that the parser doesn't know much about (like a `script` block in HTML); but Rust and C parsers needed a way to inject themselves _into themselves_ so that they could add syntax highlighting to macros. Because they were applying highlighting to a range that the base layer _already_ had plans to highlight, they needed a way to block the shallower layer from acting. This mode has never worked briliantly, but it's been made smarter in several ways since the invention of modern Tree-sitter. And here's another one: if the highlight iterator is at a position where an injection range is _about_ to begin, it shouldn't be able to stop any other layer from _closing_ a scope; and if the highlight iterator is at a position where an injection range has just _finished_, it shouldn't be able to stop any other layer from _opening_ a scope. Because of this, we can now fix a bug that I think might've been present for a while in the application of scopes to rust macros like `println!` — the position after the exclamation point is one of those injection-layer boundaries, to the effect that a scope name was opened that would persist until at least the end of the screen line. |
||
---|---|---|
.github | ||
docs | ||
dot-atom | ||
exports | ||
hooks | ||
integration | ||
keymaps | ||
menus | ||
packages | ||
ppm@0bc207133b | ||
resources | ||
script | ||
spec | ||
src | ||
static | ||
vendor | ||
.cirrus.yml | ||
.codacy.yaml | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.nvmrc | ||
.yarnrc | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LICENSE.md | ||
package.json | ||
playwright.config.ts | ||
pnpm-workspace.yaml | ||
PULL_REQUEST_TEMPLATE.md | ||
pulsar.sh | ||
README.md | ||
SUPPORT.md | ||
yarn.lock |