搜索

PythonReactSEOPDF
GitHub Skill

vimcompletion

Autocompletion and Snippets usage

khulnasoft☆ 0 仓库 Stars4 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Neovim Completion & Snippets Skills

This document covers the autocompletion engine (nvim-cmp) and snippet engine (LuaSnip).


Autocompletion (hrsh7th/nvim-cmp)

The framework for autocompletion.

Mapping (Insert Mode)
  • <C-p>: Select previous item.
  • <C-n>: Select next item.
  • <C-y>: Confirm selection.
  • <C-Space>: Explicitly trigger completion.
Completion Sources
  • copilot: AI-powered suggestions.
  • nvim_lsp: Suggestions from the LSP.
  • luasnip: Snippet expansions.
  • buffer: Words from the current buffer.

Snippets (L3MON4D3/LuaSnip)

Advanced snippet engine for fast code expansion.

Keybindings (Insert/Select Mode)
  • <C-s>e: Expand current snippet.
  • <C-s>;: Jump to the next companion placeholder in a snippet.
  • <C-s>,: Jump to the previous placeholder.
  • <C-E>: Cycle through alternative choices in a snippet.
Snippet Packs
  • Friendly Snippets: A massive collection of ready-to-use snippets for most languages.

API Reference (LuaSnip)

local ls = require("luasnip")

ls.expand()                     -- Expand snippet
ls.jump(1)                      -- Jump forward
ls.jump(-1)                     -- Jump backward
ls.choice_active()              -- Check if choice node is active
ls.change_choice(1)             -- Change choice

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!