🐛 Use lazy loading and fix completeopt in cmdline
This commit is contained in:
parent
68f4a6595e
commit
49081f4dfb
@ -11,7 +11,7 @@ o.showmode = false
|
||||
o.scrolloff = 10
|
||||
|
||||
-- controlling
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noinsert' }
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
o.smartindent = true
|
||||
|
@ -49,6 +49,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = {"BufReadPre", "BufNewFile"},
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
@ -93,27 +94,33 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
}
|
||||
},
|
||||
"null-ls.nvim"
|
||||
},
|
||||
lazy = true
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
require("plugins.lsp")
|
||||
end,
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
require("plugins.lsp")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
config = function()
|
||||
require("plugins.null-ls")
|
||||
end,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"jose-elias-alvarez/null-ls.nvim"
|
||||
|
@ -67,9 +67,12 @@ cmp.setup({
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noselect'
|
||||
},
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
@ -85,6 +88,9 @@ cmp.setup.filetype('gitcommit', {
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noselect'
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user