问最小NeoVim lua配置用于使用nvim-cmp和lspENneovim 自带的代码补全的效果并不好,而且它分为好多类,如果需要人为的去判断使用路径补全、使用当前buffer中的单词补全、亦或者使用include 来进行补全,那样使用起来就很不方便了。针对代码的补全我们可以基于 lsp的配置使用插件来完成,这里我推荐使用 nvim-cmp插件
nvim-cmp-scm-1.rockspec ci: add release workflow to publish new tags to LuaRocks (hrsh7th#1431) May 1, 2023 stylua.toml dev (hrsh7th#1) Aug 4, 2021 README License nvim-cmp A completion engine plugin for neovim written in Lua. Completion sources are installed from external repositorie...
FAQ I have checked the FAQ and it didn't resolve my problem. Announcement I have checked Breaking change announcement. Minimal reproducible full config return { { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-cmdline", "hrsh7th/cmp-n...
lua:0: after the second argument: expected table, got nil stack traceback: [C]: in function 'error' vim/shared.lua: in function 'validate' vim/shared.lua: in function 'tbl_deep_extend' ...cal/share/nvim/lazy/cmp-cmdline/lua/cmp_cmdline/init.lua:165: in function 'complete' ...a...
E5108: Error executing lua [string ":lua"]:1: module 'cmp' not found: no field package.preload['cmp'] no file './cmp.lua' no file '/usr/share/luajit-2.1/cmp.lua' no file '/usr/local/share/lua/5.1/cmp.lua' no file '/usr/local/share/lua/5.1/cmp/init.lua' no file '/usr...
cmp_src")._complete() -- if cmp_src._registered then -- cmp_src._complete() -- end return require("fzf-lua.cmd")._candidates(line) end, }) -- If available register as nvim-cmp source local ok, _ = pcall(require, "cmp") if ok then require("fzf-lua.cmp_src")._register_...
to use nvim-cmp instead, enable the coding.nvim-cmp extra with :LazyExtras Removed Plugins dressing.nvim (replaced with fzf-lua and snacks.input) telescope-fzf-native.nvim (replaced with fzf-lua) telescope.nvim (replaced with fzf-lua) indent-blankline.nvim (replaced with snacks.indent)...
nvim-cmp A completion engine plugin for neovim written in Lua. Completion sources are installed from external repositories and "sourced". demo.mp4 Readme! There is a GitHub issue that documents breaking changes for nvim-cmp. Subscribe to the issue to be notified of upcoming breaking changes....