Updates with copilot.lua
Even though the completion indent is broken... https://github.com/zbirenbaum/copilot-cmp/issues/45 copilot.vim doesn't display any virtual text either since nvim-cmp overrides it.
This commit is contained in:
parent
2aceafcd67
commit
5863d0bbe1
@ -336,9 +336,10 @@ return require('packer').startup(function(use)
|
|||||||
use {
|
use {
|
||||||
'zbirenbaum/copilot-cmp',
|
'zbirenbaum/copilot-cmp',
|
||||||
config = function ()
|
config = function ()
|
||||||
require('copilot_cmp').setup()
|
require('plugins.copilot-cmp')
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
-- use 'github/copilot.vim'
|
||||||
use 'ziglang/zig.vim'
|
use 'ziglang/zig.vim'
|
||||||
use {
|
use {
|
||||||
'akinsho/bufferline.nvim',
|
'akinsho/bufferline.nvim',
|
||||||
|
3
lua/plugins/copilot-cmp.lua
Normal file
3
lua/plugins/copilot-cmp.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
local cmp = require('copilot_cmp')
|
||||||
|
|
||||||
|
cmp.setup()
|
@ -1,4 +1,3 @@
|
|||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = { 'lua_ls', 'rust_analyzer', 'bashls', 'cssls', 'html', 'jsonls', 'sqls', 'taplo'},
|
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
|
@ -44,17 +44,17 @@ cmp.setup({
|
|||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot", priority = 100, group_index = 1 },
|
||||||
{
|
{
|
||||||
name = 'nvim_lsp_signature_help',
|
name = 'nvim_lsp_signature_help',
|
||||||
priority = 100,
|
priority = 90,
|
||||||
group_index = 1,
|
group_index = 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = 'nvim_lsp',
|
name = 'nvim_lsp',
|
||||||
priority = 100,
|
priority = 90,
|
||||||
group_index = 1,
|
group_index = 2,
|
||||||
},
|
},
|
||||||
{ name = "copilot", group_index = 2 },
|
|
||||||
{
|
{
|
||||||
name = 'buffer',
|
name = 'buffer',
|
||||||
priority = 80,
|
priority = 80,
|
||||||
@ -93,7 +93,7 @@ cmp.setup({
|
|||||||
mode = 'symbol_text',
|
mode = 'symbol_text',
|
||||||
maxwidth = 50,
|
maxwidth = 50,
|
||||||
ellipsis_char = '…',
|
ellipsis_char = '…',
|
||||||
symbol_map = { Copilot = '🤖' },
|
-- symbol_map = { Copilot = '🤖' },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -37,3 +37,5 @@ vim.keymap.set('n', '<leader>s', [[<CMD>SqlsExecuteQuery<CR>]], { noremap = fals
|
|||||||
vim.keymap.set('n', '<leader>S', [[<CMD>SqlsExecuteQueryVertical<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor in vertical split" })
|
vim.keymap.set('n', '<leader>S', [[<CMD>SqlsExecuteQueryVertical<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor in vertical split" })
|
||||||
vim.keymap.set('x', '<leader>s', [[<Plug>(sqls-execute-query)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query" })
|
vim.keymap.set('x', '<leader>s', [[<Plug>(sqls-execute-query)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query" })
|
||||||
vim.keymap.set('x', '<leader>S', [[<Plug>(sqls-execute-query-vertical)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query in vertical split" })
|
vim.keymap.set('x', '<leader>S', [[<Plug>(sqls-execute-query-vertical)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query in vertical split" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>bo", "<cmd>%bd|e#<cr>", { desc = "Close all buffers but the current one" }) -- https://stackoverflow.com/a/42071865/516188
|
||||||
|
Loading…
Reference in New Issue
Block a user