You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this file, 'dressing. nvim/lua/pressing/input.lua'
The source for completion is sources, which should be added by the user themselves. The suggestion is: sources=opts.source. If it is empty, use the built-in completion source
--------------------------------------------------------------------------------------------------input.lua
-- Configure nvim-cmp if installed
local has_cmp, cmp = pcall(require, "cmp")
if has_cmp then
cmp.setup.buffer({
enabled = opts.completion ~= nil,
sources = {
{ name = "omni" }, --Hard coding, this is very unfriendly
},
})
end
In this file, 'dressing. nvim/lua/pressing/input.lua'
The source for completion is sources, which should be added by the user themselves. The suggestion is: sources=opts.source. If it is empty, use the built-in completion source
--------------------------------------------------------------------------------------------------input.lua
-- Configure nvim-cmp if installed
local has_cmp, cmp = pcall(require, "cmp")
if has_cmp then
cmp.setup.buffer({
enabled = opts.completion ~= nil,
sources = {
{ name = "omni" }, --Hard coding, this is very unfriendly
},
})
end
for example:
vim.ui.input({
prompt = "Title",
completion = true, --Activate completion function
sources = {“path”, "buffer"},--Set more sources
telescope = require("telescope.themes").get_cursor(),
},
function(input)
print(input)
end)
The text was updated successfully, but these errors were encountered: