pulsar/packages
Andrew Dupont 46877b05ff [language-php] Add meta.embedded.block/meta.embedded.line
…to each PHP section in order to match the functionality of the TextMate grammar.

This was a gigantic endeavor and involved doing several things that were on my “ugh, I’ll get around to it” list:

* To make some of this stuff work, we were using two different PHP parser layers. The root one did the syntax highlighting and separated the HTML from the rest, and the deeper injection was there just so we could scope some ranges as `source.php`.

  That doesn’t work because of rules we have about shallower layers acting before deeper layers when iterating through syntax highlighting boundaries. I was trying to be too clever. Now the _root_ layer is the one that does no highlighting, and the _deeper_ layer is the one that exists to apply `source.php` _and then_ perform highlighting and indentation hinting and folding and whatnot.

  If we need to, we can move some of the queries to the root layer for whatever reason; maybe we come across a bug six months from now that could be fixed if we made the root layer in charge of folding. We have options.

* All boundaries for `HighlightIterator`s now _either_ open one or more scopes _or_ close one or more scopes. If one boundary can close some scopes and open others, then boundaries on different layers that share a buffer position cannot possibly close/open in the correct order because they can't intermingle. This needed to happen and this was as good of an excuse as any to do it.
* We needed to present sane PHP opening/closing ranges to the injection. Ironically, `tree-sitter-php` itself makes this nearly impossible because of how the tree is structured; it tries to hide the `<?php` and `?>` tags from the PHP layer and treat them as text, despite the fact that PHP is the thing that knows how to parse that.

  The best way to do this — at least until I encounter a reason why it can’t work — is to find all the `<?php`s and `?>`s, sort them, group them, and build fake node ranges. This is fine! I mean, it’s ridiculous, but it’s fine! The ranges that we hand off to another parser are allowed to be completely arbitrary!

  This lets us do what we were only approximating before: have _one_ PHP injection layer with _any number of_ content ranges, each of which begins with `<?php` and ends with `?>` without trying to claim any surrounding whitespace. This would be worth it even if we didn’t have to do any of this other stuff.

* Each content range of the injection needs _either_ `meta.embedded.line.php` _or_ `meta.embedded.block.php` depending on whether the range begins and ends on the same line. This is not something I was willing to regress on because it's _hard_ to distinguish between PHP and non-PHP unless your editor helps you out, and because I wasn't going to go into a bunch of themes and tell them to treat `source.php` like `meta.embedded`.

  This also meant that we needed to be able to add _multiple_ “root” scope names per content range. But we already had a mode in which the `languageScope` injection option could be a callback, so it wasn't hard to make it a callback that could take extra parameters for the buffer and range.

  This isn't a feature that I'm eager for other grammars to use, or even necessarily know about, but it was what we needed to deliver feature parity here. And none of it would have been necessary if `tree-sitter-php` made more sensible choices. (Whatever. Maybe what I want isn't possible for some strange reason.)

All existing tests pass. Tests have been written for the new `languageScope` features. Tests need to be written for PHP just like for all other language grammars, but that was on the to-do list anyway. If any of this turns out to be catastrophic, it’s easy to roll back, but tests are passing on my machine and I expect them to pass in CI.
2024-01-20 20:49:17 -08:00
..
about about: Delete commented out CSS styles/rules 2023-09-14 03:43:55 -04:00
archive-view Updated etch and temp from archive-view package 2023-01-29 23:28:33 -08:00
atom-dark-syntax Revert "Add the Tree-sitter Markdown grammar." 2023-08-10 19:08:58 -07:00
atom-dark-ui Very thorough wrapping of math in () 2023-06-29 20:37:16 -07:00
atom-light-syntax Revert "Add the Tree-sitter Markdown grammar." 2023-08-10 19:08:58 -07:00
atom-light-ui Very thorough wrapping of math in () 2023-06-29 20:37:16 -07:00
autocomplete-atom-api Manual decaf autocomplete-atom-api 2023-08-22 21:03:28 -07:00
autocomplete-css Make useExperimentalModernTreeSitter the default… 2024-01-07 15:35:07 -08:00
autocomplete-html Fix memory access error on autocomplete-html specs 2024-01-07 15:35:08 -08:00
autocomplete-plus Merge remote-tracking branch 'origin/ui-api' into filtering-api 2023-11-07 12:12:24 -03:00
autocomplete-snippets autocomplete-snippets: Fix repo URL 2023-01-24 01:22:53 -05:00
autoflow Manual decaf autoflow specs 2023-08-22 21:39:39 -07:00
autosave Install autosave from file. Update README.md and package.json 2023-03-12 14:30:15 -07:00
background-tips Very thorough wrapping of math in () 2023-06-29 20:37:16 -07:00
base16-tomorrow-dark-theme Prevent certain syntax themes from highlighting class bodies wrong… 2023-09-20 14:59:59 -07:00
base16-tomorrow-light-theme Prevent certain syntax themes from highlighting class bodies wrong… 2023-09-20 14:59:59 -07:00
bookmarks Fix memory access error on autocomplete-html specs 2024-01-07 15:35:08 -08:00
bracket-matcher Add some more stray .eslintrc files 2024-01-18 13:53:23 -08:00
command-palette Fixed command-palette highlighting 2023-10-17 01:30:36 -03:00
dalek Fix engine version 2023-06-23 10:13:05 -07:00
deprecation-cop Migrate deprecation-cop 2023-10-18 21:46:02 -07:00
dev-live-reload Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js 2022-12-13 18:21:25 -08:00
encoding-selector Removed an old test code 2023-01-10 22:07:30 -03:00
exception-reporting Disabling exception reporter tests 2023-01-27 16:21:30 -03:00
find-and-replace [find-and-replace] Fix capitalize utility 2023-12-29 14:32:11 -08:00
fuzzy-finder Making fuzzy-finder use the right algorithm 2023-11-23 19:38:44 -03:00
git-diff Bump all deps in git-diff 2023-06-20 17:04:18 -07:00
go-to-line Fixed go to line specs 2023-01-09 22:29:58 -03:00
grammar-selector Address feedback 2024-01-09 20:42:35 -08:00
image-view fix #578 2023-06-04 21:52:05 +02:00
incompatible-packages Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js 2022-12-13 18:21:25 -08:00
keybinding-resolver Merge branch 'master' into renovate/npm-underscore-vulnerability 2023-04-30 20:42:47 -07:00
language-c [language-c] Highlight struct designated initializers 2024-01-20 12:07:22 -08:00
language-clojure Make useExperimentalModernTreeSitter the default… 2024-01-07 15:35:07 -08:00
language-coffee-script Decaf language-coffee-script 2023-07-08 18:05:56 -07:00
language-csharp Decaf language-csharp 2023-07-08 18:06:23 -07:00
language-css [language-css] Update tree-sitter-css parser to latest 2024-01-18 13:53:23 -08:00
language-gfm [language-gfm] Test for undetected URLs in paragraphs… 2024-01-19 21:25:00 -08:00
language-git Decaf language-git 2023-07-08 18:13:17 -07:00
language-go [language-go] Highlight method names like function names 2024-01-18 17:31:46 -08:00
language-html [language-html] Update tree-sitter-embedded-template to latest… 2024-01-19 23:16:15 -08:00
language-hyperlink Add documentation for the new TODO/hyperlink services 2024-01-18 13:53:23 -08:00
language-java Convert all modern Tree-sitter TODO/hyperlink injections into services 2024-01-18 13:53:22 -08:00
language-javascript Update highlights for all regex injections… 2024-01-19 21:01:07 -08:00
language-json Update tree-sitter-json WASM build to latest 2024-01-11 15:07:11 -08:00
language-less Manual decaf language-less spec 2023-08-22 22:27:25 -07:00
language-make Improvements to the TextMate Makefile grammar 2023-12-05 23:47:49 -08:00
language-mustache Manual decaf language-mustache spec 2023-08-22 22:31:11 -07:00
language-objective-c Manual decaf language-objective-c spec 2023-08-22 22:32:16 -07:00
language-perl Manual decaf language-perl spec 2023-08-22 22:35:24 -07:00
language-php [language-php] Add meta.embedded.block/meta.embedded.line 2024-01-20 20:49:17 -08:00
language-property-list Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js 2022-12-13 18:21:25 -08:00
language-python [language-python] Update to latest tree-sitter-python 2024-01-19 16:43:32 -08:00
language-ruby Update highlights for all regex injections… 2024-01-19 21:01:07 -08:00
language-ruby-on-rails Manual decaf language-ruby-on-rails spec 2023-08-23 01:14:39 -07:00
language-rust-bundled Convert all modern Tree-sitter TODO/hyperlink injections into services 2024-01-18 13:53:22 -08:00
language-sass Manual decaf langauge-sass 2023-08-23 17:09:46 -07:00
language-shellscript [language-shellscript] Highlighting fixes… 2024-01-19 17:27:44 -08:00
language-source Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js 2022-12-13 18:21:25 -08:00
language-sql Manual decaf langauge-sql 2023-08-23 17:17:37 -07:00
language-text Manual decaf language-text 2023-08-23 17:18:11 -07:00
language-todo Add documentation for the new TODO/hyperlink services 2024-01-18 13:53:23 -08:00
language-toml Convert all modern Tree-sitter TODO/hyperlink injections into services 2024-01-18 13:53:22 -08:00
language-typescript [language-typescript] Highlight the wildcard import symbol 2024-01-19 23:25:23 -08:00
language-xml Manual decaf language-xml 2023-08-23 17:21:58 -07:00
language-yaml Convert all modern Tree-sitter TODO/hyperlink injections into services 2024-01-18 13:53:22 -08:00
line-ending-selector Fixed specs on grammar and line ending 2023-01-10 22:36:54 -03:00
link Get link specs passing 2024-01-07 15:35:07 -08:00
markdown-preview Opt into emoji in markdown-preview package 2023-12-30 18:49:52 -08:00
notifications Migrate notifications to new API 2023-10-18 12:00:23 -07:00
one-dark-syntax [language-typescript] Harmonize syntax decisions between JS and TS… 2024-01-18 19:05:17 -08:00
one-dark-ui Merge pull request #599 from asiloisad/master 2023-07-05 21:12:29 -07:00
one-light-syntax [language-typescript] Harmonize syntax decisions between JS and TS… 2024-01-18 19:05:17 -08:00
one-light-ui Merge pull request #599 from asiloisad/master 2023-07-05 21:12:29 -07:00
open-on-github Merge branch 'master' into renovate/npm-underscore-vulnerability 2023-04-30 20:42:47 -07:00
package-generator Adds npm lock file Reference #209 2022-12-10 14:36:23 -08:00
pulsar-updater Add some more stray .eslintrc files 2024-01-18 13:53:23 -08:00
settings-view Merge remote-tracking branch 'origin/ui-api' into filtering-api 2023-11-07 12:12:24 -03:00
solarized-dark-syntax More syntax theme fixes 2023-07-31 00:08:10 -07:00
solarized-light-syntax More syntax theme fixes 2023-07-31 00:08:10 -07:00
spell-check Address feedback 2024-01-11 13:49:28 -08:00
status-bar Manual decaf status-bar source 2023-09-04 03:01:39 -07:00
styleguide Add some more stray .eslintrc files 2024-01-18 13:53:23 -08:00
symbol-provider-ctags Fix issue where symbol-provider-ctags used the wrong package root 2024-01-12 12:42:01 -08:00
symbol-provider-tree-sitter Update specs 2024-01-03 10:26:17 -08:00
symbols-view [symbols-view] Add specs for return-from-declaration fix 2024-01-15 16:01:47 -08:00
tabs Very thorough wrapping of math in () 2023-06-29 20:37:16 -07:00
timecop Very thorough wrapping of math in () 2023-06-29 20:37:16 -07:00
tree-view Remove @ from example to fix Documentation CI 2023-09-14 18:50:55 -04:00
update-package-dependencies Merge pull request #209 from Sertonix/add-or-update-packages-package-lock.js 2022-12-13 18:21:25 -08:00
welcome Add last minute PR update 2024-01-15 17:05:58 -08:00
whitespace Remove stray console.log from whitespace package 2023-04-03 20:38:07 -07:00
wrap-guide Reformulating options. 2023-11-14 14:55:34 +01:00
README.md fix links 2023-08-25 12:54:28 +02:00

Core Packages

This folder contains core packages that are bundled with Pulsar releases. Not all core packages are kept here; please see the table below for the location of every core package.

NOTE: There is an ongoing effort to migrate more Pulsar packages from their individual repositories to this folder. See RFC 003 for more details.

Package Where to find it Migration issue
about ./about
atom-dark-syntax ./atom-dark-syntax
atom-dark-ui ./atom-dark-ui
atom-light-syntax ./atom-light-syntax
atom-light-ui ./atom-light-ui
autocomplete-atom-api ./autocomplete-atom-api
autocomplete-css ./autocomplete-css
autocomplete-html ./autocomplete-html
autocomplete-plus ./autocomplete-plus
autocomplete-snippets ./autocomplete-snippets
autoflow ./autoflow
autosave ./autosave
background-tips ./background-tips
base16-tomorrow-dark-theme ./base16-tomorrow-dark-theme
base16-tomorrow-light-theme ./base16-tomorrow-light-theme
bookmarks ./bookmarks
bracket-matcher ./bracket-matcher
command-palette ./command-palette
dalek ./dalek
deprecation-cop ./deprecation-cop
dev-live-reload ./dev-live-reload
encoding-selector ./encoding-selector
exception-reporting ./exception-reporting
find-and-replace ./find-and-replace
fuzzy-finder ./fuzzy-finder
github pulsar-edit/github
git-diff ./git-diff
go-to-line ./go-to-line
grammar-selector ./grammar-selector
image-view ./image-view
incompatible-packages ./incompatible-packages
keybinding-resolver ./keybinding-resolver
language-c ./language-c
language-clojure ./language-clojure
language-coffee-script ./language-coffee-script
language-csharp ./language-csharp
language-css ./language-css
language-gfm ./language-gfm
language-git ./language-git
language-go ./language-go
language-html ./language-html
language-hyperlink ./language-hyperlink
language-java ./language-java
language-javascript ./language-javascript
language-json ./language-json
language-less ./language-less
language-make ./language-make
language-mustache ./language-mustache
language-objective-c ./language-objective-c
language-perl ./language-perl
language-php ./language-php
language-property-list ./language-property-list
language-python ./language-python
language-ruby ./language-ruby
language-ruby-on-rails ./language-ruby-on-rails
language-rust-bundled ./language-rust-bundled
language-sass ./language-sass
language-shellscript ./language-shellscript
language-source ./language-source
language-sql ./language-sql
language-text ./language-text
language-todo ./language-todo
language-toml ./language-toml
language-typescript ./language-typescript
language-xml ./language-xml
language-yaml ./language-yaml
line-ending-selector ./line-ending-selector
link ./link
markdown-preview ./markdown-preview
notifications ./notifications
one-dark-syntax ./one-dark-syntax
one-dark-ui ./one-dark-ui
one-light-syntax ./one-light-syntax
one-light-ui ./one-light-ui
open-on-github ./open-on-github
settings-view ./settings-view
package-generator ./package-generator
pulsar-updater ./pulsar-updater
snippets pulsar-edit/snippets
solarized-dark-syntax ./solarized-dark-syntax
solarized-light-syntax ./solarized-light-syntax
spell-check ./spell-check
status-bar ./status-bar
styleguide ./styleguide
symbols-view pulsar-edit/symbols-view
tabs ./tabs
timecop ./timecop
tree-view ./tree-view
update-package-dependencies ./update-package-dependencies
welcome ./welcome
whitespace ./whitespace
wrap-guide ./wrap-guide