Skill站外收录 @skilllib/skill-2117939930272412303
skill-neovim-research
专注于 Neovim 环境下的 Lua 语言开发研究,通过本地代码分析与网络文档检索,深入挖掘 API 使用模式、插件集成方案及最佳实践,为配置优化与功能扩展提供技术依据。
效率工具 AI 技能
Skills.MD
# Neovim Research Skill
Specialized research agent for Neovim configuration and Lua plugin development tasks.
## Trigger Conditions
This skill activates when:
- Task language is "lua"
- Research involves Neovim APIs, plugins, or configuration
- Codebase exploration for Lua patterns is needed
## Research Strategies
### 1. Local Codebase First
Always check existing code first:
```
1. Grep for relevant patterns in lua/ and after/
2. Glob for similar modules in lua/neotex/
3. Read existing implementations
4. Understand existing patterns before proposing new ones
```
### 2. Neovim API Research
For Neovim-specific patterns:
```
1. WebSearch "neovim lua {concept}"
2. WebFetch neovim.io documentation
3. Check existing patterns in lua/neotex/core/
4. Reference the neovim-lua.md rule for standards
```
### 3. Plugin Research
For plugin-specific patterns:
```
1. Read plugin documentation via WebFetch
2. Check existing plugin configs in lua/neotex/plugins/
3. Search GitHub repos for patterns
4. Review plugin-specific tests in tests/
```
## Research Areas
### Neovim API Patterns
- vim.api.* (buffer, window, command APIs)
- vim.fn.* (Vimscript function bridge)
- vim.opt.* (option setting)
- vim.keymap.set() (keymapping)
- vim.api.nvim_create_autocmd() (autocommands)
- vim.lsp.* (language server protocol)
### Plugin APIs
- lazy.nvim (plugin management, lazy loading)
- telescope.nvim (fuzzy finder patterns)
- nvim-treesitter (syntax parsing)
- nvim-lspconfig (LSP configuration)
- which-key.nvim (keybinding documentation)
### Lua Patterns
- Module structure (local M = {})
- Error handling (pcall)
- Table manipulation
- String patterns
- Metatable usage
### Testing Patterns
- busted framework
- plenary.nvim test utilities
- Assertion patterns (is_nil/is_not_nil for match)
- Test organization (*_spec.lua)
### Configuration Patterns
- Options organization
- Keymap centralization
- Autocommand grouping
- Plugin lazy loading strategies
## Execution Flow
```
1. Receive task context (description, focus)
2. Extract key concepts (API type, plugin, pattern)
3. Search local codebase for related patterns
4. Search web for Neovim/plugin documentation
5. Analyze implementation approaches
6. Synthesize findings
7. Create research report
8. Return results
```
## Research Report Format
Create report at `.claude/specs/{N}_{SLUG}/reports/research-{NNN}.md`:
```markdown
# Neovim Research Report: Task #{N}
**Task**: {title}
**Date**: {date}
**Focus**: {focus}
## Summary
{Overview of findings}
## Codebase Findings
### Related Files
- `lua/neotex/path/to/file.lua` - {description}
### Existing Patterns
```lua
-- Pattern name
local function example()
-- ...
end
```
### Similar Implementations
- {Description of similar code}
## Neovim API Findings
### Relevant APIs
| API | Purpose | Example |
|-----|---------|---------|
| `vim.api.nvim_*` | {purpose} | {code} |
### Best Practices
- {Practice and rationale}
## Plugin Integration
### Related Plugins
- {Plugin} - {how it relates}
### Integration Patterns
- {Pattern description}
## Recommended Approach
1. {Step 1 with specific patterns to use}
2. {Step 2}
## Code Sketch
```lua
-- Proposed implementation approach
local M = {}
function M.setup(opts)
-- ...
end
return M
```
## Testing Strategy
- Unit tests: {approach with busted}
- Integration tests: {approach with plenary}
## Potential Challenges
- {Challenge and mitigation}
## References
- {Neovim documentation links}
- {Plugin documentation links}
- {Related codebase files}
```
## Return Format
```json
{
"status": "completed",
"summary": "Found N relevant patterns for implementation",
"artifacts": [
{
"path": ".claude/specs/{N}_{SLUG}/reports/research-001.md",
"type": "research",
"description": "Neovim/Lua research report"
}
],
"patterns_found": [
{"name": "pattern_name", "location": "lua/neotex/file.lua", "relevance": "high"}
],
"apis_needed": [
"vim.api.nvim_create_autocmd",
"vim.keymap.set"
],
"plugins_relevant": [
{"name": "telescope.nvim", "relevance": "integration point"}
],
"recommended_approach": "Description of recommended approach"
}
```
## Key Resources
### Official Documentation
- https://neovim.io/doc/user/lua.html - Neovim Lua guide
- https://neovim.io/doc/user/api.html - Neovim API reference
- https://neovim.io/doc/user/lsp.html - LSP integration
### Plugin Documentation
- https://lazy.folke.io/ - lazy.nvim plugin manager
- https://github.com/nvim-telescope/telescope.nvim - Fuzzy finder
- https://github.com/nvim-treesitter/nvim-treesitter - Syntax parsing
- https://luals.github.io/ - Lua language server
### Community Resources
- https://github.com/nanotee/nvim-lua-guide - Comprehensive Lua guide
- https://github.com/rockerBOO/awesome-neovim - Plugin collection
## Key Codebase Locations
- **Entry point**: `nvim/init.lua`
- **Core config**: `nvim/lua/neotex/config/`
- **Plugin configs**: `nvim/lua/neotex/plugins/`
- **Core utilities**: `nvim/lua/neotex/core/`
- **Utilities**: `nvim/lua/neotex/util/`
- **Tests**: `nvim/tests/`
- **Standards**: `nvim/CLAUDE.md`, `nvim/docs/CODE_STANDARDS.md`
- **Rules**: `.claude/rules/neovim-lua.md`
## Quick Exploration Commands
```lua
-- Check available API functions
:lua print(vim.inspect(vim.api))
-- Check option values
:lua print(vim.inspect(vim.opt.tabstop:get()))
-- Check loaded modules
:lua print(vim.inspect(package.loaded))
-- Find keymap conflicts
:verbose map <key>
```
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「skill-neovim-research」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次