tree-sitter-muttrc 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cmake-format.yaml +2 -0
- package/.cmakelintrc +1 -0
- package/.github/FUNDING.yml +6 -0
- package/.github/workflows/main.yml +152 -0
- package/.gitlint +5 -0
- package/.pre-commit-config.yaml +112 -0
- package/.yamllint.yaml +8 -0
- package/CMakeLists.txt +38 -0
- package/Cargo.toml +26 -0
- package/README.md +83 -0
- package/binding.gyp +16 -0
- package/bindings/node/binding.cc +28 -0
- package/bindings/node/index.js +19 -0
- package/bindings/python/tree_sitter_muttrc/__init__.py +42 -0
- package/bindings/python/tree_sitter_muttrc/__main__.py +60 -0
- package/bindings/python/tree_sitter_muttrc/py.typed +0 -0
- package/bindings/rust/build.rs +40 -0
- package/bindings/rust/lib.rs +52 -0
- package/grammar.js +520 -0
- package/package.json +28 -0
- package/pyproject.toml +124 -0
- package/queries/highlights.scm +53 -0
- package/queries/injections.scm +8 -0
- package/requirements/colorize.txt +3 -0
- package/requirements/dev.txt +4 -0
- package/requirements.txt +3 -0
- package/scripts/build.sh +8 -0
- package/src/grammar.json +3905 -0
- package/src/node-types.json +7353 -0
- package/src/parser.c +20578 -0
- package/src/tree_sitter/parser.h +224 -0
- package/templates/class.txt +2 -0
- package/templates/def.txt +12 -0
- package/templates/noarg.txt +1 -0
- package/test/corpus/example.txt +82 -0
- package/tests/neomuttrc +20 -0
- package/tests/test___init__.py +22 -0
package/pyproject.toml
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["scikit-build-core"]
|
|
3
|
+
build-backend = "scikit_build_core.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tree-sitter-muttrc"
|
|
7
|
+
description = "muttrc grammar for tree-sitter"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
# sysconfig.get_preferred_scheme()
|
|
10
|
+
requires-python = ">= 3.10"
|
|
11
|
+
keywords = ["parsing", "incremental"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Topic :: Software Development :: Build Tools",
|
|
16
|
+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
17
|
+
"Operating System :: Microsoft :: Windows",
|
|
18
|
+
"Operating System :: POSIX",
|
|
19
|
+
"Operating System :: Unix",
|
|
20
|
+
"Operating System :: MacOS",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.7",
|
|
24
|
+
"Programming Language :: Python :: 3.8",
|
|
25
|
+
"Programming Language :: Python :: 3.9",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
30
|
+
"Programming Language :: Python :: Implementation :: PyPy",
|
|
31
|
+
]
|
|
32
|
+
# dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
33
|
+
# https://github.com/pypa/twine/issues/753
|
|
34
|
+
dynamic = ["version"]
|
|
35
|
+
dependencies = ["tree-sitter"]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = ["pytest-cov"]
|
|
39
|
+
colorize = ["tree_sitter_lsp"]
|
|
40
|
+
|
|
41
|
+
[[project.authors]]
|
|
42
|
+
name = "Wu Zhenyu"
|
|
43
|
+
email = "wuzhenyu@ustc.edu"
|
|
44
|
+
|
|
45
|
+
[project.license]
|
|
46
|
+
text = "GPL v3"
|
|
47
|
+
|
|
48
|
+
[project.urls]
|
|
49
|
+
Homepage = "https://tree-sitter-muttrc.readthedocs.io"
|
|
50
|
+
Download = "https://github.com/neomutt/tree-sitter-muttrc/releases"
|
|
51
|
+
"Bug Report" = "https://github.com/neomutt/tree-sitter-muttrc/issues"
|
|
52
|
+
Source = "https://github.com/neomutt/tree-sitter-muttrc"
|
|
53
|
+
|
|
54
|
+
[tool.scikit-build]
|
|
55
|
+
experimental = true
|
|
56
|
+
|
|
57
|
+
[tool.scikit-build.metadata.version]
|
|
58
|
+
provider = "scikit_build_core.metadata.setuptools_scm"
|
|
59
|
+
|
|
60
|
+
[tool.scikit-build.sdist]
|
|
61
|
+
include = ["bindings/python/tree_sitter_muttrc/_version.py", "py.typed"]
|
|
62
|
+
|
|
63
|
+
[tool.scikit-build.wheel]
|
|
64
|
+
packages = ["bindings/python/tree_sitter_muttrc"]
|
|
65
|
+
|
|
66
|
+
[tool.setuptools.dynamic.dependencies]
|
|
67
|
+
file = "requirements.txt"
|
|
68
|
+
|
|
69
|
+
# begin: scripts/update-pyproject.toml.pl
|
|
70
|
+
[tool.setuptools.dynamic.optional-dependencies.dev]
|
|
71
|
+
file = "requirements/dev.txt"
|
|
72
|
+
# end: scripts/update-pyproject.toml.pl
|
|
73
|
+
|
|
74
|
+
[tool.setuptools_scm]
|
|
75
|
+
write_to = "bindings/python/tree_sitter_muttrc/_version.py"
|
|
76
|
+
|
|
77
|
+
[tool.mdformat]
|
|
78
|
+
number = true
|
|
79
|
+
|
|
80
|
+
[tool.codespell]
|
|
81
|
+
ignore-words-list = "crate"
|
|
82
|
+
|
|
83
|
+
[tool.doq]
|
|
84
|
+
template_path = "templates"
|
|
85
|
+
|
|
86
|
+
[tool.ruff]
|
|
87
|
+
line-length = 79
|
|
88
|
+
|
|
89
|
+
[tool.ruff.lint]
|
|
90
|
+
select = [
|
|
91
|
+
# pycodestyle
|
|
92
|
+
"E",
|
|
93
|
+
# pyflakes
|
|
94
|
+
"F",
|
|
95
|
+
# pyupgrade
|
|
96
|
+
"UP",
|
|
97
|
+
# flake8-bugbear
|
|
98
|
+
"B",
|
|
99
|
+
# flake8-simplify
|
|
100
|
+
"SIM",
|
|
101
|
+
# isort
|
|
102
|
+
"I",
|
|
103
|
+
]
|
|
104
|
+
ignore = ["D205", "D400"]
|
|
105
|
+
preview = true
|
|
106
|
+
|
|
107
|
+
[tool.ruff.format]
|
|
108
|
+
docstring-code-format = true
|
|
109
|
+
preview = true
|
|
110
|
+
|
|
111
|
+
[tool.coverage.report]
|
|
112
|
+
exclude_lines = [
|
|
113
|
+
"if TYPE_CHECKING:",
|
|
114
|
+
"if __name__ == .__main__.:",
|
|
115
|
+
"\\s*import tomli as tomllib",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
[tool.cibuildwheel]
|
|
119
|
+
archs = ["all"]
|
|
120
|
+
skip = "*37-* *38-* *39-*"
|
|
121
|
+
# https://github.com/pypa/cibuildwheel/issues/287#issuecomment-1937451870
|
|
122
|
+
test-skip = "*-win32 *-macosx_*"
|
|
123
|
+
before-test = "pip install -rrequirements.txt -rrequirements/dev.txt"
|
|
124
|
+
test-command = "pytest {project}"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
; Comments
|
|
2
|
+
(comment) @comment @spell
|
|
3
|
+
|
|
4
|
+
; General
|
|
5
|
+
(int) @number
|
|
6
|
+
|
|
7
|
+
(string) @string
|
|
8
|
+
|
|
9
|
+
[
|
|
10
|
+
(map)
|
|
11
|
+
(object)
|
|
12
|
+
(composeobject)
|
|
13
|
+
(color)
|
|
14
|
+
(attribute)
|
|
15
|
+
] @string.special
|
|
16
|
+
|
|
17
|
+
(quadoption) @boolean
|
|
18
|
+
|
|
19
|
+
(path) @string.special.path
|
|
20
|
+
|
|
21
|
+
(regex) @string.regexp
|
|
22
|
+
|
|
23
|
+
[
|
|
24
|
+
(option)
|
|
25
|
+
(command_line_option)
|
|
26
|
+
] @variable.builtin
|
|
27
|
+
|
|
28
|
+
(command) @keyword
|
|
29
|
+
|
|
30
|
+
(source_directive
|
|
31
|
+
(command) @keyword.import)
|
|
32
|
+
|
|
33
|
+
(uri) @string.special.url
|
|
34
|
+
|
|
35
|
+
(key_name) @type.builtin
|
|
36
|
+
|
|
37
|
+
(escape) @string.escape
|
|
38
|
+
|
|
39
|
+
(function) @function.call
|
|
40
|
+
|
|
41
|
+
; Literals
|
|
42
|
+
[
|
|
43
|
+
"<"
|
|
44
|
+
">"
|
|
45
|
+
] @punctuation.bracket
|
|
46
|
+
|
|
47
|
+
"," @punctuation.delimiter
|
|
48
|
+
|
|
49
|
+
[
|
|
50
|
+
"&"
|
|
51
|
+
"?"
|
|
52
|
+
"*"
|
|
53
|
+
] @punctuation.special
|
package/requirements.txt
ADDED
package/scripts/build.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
cd "$(dirname "$(readlink -f "$0")")/.."
|
|
4
|
+
|
|
5
|
+
tree-sitter generate
|
|
6
|
+
cmake -Bbuild -DCMAKE_INSTALL_FULL_LIBDIR="${1:-$HOME/.local/share/nvim/repos/github.com/nvim-treesitter/nvim-treesitter}"
|
|
7
|
+
cmake --build build
|
|
8
|
+
cmake --install build
|