From e9473107a7824c1e2f18193d9b1357e08c20e9d9 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 31 Jul 2024 16:42:47 +0200 Subject: [PATCH] nvim: new config for copilot, neotree --- .config/nvim/lua/plugins/editor.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/plugins/editor.lua b/.config/nvim/lua/plugins/editor.lua index d124c0e20..c1b35b991 100644 --- a/.config/nvim/lua/plugins/editor.lua +++ b/.config/nvim/lua/plugins/editor.lua @@ -1,7 +1,15 @@ ---@type LazySpec return { - { "folke/flash.nvim", enabled = false }, - { "debugloop/telescope-undo.nvim" }, + { "ggandor/flit.nvim", optional = true, enabled = false }, + { + "zbirenbaum/copilot.lua", + optional = true, + keys = { + { "a", "", desc = "+ai", mode = { "n" } }, + { "at", "Copilot detach", desc = "Detach (Copilot)" }, + { "ac", "Copilot attach", desc = "Attach (Copilot)" }, + }, + }, { "folke/todo-comments.nvim", event = "VeryLazy", @@ -43,7 +51,7 @@ return { }, --stylua: ignore keys = { - { "z", desc = "+zk" }, + { "z", "", desc = "+zk", mode = { "n", "v" } }, { "zn", function() require("zk.commands").get("ZkNew")({ title = vim.fn.input('Title: ') }) end, desc = "New Note", mode = { "n", "v" } }, { "znt", function() require("zk.commands").get("ZkNewFromTitleSelection")() end, desc = "Title from selection", mode = { "v" } }, { @@ -69,6 +77,7 @@ return { { "nvim-telescope/telescope.nvim", optional = true, + dependencies = { { "debugloop/telescope-undo.nvim" } }, opts = function() LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("undo") @@ -136,6 +145,9 @@ return { optional = true, opts = { filesystem = { + filtered_items = { + visible = true, + }, window = { mappings = require("lib").generate_shortcut_maps(), },