mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Rename all tree-sitter-2
values to modern-tree-sitter
Any file paths with `tree-sitter-2` in them can be renamed later.
This commit is contained in:
parent
b4fcfee909
commit
365561069f
@ -1,6 +1,6 @@
|
||||
name: 'C'
|
||||
scopeName: 'source.c'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-c'
|
||||
|
||||
injectionRegex: '^(c|C)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'C++'
|
||||
scopeName: 'source.cpp'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-cpp'
|
||||
|
||||
injectionRegex: '^(cpp|CPP|cc|CC)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
'name': 'Clojure'
|
||||
'scopeName': 'source.clojure'
|
||||
'type': 'tree-sitter-2'
|
||||
'type': 'modern-tree-sitter'
|
||||
'fileTypes': [
|
||||
'boot'
|
||||
'clj'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'CSS'
|
||||
scopeName: 'source.css'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-css'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Go'
|
||||
scopeName: 'source.go'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-go'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'EJS'
|
||||
scopeName: 'text.html.ejs'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-embedded-template'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'ERB'
|
||||
scopeName: 'text.html.erb'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-embedded-template'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'HTML'
|
||||
scopeName: 'text.html.basic'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-html'
|
||||
|
||||
injectionRegex: '(HTML|html|Html)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
# name: 'Hyperlink'
|
||||
scopeName: 'text.hyperlink'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-hyperlink'
|
||||
|
||||
injectionRegex: 'hyperlink'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Java'
|
||||
scopeName: 'source.java'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-java'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'JavaScript'
|
||||
scopeName: 'source.js'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-javascript'
|
||||
|
||||
injectionRegex: '^(js|javascript)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'JSDoc'
|
||||
scopeName: 'source.jsdoc'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-jsdoc'
|
||||
|
||||
injectionRegex: '^jsdoc$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'JavaScript RegExp'
|
||||
scopeName: 'source.regexp.js'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-regex'
|
||||
|
||||
injectionRegex: '^(js-regex)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'JSON'
|
||||
scopeName: 'source.json'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-json'
|
||||
|
||||
injectionRegex: "^(json|JSON)$"
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Python'
|
||||
scopeName: 'source.python'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-python'
|
||||
|
||||
injectionRegex: '^(py|PY|python|PYTHON)$'
|
||||
|
@ -1,5 +1,5 @@
|
||||
scopeName: 'source.regexp'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-regex'
|
||||
|
||||
# TODO: Decide whether to have one regex grammar that's shared among grammars
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Ruby'
|
||||
scopeName: 'source.ruby'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-ruby'
|
||||
|
||||
injectionRegex: 'rb|ruby|RB|RUBY'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Rust'
|
||||
scopeName: 'source.rust'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-rust'
|
||||
|
||||
injectionRegex: '^(rust|RUST)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'Shell Script'
|
||||
scopeName: 'source.shell'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-bash'
|
||||
|
||||
fileTypes: [
|
||||
|
@ -1,6 +1,6 @@
|
||||
# name: 'TODO'
|
||||
scopeName: 'text.todo'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-todo'
|
||||
|
||||
injectionRegex: '^(todo|TODO)$'
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'TypeScript (React)'
|
||||
scopeName: 'source.tsx'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-typescript/tsx'
|
||||
|
||||
fileTypes: ['tsx']
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: 'TypeScript'
|
||||
scopeName: 'source.ts'
|
||||
type: 'tree-sitter-2'
|
||||
type: 'modern-tree-sitter'
|
||||
parser: 'tree-sitter-typescript/typescript'
|
||||
|
||||
fileTypes: ['ts']
|
||||
|
@ -693,10 +693,10 @@ module.exports = class GrammarRegistry {
|
||||
grammarPath,
|
||||
CSON.readFileSync(grammarPath) || {}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
createGrammar(grammarPath, params) {
|
||||
if (params.type === 'tree-sitter-2') {
|
||||
if (params.type === 'modern-tree-sitter') {
|
||||
return new WASMTreeSitterGrammar(this, grammarPath, params)
|
||||
} else if (params.type === 'tree-sitter') {
|
||||
return new TreeSitterGrammar(this, grammarPath, params);
|
||||
|
Loading…
Reference in New Issue
Block a user