1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

3 Commits
2.1.0 ... main

Author SHA1 Message Date
c6a2f418e6 Code Spell Checker 插件拼写检查白名单单词 2025-07-14 14:45:00 +08:00
0d2d89329e 修复一处单词拼写错误 2025-07-14 14:41:37 +08:00
6b9ce052e9 调试时禁用其他扩展 2025-07-14 14:39:04 +08:00
4 changed files with 13 additions and 6 deletions

3
.vscode/launch.json vendored
View File

@@ -10,7 +10,8 @@
"type": "extensionHost", "type": "extensionHost",
"request": "launch", "request": "launch",
"args": [ "args": [
"--extensionDevelopmentPath=${workspaceFolder}" "--extensionDevelopmentPath=${workspaceFolder}",
"--disable-extensions", // 调试时禁用其他扩展
], ],
"outFiles": [ "outFiles": [
"${workspaceFolder}/out/**/*.js" "${workspaceFolder}/out/**/*.js"

View File

@@ -7,5 +7,11 @@
"out": true // set this to false to include "out" folder in search results "out": true // set this to false to include "out" folder in search results
}, },
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off" "typescript.tsc.autoDetect": "off",
// Code Spell Checker 插件
"cSpell.words": [
"Gitee",
"coder-xiaomo"
],
} }

View File

@@ -25,7 +25,7 @@ import { commands as pathCommands } from './core/path-convert/types/SupportPathF
import * as CyclicConversionPath from './core/path-convert/cyclic-conversion'; import * as CyclicConversionPath from './core/path-convert/cyclic-conversion';
// Common // Common
import { createStatusBarItem, updateStatusBarItemVisable } from './handler/status-bar-handler'; import { createStatusBarItem, updateStatusBarItemVisible } from './handler/status-bar-handler';
import { EOL } from './types/EOLType'; import { EOL } from './types/EOLType';
import { getUserConfigurations } from './utils/user-configuration'; import { getUserConfigurations } from './utils/user-configuration';
@@ -77,7 +77,7 @@ export function activate(context: vscode.ExtensionContext) {
} }
// 判断是否展示状态栏按钮 // 判断是否展示状态栏按钮
updateStatusBarItemVisable(selectTextLength); updateStatusBarItemVisible(selectTextLength);
// 循环转换:记录当前选中内容,并且进行转换 // 循环转换:记录当前选中内容,并且进行转换
let eol: EOL = textEditor.document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n'; let eol: EOL = textEditor.document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n';
@@ -104,7 +104,7 @@ export function activate(context: vscode.ExtensionContext) {
onTextEditorSelectionChangeCallback(textEditor, selections); onTextEditorSelectionChangeCallback(textEditor, selections);
} else { // 进入 else 的场景举例: 从[代码编辑器]切换到[设置页] } else { // 进入 else 的场景举例: 从[代码编辑器]切换到[设置页]
// 判断是否展示状态栏按钮 // 判断是否展示状态栏按钮
updateStatusBarItemVisable(selectTextLength); updateStatusBarItemVisible(selectTextLength);
} }
}); });

View File

@@ -40,7 +40,7 @@ export function createStatusBarItem() {
* *
* @since 2024-04-07 * @since 2024-04-07
*/ */
export function updateStatusBarItemVisable(selectTextLength: number) { export function updateStatusBarItemVisible(selectTextLength: number) {
let editor = vscode.window.activeTextEditor; let editor = vscode.window.activeTextEditor;
if (editor && selectTextLength > 0) { if (editor && selectTextLength > 0) {
statusBarItemList.forEach(statusBarItem => { statusBarItemList.forEach(statusBarItem => {