From 33b077e15ccf896d9ffb6f69340d0c22fb3d162d Mon Sep 17 00:00:00 2001 From: Thitiwat Hemvimon Date: Wed, 17 Jul 2024 09:16:29 +0700 Subject: [PATCH] add copilot lua --- init.lua | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index d9a0b5f8..8b6dd259 100644 --- a/init.lua +++ b/init.lua @@ -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('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,