fix auto cmp for cmdline

This commit is contained in:
c 2023-04-09 03:33:13 -05:00
parent 95c5e33aef
commit cb2dfbb709
2 changed files with 12 additions and 12 deletions

View File

@ -4,8 +4,8 @@ if not vim.loop.fs_stat(lazypath) then
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end

View File

@ -18,7 +18,7 @@ require 'lspconfig'.pyright.setup {
-- on_attach = on_attach -- on_attach = on_attach
-- } -- }
require 'lspconfig'.sumneko_lua.setup { require 'lspconfig'.lua_ls.setup {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
settings = { settings = {
@ -92,13 +92,13 @@ cmp.setup.cmdline({ '/', '?' }, {
{ name = 'buffer' } { name = 'buffer' }
} }
}) })
--
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', { -- cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), -- mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ -- sources = cmp.config.sources({
{ name = 'path' } -- { name = 'path' }
}, { -- }, {
{ name = 'cmdline' } -- { name = 'cmdline' }
}) -- })
}) -- })