Add dictionary autocompletion to neovim without spell checking
- Add cmp-dictionary plugin to extraPlugins for English word completion - Configure dictionary source in nvim-cmp with keyword_length = 2 - Set up dictionary paths pointing to /usr/share/dict/words - Enable case-insensitive matching for better user experience - Completion triggers after 2+ characters for performance optimization This provides English word autocompletion without enabling vim's spell checking features, keeping the interface clean without visual indicators. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cce0a92f13
commit
f12ae20f05
1 changed files with 9 additions and 0 deletions
|
|
@ -97,6 +97,7 @@
|
||||||
sources = [
|
sources = [
|
||||||
{ name = "buffer"; } # Words from open buffers
|
{ name = "buffer"; } # Words from open buffers
|
||||||
{ name = "path"; } # File system paths
|
{ name = "path"; } # File system paths
|
||||||
|
{ name = "dictionary"; keyword_length = 2; } # English dictionary words
|
||||||
];
|
];
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
|
|
@ -113,6 +114,7 @@
|
||||||
# Extra plugins that don't have dedicated modules
|
# Extra plugins that don't have dedicated modules
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
|
cmp-dictionary
|
||||||
];
|
];
|
||||||
|
|
||||||
# Keymaps
|
# Keymaps
|
||||||
|
|
@ -221,6 +223,13 @@
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Dictionary completion setup
|
||||||
|
require("cmp_dictionary").setup({
|
||||||
|
paths = { "/usr/share/dict/words" }, -- Standard dictionary path
|
||||||
|
exact_length = 2, -- Minimum length before completion
|
||||||
|
first_case_insensitive = true, -- Case insensitive matching
|
||||||
|
})
|
||||||
|
|
||||||
-- Unicode-safe file operations for macOS
|
-- Unicode-safe file operations for macOS
|
||||||
function open_file_with_system_app()
|
function open_file_with_system_app()
|
||||||
local filepath = vim.fn.expand('%:p')
|
local filepath = vim.fn.expand('%:p')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue