aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Xiao <xi.xiao007@gmail.com>2024-08-10 11:05:48 +0300
committerGitHub <noreply@github.com>2024-08-10 10:05:48 +0200
commit9a0db4040363c0dd3a7c78c641ab7e1eddfeb567 (patch)
tree0ae9eebf2b17772cd206b8841cad77457a019580
parentbot(lockfile): update apex, asm, devicetree, idl, julia, soql, sosl, sql (diff)
downloadnvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar.gz
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar.bz2
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar.lz
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar.xz
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.tar.zst
nvim-treesitter-9a0db4040363c0dd3a7c78c641ab7e1eddfeb567.zip
feat(sflog): add sflog (Salesforce debug log) parser and highlights
Co-authored-by: xi xiao <tdxiaoxi2@gmail.com>
-rw-r--r--lockfile.json3
-rw-r--r--lua/nvim-treesitter/parsers.lua15
-rw-r--r--queries/sflog/highlights.scm48
3 files changed, 63 insertions, 3 deletions
diff --git a/lockfile.json b/lockfile.json
index ddff0a678..eda35ede1 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -659,6 +659,9 @@
"scss": {
"revision": "c478c6868648eff49eb04a4df90d703dc45b312a"
},
+ "sflog": {
+ "revision": "caffc6ebd1ab16ba4d4dec367cebb03ca2411872"
+ },
"slang": {
"revision": "d84b43d75d65bbc4ba57166ce17555f32c0b8983"
},
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 969c75fea..77e059841 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -98,7 +98,7 @@ list.apex = {
files = { "src/parser.c" },
location = "apex",
},
- maintainers = { "@aheber" },
+ maintainers = { "@aheber", "@xixiaofinland" },
}
list.arduino = {
@@ -1908,6 +1908,15 @@ list.scss = {
maintainers = { "@elianiva" },
}
+list.sflog = {
+ install_info = {
+ url = "https://github.com/aheber/tree-sitter-sfapex",
+ files = { "src/parser.c" },
+ location = "sflog",
+ },
+ maintainers = { "@aheber", "@xixiaofinland" },
+}
+
list.slang = {
install_info = {
url = "https://github.com/theHamsta/tree-sitter-slang",
@@ -1966,7 +1975,7 @@ list.soql = {
files = { "src/parser.c" },
location = "soql",
},
- maintainers = { "@aheber" },
+ maintainers = { "@aheber", "@xixiaofinland" },
}
list.sosl = {
@@ -1975,7 +1984,7 @@ list.sosl = {
files = { "src/parser.c" },
location = "sosl",
},
- maintainers = { "@aheber" },
+ maintainers = { "@aheber", "@xixiaofinland" },
}
list.sourcepawn = {
diff --git a/queries/sflog/highlights.scm b/queries/sflog/highlights.scm
new file mode 100644
index 000000000..8eeee5d24
--- /dev/null
+++ b/queries/sflog/highlights.scm
@@ -0,0 +1,48 @@
+; highlights.scm
+[
+ "|"
+ "|["
+ "]"
+ "("
+ ")"
+ "|("
+ ")|"
+] @punctuation.bracket
+
+[
+ ","
+ ";"
+ ":"
+] @punctuation.delimiter
+
+"EXTERNAL" @keyword
+
+"out of" @property
+
+(number) @number
+
+(identifier) @variable
+
+(version) @string.special
+
+(anonymous_block) @string
+
+(limit) @property
+
+(time) @function
+
+(limit
+ (identifier) @string)
+
+(event_detail
+ (event_detail_value) @string)
+
+(log_level_setting
+ (component) @type)
+
+(log_level_setting
+ (log_level) @constant)
+
+(log_entry
+ (event_identifier
+ (identifier) @type))