REFACTOR: Annotations for autocompletion, reworked how projects are made

and handled, wrote the c file replacing the copied python code.
This commit is contained in:
2026-10-22 04:29:52 -04:00
parent 3bb97d833b
commit 685a711644
13 changed files with 373 additions and 178 deletions
+6 -6
View File
@@ -6,7 +6,7 @@ return {
===================================================================== --]]
main = vim.trim([=[
def main() -> None:
print("Hello from %s!")
print("Hello from __PROJECT_NAME__!")
if __name__ == "__main__":
@@ -19,7 +19,7 @@ if __name__ == "__main__":
Target: src/{project_name}/__init__.py
===================================================================== --]]
__init__ = vim.trim([=[
# %s init
# __PROJECT_NAME__ init
__all__: list[str] = []
]=]) .. "\n",
@@ -35,15 +35,15 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "%s"
name = "__PROJECT_NAME__"
version = "0.1.0"
description = "Project %s"
description = "Project __PROJECT_NAME__"
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
[project.scripts]
%s = "%s.main:main"
__PROJECT_NAME__ = "__PROJECT_NAME__.main:main"
]=]) .. "\n",
--[[ =====================================================================
@@ -53,7 +53,7 @@ dependencies = []
===================================================================== --]]
module = vim.trim([=[
"""
Module: %s
Module: __PROJECT_NAME__
"""
]=]) .. "\n",
}