From 3ae12887b0a4b1c26f08dcf067b65f9503b76151 Mon Sep 17 00:00:00 2001 From: kossLAN Date: Fri, 13 Sep 2024 00:48:20 -0400 Subject: [PATCH] copilot: fix weird buffer issues --- nix/neovim-overlay.nix | 1 - nvim/plugin/autocommands.lua | 3 --- nvim/plugin/copilot.lua | 22 +++++++++++----------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index 38e3b88..f825666 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -54,7 +54,6 @@ with final.pkgs.lib; let # telescope-smart-history-nvim # https://github.com/nvim-telescope/telescope-smart-history.nvim # ^ telescope and extensions # UI - nvim-navic # Add LSP location to lualine | https://github.com/SmiteshP/nvim-navic statuscol-nvim # Status column | https://github.com/luukvbaal/statuscol.nvim/ nvim-treesitter-context # nvim-treesitter-context # ^ UI diff --git a/nvim/plugin/autocommands.lua b/nvim/plugin/autocommands.lua index 27acc12..0e2f67d 100644 --- a/nvim/plugin/autocommands.lua +++ b/nvim/plugin/autocommands.lua @@ -70,9 +70,6 @@ vim.api.nvim_create_autocmd('LspAttach', { local bufnr = ev.buf local client = vim.lsp.get_client_by_id(ev.data.client_id) - -- Attach plugins - require('nvim-navic').attach(client, bufnr) - vim.cmd.setlocal('signcolumn=yes') vim.bo[bufnr].bufhidden = 'hide' diff --git a/nvim/plugin/copilot.lua b/nvim/plugin/copilot.lua index e36957e..ac36c36 100644 --- a/nvim/plugin/copilot.lua +++ b/nvim/plugin/copilot.lua @@ -2,14 +2,14 @@ -- require('CopilotChat').setup { -- debug = true, -- } --- --- require('copilot_cmp').setup() --- --- require('copilot').setup { --- suggestion = { enabled = false }, --- panel = { enabled = false }, --- filetypes = { --- ['*'] = false, --- }, --- copilot_node_command = 'node', --- } + +require('copilot_cmp').setup() + +require('copilot').setup { + suggestion = { enabled = false }, + panel = { enabled = false }, + filetypes = { + ['java'] = true, + -- ['*'] = false, + }, +}