diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 7826803..1c6d8ba 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -32,6 +32,9 @@ local plugins = { { import = "lazyvim.plugins.extras.coding.luasnip" }, { import = "lazyvim.plugins.extras.coding.neogen" }, -- generate annotations + { import = "lazyvim.plugins.extras.ai.copilot" }, + -- { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, + { import = "lazyvim.plugins.extras.ui.treesitter-context" }, { import = "lazyvim.plugins.extras.editor.harpoon2" }, diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua deleted file mode 100644 index 99d1124..0000000 --- a/lua/plugins/dashboard.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - { "nvimdev/dashboard-nvim", enabled = false }, -} diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua deleted file mode 100644 index 8e2ae8a..0000000 --- a/lua/plugins/notify.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "rcarriga/nvim-notify", - enabled = false, -} diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua deleted file mode 100644 index 87dacb4..0000000 --- a/lua/plugins/nvim-cmp.lua +++ /dev/null @@ -1,88 +0,0 @@ -local supertab = function(opts) - local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - if col == 0 then - return false - end - local line_text = vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1] - local char_before_cursor = line_text:sub(col, col) - return not char_before_cursor:match("%s") or char_before_cursor:match("[./]") - end - - local cmp = require("cmp") - - local prev = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) - else - fallback() - end - end, { "i", "s" }) - - opts.mapping = vim.tbl_extend("force", opts.mapping, { - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = prev, - }) -end - -local function sources(opts) - opts.sources = vim.tbl_extend("force", opts.sources or {}, { - { - name = "path", - option = { - trailing_slash = true, -- Adds a trailing slash to directories - }, - }, - { name = "buffer" }, - }) -end - -local function format(opts) - opts.formatting = { - format = function(entry, vim_item) - vim_item.menu = ({ - buffer = "[Buffer]", - nvim_lsp = "[LSP]", - path = "[Path]", - })[entry.source.name] - return vim_item - end, - } - - opts.window = { - completion = require("cmp").config.window.bordered(), - documentation = require("cmp").config.window.bordered(), - } -end - -return { - { - "hrsh7th/nvim-cmp", - opts = function(_, opts) - supertab(opts) - format(opts) - sources(opts) - -- Force `cmp-path` to trigger more aggressively - opts.completion = { - keyword_length = 1, -- Trigger after typing 1 character - keyword_pattern = [[\%(\k\|[./]\)\+]], -- Match paths and keywords - } - end, - }, -} diff --git a/lua/plugins/slacks.lua b/lua/plugins/slacks.lua new file mode 100644 index 0000000..b3c95fa --- /dev/null +++ b/lua/plugins/slacks.lua @@ -0,0 +1,6 @@ +return { + { "folke/snacks.nvim", opts = { + dashboard = { enabled = false }, + notifier = { enabled = false }, + } }, +}