feat(installer): 更新安装器版本号至1.0.1

feat(editor): 为高级编辑器添加Python语法高亮支持
- 新增python.lua语法定义文件
- 实现根据文件扩展名自动选择语法高亮

feat(pkg): 添加GitHub包安装支持
- 支持从GitHub仓库直接安装包
- 新增GitHub API基础URL配置
- 实现包元数据和文件下载功能
- 自动处理包版本和依赖关系

docs: 添加chest_sorter教程文档
- 新增chest_sorter_tutorial.md帮助文件

chore: 更新代码统计信息
- 添加VSCodeCounter生成的代码统计文件
This commit is contained in:
2025-09-09 16:56:51 +08:00
parent 1e67ea4645
commit 55d8b8b120
13 changed files with 977 additions and 3 deletions

View File

@@ -86,8 +86,17 @@ local function redraw()
win.setVisible(true)
end
local function getSyntaxFile(fileName)
local ext = string.match(fileName, "%.([^%.]+)$") or ""
local syntaxFiles = {
lua = "/leonos/modules/main/edit/syntax/lua.lua",
py = "/leonos/modules/main/edit/syntax/python.lua"
}
return syntaxFiles[ext] or syntaxFiles.lua
end
local syntax = require("edit.syntax")
.new("/leonos/modules/main/edit/syntax/lua.lua")
.new(getSyntaxFile(file))
local function rehighlight()
local line = {}