mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-10-27 11:42:41 +03:00
477b075db5
To make https://github.com/atom-community/atom/pull/386 reviewable, that pr will be separated into many simpler prs. This is one of them. This first commit does the following: - update package.json - update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json` - update packages/README.md - clone all language packages. Specifically: - `mkdir packages/language-<all of them>` - `cd packages/about` - For all languages: - `cd ../language-<>` - `git clone language-<>` - Move all files except `.git` from `language-<>/language-<>` to `language-<>` - delete `language-<>/language-<>` Since at first I accidentally updated `dependencies` then `packageDependencies`, it appears that since the versions of language-c, language-css, language-go, language-javascript, and language-sass don't match, `dependencies` was reset for those versions. [Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass), which [currently breaks atom](https://github.com/atom/atom/issues/22129). So even though their repos are now in `packages`, **I've decided to not use them**. This is done by updating `packageDependencies` only for non-breaking languages.
115 lines
2.6 KiB
Plaintext
115 lines
2.6 KiB
Plaintext
# This grammar file is responsible for including the actual PHP grammar
|
|
# by capturing <?php ?> tags
|
|
'scopeName': 'text.html.php'
|
|
'name': 'PHP'
|
|
'fileTypes': [
|
|
'aw'
|
|
'ctp'
|
|
'inc'
|
|
'install'
|
|
'module'
|
|
'php'
|
|
'php_cs'
|
|
'php3'
|
|
'php4'
|
|
'php5'
|
|
'phpt'
|
|
'phtml'
|
|
'profile'
|
|
]
|
|
'firstLineMatch': '''(?x)
|
|
# Hashbang
|
|
^\\#!.*(?:\\s|\\/)
|
|
php\\d?
|
|
(?:$|\\s)
|
|
|
|
|
# Modeline
|
|
(?i:
|
|
# Emacs
|
|
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
|
|
php
|
|
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
|
|
|
|
|
# Vim
|
|
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=
|
|
(?:php|phtml)
|
|
(?=\\s|:|$)
|
|
)
|
|
|
|
|
# Regular opening PHP tags
|
|
^\\s*<\\?(?i:php|=|\\s|$)
|
|
'''
|
|
'foldingStartMarker': '(/\\*|\\{\\s*$|<<<HTML)'
|
|
'foldingStopMarker': '(\\*/|^\\s*\\}|^HTML;)'
|
|
'injections':
|
|
'text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js.embedded.html - (meta.embedded.block.php | meta.embedded.line.php))':
|
|
'patterns': [
|
|
{
|
|
'include': '#php-tag'
|
|
}
|
|
]
|
|
'L:meta.embedded.php.blade':
|
|
'patterns': [
|
|
{
|
|
"include": "text.html.basic"
|
|
}
|
|
{
|
|
'include': 'text.html.php.blade#blade'
|
|
}
|
|
]
|
|
'patterns': [
|
|
{
|
|
'begin': '\\A#!'
|
|
'beginCaptures':
|
|
'0':
|
|
'name': 'punctuation.definition.comment.php'
|
|
'end': '$'
|
|
'name': 'comment.line.shebang.php'
|
|
}
|
|
{
|
|
'include': 'text.html.basic'
|
|
}
|
|
]
|
|
'repository':
|
|
'php-tag':
|
|
'patterns': [
|
|
{
|
|
'begin': '<\\?(?i:php|=)?(?![^?]*\\?>)'
|
|
'beginCaptures':
|
|
'0':
|
|
'name': 'punctuation.section.embedded.begin.php'
|
|
'end': '(\\?)>'
|
|
'endCaptures':
|
|
'0':
|
|
'name': 'punctuation.section.embedded.end.php'
|
|
'1':
|
|
'name': 'source.php'
|
|
'name': 'meta.embedded.block.php'
|
|
'contentName': 'source.php'
|
|
'patterns': [
|
|
{
|
|
'include': 'source.php'
|
|
}
|
|
]
|
|
}
|
|
{
|
|
'begin': '<\\?(?i:php|=)?'
|
|
'beginCaptures':
|
|
'0':
|
|
'name': 'punctuation.section.embedded.begin.php'
|
|
'end': '(\\?)>'
|
|
'endCaptures':
|
|
'0':
|
|
'name': 'punctuation.section.embedded.end.php'
|
|
'1':
|
|
'name': 'source.php'
|
|
'name': 'meta.embedded.line.php'
|
|
'contentName': 'source.php'
|
|
'patterns': [
|
|
{
|
|
'include': 'source.php'
|
|
}
|
|
]
|
|
}
|
|
]
|