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/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
@@ -0,0 +1,8 @@
1
+ ((regex) @injection.content
2
+ (#set! injection.language "regex"))
3
+
4
+ ((shell) @injection.content
5
+ (#set! injection.language "bash"))
6
+
7
+ ((comment) @injection.content
8
+ (#set! injection.language "comment"))
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env -S pip install -r
2
+
3
+ tree_sitter_lsp[colorize]
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env -S pip install -r
2
+ # For unit test and code coverage rate test.
3
+
4
+ pytest-cov
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env -S pip install -r
2
+
3
+ tree-sitter
@@ -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