2026-04-29
VSCode Neovim - Prevent Output Panel from Stealing Focus
2026-04-29 ~ 2026-04-29

The note is generated by Opus-4.7

Problem

When using the vscode-neovim extension, the VSCode Output panel automatically reveals and steals focus from the terminal whenever Neovim logs appear.

Root Cause

In src/messages_manager.ts, the extension calls this.channel.show(true) (which reveals and focuses the Output panel) whenever the number of lines in a Neovim message exceeds cmdheight:

1
2
3
4
5
6
const lineCount = outputMsg.split("\n").length;
const cmdheight = (await this.main.client.getOption("cmdheight")) as number;

if (lineCount > cmdheight) {
  this.channel.show(true);
}
  • cmdheight=0 (default when ext_messages is enabled): every message exceeds 0 lines → Output panel steals focus on every log
  • cmdheight=1: only messages with more than 1 line trigger the Output panel
  • cmdheight=N: only messages exceeding N lines trigger it

Fix

Set cmdheight=1 in the VSCode-specific Neovim config (~/.config/nvim/lua/plugins/vscode.lua):

2025-11-07
SSH自动登录与debug
2025-11-07 ~ 2025-11-07


The note is generated by “DeepSeek”.

一、基础设置步骤

1. 生成 SSH 密钥对(客户端)

1
2
ssh-keygen -t rsa -b 4096
# 默认保存位置:~/.ssh/id_rsa (私钥) 和 ~/.ssh/id_rsa.pub (公钥)

2. 复制公钥到服务器

方法一:使用 ssh-copy-id(推荐)

2025-10-06
vscode常用设置
2025-10-06 ~ 2025-10-06

行号设置

VS Code 内置行号有三种模式:

  • "off":不显示行号
  • "on":绝对行号
  • "relative":相对行号
    设置方式(以"relative"为例):
  1. 打开设置(Ctrl + ,
  2. 搜索 line numbers
  3. 找到 Editor: Line Numbers,选择 relative

或者在 settings.json 里写:

2025-10-06
Inspect Editor Tokens and Scopes
2025-10-06 ~ 2025-10-06

❗️The note is generated by DeepSeek.

Developer: Inspect Editor Tokens and Scopes 是 VSCode 中一个非常实用的开发者工具命令,它可以帮助你深入了解代码在编辑器中的语法标记和范围信息。

🎯 命令用途

这个命令主要用于:

  • 诊断语法高亮问题 - 找出为什么某些代码没有按预期显示颜色
  • 自定义主题配置 - 获取准确的 scope 名称来修改特定语法元素的样式
  • 理解语法结构 - 了解代码如何被解析和标记

🔧 使用方法

  1. 打开命令面板