Skip to content

Commit

Permalink
update: 更新vscode开发记录
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Aug 10, 2023
1 parent 61a898d commit 73ee6bc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/src/problem/vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@ title: vscode 开发问题记录

在命令面板中输入`Developer: Inspect Editor Tokens and Scopes`或者使用快捷键启动作用域检查器。

![](https://code.visualstudio.com/assets/api/language-extensions/syntax-highlighting/scope-inspector.png)
![](https://code.visualstudio.com/assets/api/language-extensions/syntax-highlighting/scope-inspector.png)

## 获取lineText的方式

### 通过Range的方式

- `document.getText(document.lineAt(position).range)`

### 通过Position的方式

- `document.lineAt(position.line).text.trim()`

0 comments on commit 73ee6bc

Please sign in to comment.