根据配置控制自动格式化功能

- 在onTypeFormattingProvider.ts中添加配置检查,根据squirrel.autoFormatOnType配置项决定是否执行输入时自动格式化
- 在documentFormattingProvider.ts中添加配置检查,根据squirrel.autoFormatOnType配置项决定是否执行文档格式化
- 保持配置项的默认值为false(禁用),用户需主动启用此功能

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
睿 安
2025-10-03 20:48:35 +08:00
parent aaf84bc264
commit a26baaf66a
7 changed files with 35 additions and 2 deletions

View File

@@ -127,6 +127,11 @@
"type": "number",
"default": 26000,
"description": "本地C++服务端口用于发送保存的NUT文件"
},
"squirrel.autoFormatOnType": {
"type": "boolean",
"default": false,
"description": "是否在编辑时自动格式化代码"
}
}
}