-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Pacman *.install files
- Loading branch information
Showing
9 changed files
with
227 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo | ||
bar | ||
baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# The function is run right before files are extracted. | ||
# One argument is passed: new package version. | ||
pre_install() { | ||
: | ||
} | ||
|
||
# The function is run right after files are extracted. | ||
# One argument is passed: new package version. | ||
post_install() { | ||
: | ||
} | ||
|
||
# The function is run right before files are extracted. | ||
# Two arguments are passed in the following order: | ||
# new package version, old package version. | ||
pre_upgrade() { | ||
: | ||
} | ||
|
||
# The function is run right after files are extracted. | ||
# Two arguments are passed in the following order: | ||
# new package version, old package version. | ||
post_upgrade() { | ||
: | ||
} | ||
|
||
# The function is run right before files are removed. | ||
# One argument is passed: old package version. | ||
pre_remove() { | ||
: | ||
} | ||
|
||
# The function is run right after files are removed. | ||
# One argument is passed: old package version. | ||
post_remove() { | ||
: | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
extension/share/language/pacman-install-script.language-configuration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"comments": { | ||
"lineComment": "#" | ||
}, | ||
"brackets": [ | ||
[ | ||
"{", | ||
"}" | ||
], | ||
[ | ||
"[", | ||
"]" | ||
], | ||
[ | ||
"(", | ||
")" | ||
] | ||
], | ||
"autoClosingPairs": [ | ||
[ | ||
"{", | ||
"}" | ||
], | ||
[ | ||
"[", | ||
"]" | ||
], | ||
[ | ||
"(", | ||
")" | ||
], | ||
{ | ||
"open": "\"", | ||
"close": "\"", | ||
"notIn": [ | ||
"string" | ||
] | ||
}, | ||
{ | ||
"open": "'", | ||
"close": "'", | ||
"notIn": [ | ||
"string" | ||
] | ||
}, | ||
{ | ||
"open": "`", | ||
"close": "`", | ||
"notIn": [ | ||
"string" | ||
] | ||
} | ||
], | ||
"surroundingPairs": [ | ||
[ | ||
"{", | ||
"}" | ||
], | ||
[ | ||
"[", | ||
"]" | ||
], | ||
[ | ||
"(", | ||
")" | ||
], | ||
[ | ||
"\"", | ||
"\"" | ||
], | ||
[ | ||
"'", | ||
"'" | ||
], | ||
[ | ||
"`", | ||
"`" | ||
] | ||
], | ||
"folding": { | ||
"markers": { | ||
"start": "^\\s*#\\s*#?region\\b.*", | ||
"end": "^\\s*#\\s*#?endregion\\b.*" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
extension/share/language/pacman-install-script.tmLanguage.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "pacman-install-script", | ||
"scopeName": "source.shell.install-script.pacman", | ||
"uuid": "04125485-6333-4e94-aad4-6b5983795a02", | ||
"comment": "Pacman *.install script", | ||
"patterns": [ | ||
{ | ||
"include": "source.shell" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import { DocumentFilter, languages, LanguageStatusItem } from "vscode"; | ||
|
||
export const LANGUAGE_SELECTOR: DocumentFilter = { language: "aur-pkgbuild" }; | ||
export const PKGBUILD_SELECTOR: DocumentFilter = { language: "aur-pkgbuild" }; | ||
|
||
export const statusItem: LanguageStatusItem = languages | ||
export const pkgbuildStatusItem: LanguageStatusItem = languages | ||
.createLanguageStatusItem( | ||
"aur-pkgbuild.status.item", | ||
LANGUAGE_SELECTOR, | ||
PKGBUILD_SELECTOR, | ||
); | ||
|
||
export const PACMAN_INSTALL_SCRIPT_SELECTOR: DocumentFilter = { | ||
language: "pacman-install-script", | ||
}; | ||
|
||
export const pacmanInstallScriptStatusItem: LanguageStatusItem = languages | ||
.createLanguageStatusItem( | ||
"pacman-install-script", | ||
PACMAN_INSTALL_SCRIPT_SELECTOR, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters