Add basic auto-completion to Neovim and comprehensive documentation
- Add nvim-cmp plugin with buffer and path completion sources - Configure intuitive keybindings for completion navigation: * Ctrl+Space to trigger completion manually * Tab/Shift+Tab for menu navigation * Enter to accept completion, Ctrl+e to close menu - Enable autoEnableSources for automatic plugin management - Add comprehensive "Code Editing & Auto-completion" section to README: * Document all key features: Gruvbox theme, Tree-sitter, file explorer * Provide complete auto-completion usage guide with keybindings * Include essential keybinding reference for file operations, clipboard, git * Explain completion sources: buffer words and file path suggestions Benefits: - Simple, non-intrusive auto-completion without language servers - Word completion from open buffers for faster typing - Path completion for file navigation and imports - Clear documentation for all Neovim features and keybindings - Follows standard completion UI patterns users expect 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f7f6d117c7
commit
3e938daef8
2 changed files with 78 additions and 0 deletions
|
|
@ -86,6 +86,27 @@
|
|||
render-markdown = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Basic auto-completion
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "buffer"; } # Words from open buffers
|
||||
{ name = "path"; } # File system paths
|
||||
];
|
||||
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()"; # Trigger completion manually
|
||||
"<C-e>" = "cmp.mapping.close()"; # Close completion menu
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })"; # Accept selected completion
|
||||
"<Tab>" = "cmp.mapping.select_next_item()"; # Navigate down in menu
|
||||
"<S-Tab>" = "cmp.mapping.select_prev_item()"; # Navigate up in menu
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Extra plugins that don't have dedicated modules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue