From ba8725e5fed363c9c1e056655df4f098349de09e Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 2 Oct 2025 01:02:40 +0100 Subject: [PATCH] Add copilot chat and other nice things --- lua/custom/plugins/copilot-chat.lua | 18 ++++++++++++++++++ lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/init.lua | 1 + lua/custom/plugins/neo-tree-config.lua | 8 +++++++- lua/custom/plugins/sleuth.lua | 7 +++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/copilot-chat.lua create mode 100644 lua/custom/plugins/sleuth.lua diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua new file mode 100644 index 00000000..1fc3dad3 --- /dev/null +++ b/lua/custom/plugins/copilot-chat.lua @@ -0,0 +1,18 @@ +return { + { + 'CopilotC-Nvim/CopilotChat.nvim', + dependencies = { + { 'nvim-lua/plenary.nvim', branch = 'master' }, + }, + build = 'make tiktoken', + init = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + + map('n', 'ch', 'CopilotChatToggle', opts) + end, + opts = { + -- See Configuration section for options + }, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 203bda61..0e67f891 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -6,7 +6,7 @@ return { config = function() require('copilot').setup { suggestion = { - enabled = true, + enabled = false, auto_trigger = true, keymap = { accept = '', diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 846e264a..a65d8b46 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -7,4 +7,5 @@ return { require 'custom.plugins.tabs', require 'custom.plugins.copilot', require 'custom.plugins.neo-tree-config', + require 'custom.plugins.sleuth', } diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 925a5a84..1492b22e 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -24,7 +24,13 @@ return { end, { desc = 'Focus NeoTree' }) -- Setup neo-tree - require('neo-tree').setup {} + require('neo-tree').setup { + filesystem = { + follow_current_file = { + enabled = true, + }, + }, + } end, }, } diff --git a/lua/custom/plugins/sleuth.lua b/lua/custom/plugins/sleuth.lua new file mode 100644 index 00000000..48bc789a --- /dev/null +++ b/lua/custom/plugins/sleuth.lua @@ -0,0 +1,7 @@ +return { + { + 'tpope/vim-sleuth', + config = function() end, + opts = {}, + }, +}