Skip to content

Commit

Permalink
feat: Add EditorConfig support (#859)
Browse files Browse the repository at this point in the history
* feat: Add EditorConfig support

* try build with deps

* update submodule

* revert build deps
  • Loading branch information
jcs090218 authored Nov 20, 2024
1 parent b955ffb commit da4c981
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/update-grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- d
- dart
- dockerfile
- editorconfig
- elisp
- elixir
- elm
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
*.tar.gz
*.elc
*~

.DS_Store
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,10 @@
url = https://github.com/tree-sitter-grammars/tree-sitter-zig.git
update = none
ignore = dirty
branch = master
branch = master
[submodule "repos/editorconfig"]
path = repos/editorconfig
url = https://github.com/ValdezFOmar/tree-sitter-editorconfig
update = none
ignore = dirty
branch = main
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Add `EditorConfig` support

## 0.12.234 - 2024-11-18

Expand Down
55 changes: 55 additions & 0 deletions queries/editorconfig/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
(comment) @comment

(section
(section_name) @string.special)

(character_choice
(character) @constant)

(character_range
start: (character) @constant
end: (character) @constant)

[
"["
"]"
"{"
"}"
] @punctuation.bracket

[
","
".."
(path_separator)
] @punctuation.delimiter

[
"-"
"="
(negation)
] @operator

[
(wildcard_characters)
(wildcard_any_characters)
(wildcard_single_character)
] @character.special

(escaped_character) @escape

(pair
key: (identifier) @property
value: (_) @string)

(boolean) @boolean

(integer) @number

(unset) @constant.builtin

[
(spelling_language)
(indent_style)
(end_of_line)
(charset)
] @string.special
1 change: 1 addition & 0 deletions repos/editorconfig
Submodule editorconfig added at 511d5f
1 change: 1 addition & 0 deletions tree-sitter-langs.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ See `tree-sitter-langs-repos'."
(dockerfile-mode . dockerfile)
(css-mode . css)
(csv-mode . csv)
(editorconfig-conf-mode . editorconfig)
(elm-mode . elm)
(elixir-mode . elixir)
(emacs-lisp-mode . elisp)
Expand Down

0 comments on commit da4c981

Please sign in to comment.