format lua files
This commit is contained in:
@ -9,9 +9,9 @@ return {
|
||||
'fang2hou/blink-copilot',
|
||||
opts = {
|
||||
max_completions = 1, -- Global default for max completions
|
||||
max_attempts = 2, -- Global default for max attempts
|
||||
max_attempts = 2, -- Global default for max attempts
|
||||
-- `kind` is not set, so the default value is "Copilot"
|
||||
}
|
||||
},
|
||||
},
|
||||
'dmitmel/cmp-cmdline-history',
|
||||
'onsails/lspkind.nvim',
|
||||
@ -26,7 +26,7 @@ return {
|
||||
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
|
||||
opts = {},
|
||||
},
|
||||
'rcarriga/cmp-dap'
|
||||
'rcarriga/cmp-dap',
|
||||
},
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
@ -69,7 +69,7 @@ return {
|
||||
'snippets',
|
||||
'path',
|
||||
'buffer',
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
providers = {
|
||||
@ -82,7 +82,7 @@ return {
|
||||
-- Local options override global ones
|
||||
-- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot"
|
||||
max_completions = 3, -- Override global max_completions
|
||||
}
|
||||
},
|
||||
},
|
||||
lazydev = {
|
||||
name = 'LazyDev',
|
||||
@ -90,15 +90,15 @@ return {
|
||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||
score_offset = 100,
|
||||
},
|
||||
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
|
||||
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
|
||||
name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp
|
||||
module = 'blink.compat.source',
|
||||
async = true
|
||||
async = true,
|
||||
},
|
||||
cmdline_history = {
|
||||
name = 'cmdline_history',
|
||||
module = 'blink.compat.source',
|
||||
score_offset = -50
|
||||
score_offset = -50,
|
||||
},
|
||||
dap = {
|
||||
name = 'dap',
|
||||
@ -115,12 +115,16 @@ return {
|
||||
-- default to all visible buffers
|
||||
get_bufnrs = function()
|
||||
return vim
|
||||
.iter(vim.api.nvim_list_wins())
|
||||
:map(function(win) return vim.api.nvim_win_get_buf(win) end)
|
||||
:filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end)
|
||||
:totable()
|
||||
.iter(vim.api.nvim_list_wins())
|
||||
:map(function(win)
|
||||
return vim.api.nvim_win_get_buf(win)
|
||||
end)
|
||||
:filter(function(buf)
|
||||
return vim.bo[buf].buftype ~= 'nofile'
|
||||
end)
|
||||
:totable()
|
||||
end,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -129,9 +133,13 @@ return {
|
||||
sources = function()
|
||||
local type = vim.fn.getcmdtype()
|
||||
-- Search forward and backward
|
||||
if type == '/' or type == '?' then return { 'buffer' } end
|
||||
if type == '/' or type == '?' then
|
||||
return { 'buffer' }
|
||||
end
|
||||
-- Commands
|
||||
if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end
|
||||
if type == ':' or type == '@' then
|
||||
return { 'cmdline', 'buffer', 'cmdline_history' }
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
completion = {
|
||||
@ -142,30 +150,29 @@ return {
|
||||
list = {
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
preselect = false
|
||||
}
|
||||
preselect = false,
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set
|
||||
}
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
['<down>'] = { 'select_next', 'fallback' },
|
||||
['<up>'] = { 'select_prev', 'fallback' },
|
||||
['<CR>'] = { 'accept', 'fallback' },
|
||||
['<C-e>'] = { 'cancel' },
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
completion = {
|
||||
list = {
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
preselect = false
|
||||
}
|
||||
preselect = false,
|
||||
},
|
||||
},
|
||||
accept =
|
||||
{
|
||||
accept = {
|
||||
dot_repeat = false,
|
||||
},
|
||||
menu = {
|
||||
@ -213,25 +220,25 @@ return {
|
||||
end
|
||||
return hl
|
||||
end,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
treesitter_highlighting = true
|
||||
treesitter_highlighting = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- experimental signature help support
|
||||
signature = { enabled = true },
|
||||
snippets = {
|
||||
preset = 'luasnip'
|
||||
preset = 'luasnip',
|
||||
},
|
||||
},
|
||||
-- allows extending the providers array elsewhere in your config
|
||||
-- without having to redefine it
|
||||
opts_extend = { 'sources.default' },
|
||||
enabled = false
|
||||
enabled = false,
|
||||
}
|
||||
|
Reference in New Issue
Block a user