add copilot lua

This commit is contained in:
Thitiwat Hemvimon 2024-07-17 09:16:29 +07:00
parent 56edc3d045
commit 33b077e15c
1 changed files with 20 additions and 2 deletions

View File

@ -139,6 +139,23 @@ vim.opt.rtp:prepend(lazypath)
--
-- NOTE: Here is where you install your plugins.
require('lazy').setup({
{
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
config = function()
require('copilot').setup {
suggestion = { enabled = false },
panel = { enabled = false },
}
end,
},
{
'zbirenbaum/copilot-cmp',
config = function()
require('copilot_cmp').setup()
end,
},
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
@ -148,7 +165,7 @@ require('lazy').setup({
'MunifTanjim/nui.nvim',
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function(self, opts)
config = function()
vim.keymap.set('n', '-', function()
local reveal_file = vim.fn.expand '%:p'
if reveal_file == '' then
@ -203,6 +220,7 @@ require('lazy').setup({
changedelete = { text = '~' },
},
},
current_line_blame = true,
},
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
@ -489,7 +507,7 @@ require('lazy').setup({
-- This may be unwanted, since they displace some of your code
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled)
end, '[T]oggle Inlay [H]ints')
end
end,