pulsar/packages/language-c
Andrew Dupont 1c90032276 Add namespaces to custom #set! predicates
Predicates were getting pretty chaotic. With the namespace, it's now clearer
where a predicate may be defined and what its purpose is. It also helps resolve
ambiguity — e.g., both folds and highlights can have an `endAt` predicate, so
now they're disambiguated as `fold.endAt` and `adjust.endAt`, respectively.

Namespaces:

* `highlight` for highlight-specific settings (of which there is presently only
   one)
* `test` for scope tests (currently used by highlights and indents)
* `adjust` for scope adjustments (highlights)
* `indent` for indent settings
* `fold` for fold settings

Right now, only the `test` namespace will be used by more than one kind of query
file, but I could imagine that changing in the future.

For now, tests and adjustments still work without the prepended namespace, but
I imagine I'll take that out even before we ship this feature experimentally.
Much easier to make big changes like this before anyone depends on them.

This also draws a much clearer line between `#set!` predicates with special
meaning in Pulsar… and those which are being used to set arbitrary data for
later use. For instance, if you see `(#set! isOnLeftSideOfAssignment true)`, you
know it must just be arbitrary data.
2023-04-29 14:58:42 -07:00
..
grammars Add namespaces to custom #set! predicates 2023-04-29 14:58:42 -07:00
lib lint 2022-06-26 03:21:15 +00:00
settings ➡️ Migrate all language packages 2022-06-25 19:58:57 +00:00
snippets ➡️ Migrate all language packages 2022-06-25 19:58:57 +00:00
spec Restore core.useTreeSitterParsers setting… 2023-04-26 17:46:02 -07:00
.envrc Add C and C++ grammars 2023-03-28 17:03:42 -07:00
.gitignore ➡️ Migrate all language packages 2022-06-25 19:58:57 +00:00
.tool-versions Add C and C++ grammars 2023-03-28 17:03:42 -07:00
LICENSE.md rebrand and relicence 2022-12-03 02:46:08 +00:00
package-lock.json add or update packages/*/package-lock.json 2022-12-10 19:13:50 +01:00
package.json Merge branch 'master' into remove-coffeelint 2022-12-03 20:45:45 -08:00
README.md rebrand and relicence 2022-12-03 02:46:08 +00:00

C/C++ language support in Pulsar

Adds syntax highlighting and snippets to C/C++ files in Pulsar.

Originally converted from the C TextMate bundle.

Contributions are greatly appreciated. Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc.