Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Dupont
6fe8e5377a Address feedback 2024-03-19 18:55:31 -07:00
Andrew Dupont
b9258b5884 [grammar-selector] Overhaul grammar display:
* When set to `true`, `hideDuplicateTextMateGrammars` will hide all grammars except whichever one the user has indicated a preference for — via `useTreeSitterParsers` and `useLegacyTreeSitter` settings, whether global or scope-specific.

* When set to `false`, `hideDuplicateTextMateGrammars` will show all grammars, even Legacy Tree-sitter.
2024-03-02 20:55:02 -08:00
Andrew Dupont
c2e10f4da1
Address feedback
Co-authored-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
2024-01-09 20:42:35 -08:00
Andrew Dupont
a6b5f23b26 Get the grammar-selector tests passing…
…including a lot more tests for the new `useLegacyTreeSitter` setting.
2024-01-07 15:35:07 -08:00
Andrew Dupont
76ac2cf81c Make useExperimentalModernTreeSitter the default…
…and create `useLegacyTreeSitter` for those who want to opt into the previous default behavior.

(Legacy Tree-sitter grammars will soon be removed, but this is a step toward that future!)
2024-01-07 15:35:07 -08:00
Andrew Dupont
71d4ad1d07 Restore core.useTreeSitterParsers setting…
…along with a temporary `core.useExperimentalModernTreeSitter` setting.

If we truly planned to keep three different language modes around indefinitely,
changing `core.useTreeSitterParsers` to an enum would make sense. But we don't,
so it'd actually just be a gigantic pain in the ass to migrate one setting to
another of a different type.

When we ship modern-tree-sitter experimentally, we'll make it opt-in via the
temporary setting. When we make it the official tree-sitter implementation and
remove the legacy node-tree-sitter version, we'll remove the temporary setting
and just change the semantics around `core.useTreeSitterParsers`.

Reverting the addition of the `core.languageParser` setting is a chore, but it
prevents a _gigantic_ future headache.
2023-04-26 17:46:02 -07:00
Andrew Dupont
033f5c6498 Update grammar-registry and grammar-selector…
…to prefer new-tree-sitter grammars when the experimental setting is opted into,
and ignore them when it isn't.
2023-03-30 12:14:58 -07:00
Maurício Szabo
f1951af3e2 Fixed specs on grammar and line ending 2023-01-10 22:36:54 -03:00
Benjamin Gray
5f220a8224 fix spec 2019-06-21 19:44:24 +10:00
Rafael Oleza
66f7f1746a Reformat all JS files using prettier 2019-05-31 20:26:19 +02:00
Rafael Oleza
41840abdc2 Merge commit '1d9a4cafcf6cc288d675512db8fd984e13aab869' into pr18738 2019-05-31 20:25:41 +02:00
Rafael Oleza
7f3f040628 Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
Benjamin Gray
cb501f8897 Better tests and enable returning Tree-sitter by default 2019-03-04 21:09:26 +11:00
Benjamin Gray
424c7123b8 fix lints 2019-03-04 17:39:58 +11:00
Benjamin Gray
8dcdae902a merge upstream 2019-03-04 16:44:52 +11:00
Rafael Oleza
ec705399e6 Remove uneeded methods from async-spec-helpers modules 2019-03-01 12:05:21 +01:00
Rafael Oleza
a93808d1a8 Always use global it, beforeEach and afterEach methods 2019-02-28 20:39:21 +01:00
Rafael Oleza
7e23d4dc7a Run prettier on packages/ folder 2019-02-25 12:19:44 +01:00
Benjamin Gray
321b493f83 add specs 2019-02-18 20:57:52 +11:00
Benjamin Gray
2cb9bc46ad Fix specs 2019-02-18 16:23:06 +11:00
Max Brunsfeld
2a318c1316 ➡️ Migrate core package 'grammar-selector' into ./packages 2018-10-17 14:30:51 -07:00