Skip to content

Commit da4c981

Browse files
authored
feat: Add EditorConfig support (#859)
* feat: Add EditorConfig support * try build with deps * update submodule * revert build deps
1 parent b955ffb commit da4c981

File tree

7 files changed

+68
-1
lines changed

7 files changed

+68
-1
lines changed

.github/workflows/update-grammars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- d
3838
- dart
3939
- dockerfile
40+
- editorconfig
4041
- elisp
4142
- elixir
4243
- elm

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
*.tar.gz
77
*.elc
88
*~
9+
10+
.DS_Store

.gitmodules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,4 +617,10 @@
617617
url = https://github.com/tree-sitter-grammars/tree-sitter-zig.git
618618
update = none
619619
ignore = dirty
620-
branch = master
620+
branch = master
621+
[submodule "repos/editorconfig"]
622+
path = repos/editorconfig
623+
url = https://github.com/ValdezFOmar/tree-sitter-editorconfig
624+
update = none
625+
ignore = dirty
626+
branch = main

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Add `EditorConfig` support
45

56
## 0.12.234 - 2024-11-18
67

queries/editorconfig/highlights.scm

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
(comment) @comment
2+
3+
(section
4+
(section_name) @string.special)
5+
6+
(character_choice
7+
(character) @constant)
8+
9+
(character_range
10+
start: (character) @constant
11+
end: (character) @constant)
12+
13+
[
14+
"["
15+
"]"
16+
"{"
17+
"}"
18+
] @punctuation.bracket
19+
20+
[
21+
","
22+
".."
23+
(path_separator)
24+
] @punctuation.delimiter
25+
26+
[
27+
"-"
28+
"="
29+
(negation)
30+
] @operator
31+
32+
[
33+
(wildcard_characters)
34+
(wildcard_any_characters)
35+
(wildcard_single_character)
36+
] @character.special
37+
38+
(escaped_character) @escape
39+
40+
(pair
41+
key: (identifier) @property
42+
value: (_) @string)
43+
44+
(boolean) @boolean
45+
46+
(integer) @number
47+
48+
(unset) @constant.builtin
49+
50+
[
51+
(spelling_language)
52+
(indent_style)
53+
(end_of_line)
54+
(charset)
55+
] @string.special

repos/editorconfig

Submodule editorconfig added at 511d5f3

tree-sitter-langs.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ See `tree-sitter-langs-repos'."
124124
(dockerfile-mode . dockerfile)
125125
(css-mode . css)
126126
(csv-mode . csv)
127+
(editorconfig-conf-mode . editorconfig)
127128
(elm-mode . elm)
128129
(elixir-mode . elixir)
129130
(emacs-lisp-mode . elisp)

0 commit comments

Comments
 (0)