nvim-config
Update and debug Neovim/Nixvim configuration in these dotfiles, especially LSP/completion/editing behavior for TypeScript/TSX, blink.cmp, nvim-autopairs…
от dejanr★ 15 звёзд на GitHub
Установить nvim-config в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Neovim Config Skill
Use this when the user asks to change, debug, or improve Neovim behavior in this dotfiles repository.
Repository Layout
Neovim is configured with Nixvim under:
modules/home/cli/nixvim/
├── default.nix # imports core config and plugins
├── settings.nix # vim options
├── keymaps.nix # global keymaps
├── autocmds.nix # autocmds
├── lua/ # Lua helper modules copied into runtime
└── plugins/
├── completion/blink-cmp.nix # completion UI and sources
├── editor/nvim-autopairs.nix
├── editor/treesitter.nix
└── lsp/lspconfig.nix # LSP servers and ts_ls prefs
The standalone nvim package is exposed by flake.nix as:
nix build .#nvim --no-link
nix run .#nvim
Pi skills are managed by Nix from:
modules/home/cli/pi-dev/skills/<skill-name>/SKILL.md
~/.pi/agent/skills is a read-only symlink into the built Home Manager profile.
Investigation Workflow
1. Start From the Symptom, Not Assumptions
For screenshots, read the image first:
read /tmp/pi-clipboard-...png
Identify whether the behavior is caused by:
ts_ls/ TypeScript language serverblink.cmpfiltering, sorting, trigger behavior, snippets, or keymaps- another LSP source such as
emmet_lsortailwindcss nvim-autopairs- project TypeScript types/config
Do not change config until you know which layer is responsible.
2. Inspect Relevant Config and Project Types
Useful files:
rg -n "blink|cmp|ts_ls|typescript|emmet|autopairs|jsx" modules/home/cli/nixvim -S
For TypeScript/TSX completion issues, inspect:
modules/home/cli/nixvim/plugins/lsp/lspconfig.nixmodules/home/cli/nixvim/plugins/completion/blink-cmp.nix- the component definition being completed
- project
tsconfig.json/package.json
Example project checks:
fd -a 'tsconfig.*|package.json' <project-root> -d 3
3. Verify Attached LSP Clients
Use headless nvim from the project root/file:
cd <project>
nvim --headless path/to/file.tsx +'lua vim.defer_fn(function()
print("ft=" .. vim.bo.filetype)
for _, c in ipairs(vim.lsp.get_clients({ bufnr = 0 })) do
print("client=" .. c.name .. " root=" .. tostring(c.config.root_dir))
print("completion=" .. tostring(c.server_capabilities.completionProvider ~= nil))
end
vim.cmd("qa!")
end, 3000)'
If ts_ls is attached and returns completions via raw LSP requests, the issue is usually completion UI/source behavior rather than TypeScript itself.
4. Query Raw LSP Completions
Use vim.lsp.buf_request_sync to compare what each client returns at a position:
cd <project>
nvim --headless path/to/file.tsx +'lua vim.defer_fn(function()
local params = {
textDocument = vim.lsp.util.make_text_document_params(0),
position = { line = 95, character = 59 },
context = { triggerKind = 1 },
}
local res = vim.lsp.buf_request_sync(0, "textDocument/completion", params, 5000)
for id, r in pairs(res or {}) do
local client = vim.lsp.get_client_by_id(id)
local items = (r.result and (r.result.items or r.result)) or {}
print("client", client and client.name, "count", #items)
for i, it in ipairs(items) do
if i <= 20 then
print(i, it.label, it.kind, it.detail or "", vim.inspect(it.textEdit or it.insertText))
end
end
end
vim.cmd("qa!")
end, 3000)'
Use this to distinguish:
- TS LSP does not provide item → project/types/server issue
- TS LSP provides item but UI does not show it → blink/source/filter/sort/cache issue
- Emmet provides weird first item → filter/demote Emmet in JSX attribute contexts
5. Inspect Resolved Completion Details
Some TS completion detail is only available after completionItem/resolve:
local resolved = client:request_sync("completionItem/resolve", item, 5000, 0)
print(vim.inspect(resolved and resolved.result))
This is useful for JSX prop types such as:
(property) align?: "start" | "center" | ... | null | undefined
Patterns From This Session
TypeScript JSX prop names vs prop values
- Prop values (
align="...") can work while prop names do not. - TS LSP intentionally does not suggest duplicate JSX props. If
<Flex direction="row" ... direct>,direction?will not be suggested again. - TS LSP may return JSX prop names, but
blink.cmpcan hide them due to source behavior or Emmet competition.
Blink LSP capabilities
Enable blink's LSP capabilities so TypeScript returns richer completion metadata:
plugins.blink-cmp = {
enable = true;
setupLspCapabilities = true;
};
JSX prop name triggering
Space-triggered LSP completion looked attractive, but caused bad cached TS results and left only Emmet/buffer suggestions. Keep space blocked and use normal keyword/manual triggers:
completion.trigger.show_on_blocked_trigger_characters = [
" "
"\n
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл nvim-config?
Update and debug Neovim/Nixvim configuration in these dotfiles, especially LSP/completion/editing behavior for TypeScript/TSX, blink.cmp, nvim-autopairs, ts_ls, Emmet, and related plugins.
Как установить скилл nvim-config?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nvim-config запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…