fix(nvim): migrate to Neovim 0.12 compatible APIs

- lsp: replace deprecated require('lspconfig') with vim.lsp.config +
  vim.lsp.enable (native Neovim 0.11+ API)
- lsp: replace removed mason-lspconfig setup_handlers with
  get_installed_servers() loop
- lsp: fix client.supports_method -> client:supports_method (colon syntax)
- lsp: replace jsonls on_new_config with inline pcall schemastore loading
- ui: disable lang='vim' in noice cmdline to fix treesitter 'tab' node
  error on Neovim 0.12 (vim grammar removed 'tab' node type)
- ui: extend noice route filter to cover both msg_show and notify events

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-08 14:52:45 +08:00
parent 6fd5d96043
commit ed9800ce66
2 changed files with 35 additions and 30 deletions

View File

@@ -241,15 +241,23 @@ return {
signature = { enabled = false }, -- blink.cmp 处理签名
progress = { enabled = true, format_done = "" },
},
-- 禁用 vim 命令行的 treesitter 语法高亮Neovim 0.12 的 vim grammar 移除了 "tab" 节点类型)
cmdline = {
format = {
cmdline = { pattern = "^:", icon = "" },
},
},
routes = {
{
-- 屏蔽 treesitter query 字段兼容性警告(Neovim 0.12 校验更严格,功能不受影响
-- 屏蔽 treesitter query 兼容性警告(msg_show 和 notify 两种来源
filter = {
event = "msg_show",
any = {
{ find = "Invalid field name" },
{ find = "Invalid node type" },
{ find = "Query error" },
{ event = "msg_show", find = "Query error" },
{ event = "msg_show", find = "Invalid field name" },
{ event = "msg_show", find = "Invalid node type" },
{ event = "notify", find = "Query error" },
{ event = "notify", find = "Invalid field name" },
{ event = "notify", find = "Invalid node type" },
},
},
opts = { skip = true },