diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua deleted file mode 100644 index 8af2482..0000000 --- a/lua/plugins/blink.lua +++ /dev/null @@ -1,140 +0,0 @@ -return { - "saghen/blink.cmp", - lazy = false, - dependencies = { - "rafamadriz/friendly-snippets", - "zbirenbaum/copilot.lua", - "giuxtaposition/blink-cmp-copilot", - "mikavilpas/blink-ripgrep.nvim", - "xzbdmw/colorful-menu.nvim", - }, - - version = "v0.*", - opts = function() - local has_colorful, colorful = pcall(require, "colorful-menu") - - return { - keymap = { - preset = "enter", -- Changed from "super-tab" to "enter" - [''] = { 'show', 'show_documentation', 'hide_documentation' }, - [''] = { 'hide' }, - [''] = { 'select_and_accept' }, - - [''] = { 'select_prev', 'fallback' }, - [''] = { 'select_next', 'fallback' }, - - [''] = { 'scroll_documentation_up', 'fallback' }, - [''] = { 'scroll_documentation_down', 'fallback' }, - - [''] = { function(cmp) cmp.accept({ index = 1 }) end }, - [''] = { function(cmp) cmp.accept({ index = 2 }) end }, - [''] = { function(cmp) cmp.accept({ index = 3 }) end }, - [''] = { function(cmp) cmp.accept({ index = 4 }) end }, - [''] = { function(cmp) cmp.accept({ index = 5 }) end }, - [''] = { function(cmp) cmp.accept({ index = 6 }) end }, - [''] = { function(cmp) cmp.accept({ index = 7 }) end }, - [''] = { function(cmp) cmp.accept({ index = 8 }) end }, - [''] = { function(cmp) cmp.accept({ index = 9 }) end }, - [''] = { function(cmp) cmp.accept({ index = 10 }) end }, - }, - appearance = { - use_nvim_cmp_as_default = true, - nerd_font_variant = "mono", - kind_icons = { - Copilot = "", - Text = '󰉿', - Method = '󰊕', - Function = '󰊕', - Constructor = '󰒓', - - Field = '󰜢', - Variable = '󰆦', - Property = '󰖷', - - Class = '󱡠', - Interface = '󱡠', - Struct = '󱡠', - Module = '󰅩', - - Unit = '󰪚', - Value = '󰦨', - Enum = '󰦨', - EnumMember = '󰦨', - - Keyword = '󰻾', - Constant = '󰏿', - - Snippet = '󱄽', - Color = '󰏘', - File = '󰈔', - Reference = '󰬲', - Folder = '󰉋', - Event = '󱐋', - Operator = '󰪚', - TypeParameter = '󰬛', - }, - }, - completion = { - menu = { - border = "single", - draw = has_colorful and { - columns = { { "kind_icon" }, { "label", gap = 1 } }, - components = { - label = { - text = colorful.blink_components_text, - highlight = colorful.blink_components_highlight, - }, - }, - } or { - columns = { { "kind_icon" }, { "label", gap = 1 } }, - } - }, - documentation = { - window = { - border = "single", - } - } - }, - signature = { window = { border = 'single' } }, - cmdline = { enabled = true }, - sources = { - default = { "snippets", "lsp", "path", "buffer", "copilot", "ripgrep" }, - providers = { - copilot = { - name = "copilot", - module = "blink-cmp-copilot", - score_offset = 100, - async = true, - transform_items = function(_, items) - local CompletionItemKind = require("blink.cmp.types").CompletionItemKind - local kind_idx = #CompletionItemKind + 1 - CompletionItemKind[kind_idx] = "Copilot" - for _, item in ipairs(items) do - item.kind = kind_idx - end - return items - end, - }, - ripgrep = { - module = "blink-ripgrep", - name = "Ripgrep", - opts = { - prefix_min_len = 3, - backend = { - context_size = 5, - ripgrep = { - max_filesize = "1M", - additional_rg_options = {}, - }, - }, - }, - }, - }, - }, - } - end, - opts_extend = { - "sources.default", - "sources.providers", - }, -} \ No newline at end of file diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 6645c3e..9d06060 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -3,28 +3,40 @@ return { event = "VimEnter", dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() + -- Calculate vertical padding to center the dashboard + local header_art = { + " ██▒ █▓ ██▓ ███▄ ▄███▓", + "▓██░ █▒▓██▒▓██▒▀█▀ ██▒", + " ▓██ █▒░▒██▒▓██ ▓██░", + " ▒██ █░░░██░▒██ ▒██ ", + " ▒▀█░ ░██░▒██▒ ░██▒", + " ░ ▐░ ░▓ ░ ▒░ ░ ░", + " ░ ░░ ▒ ░░ ░ ░", + " ░░ ▒ ░░ ░ ", + " ░ ░ ░ ", + " ░ ", + } + local center_items = 6 + local content_height = #header_art + 2 + (center_items * 2) -- header + spacing + center items + local win_height = vim.fn.winheight(0) + local padding = math.max(0, math.floor((win_height - content_height) / 2)) + + local header = {} + for _ = 1, padding do + table.insert(header, "") + end + for _, line in ipairs(header_art) do + table.insert(header, line) + end + table.insert(header, "") + table.insert(header, "") + + vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#83a598" }) + require("dashboard").setup({ theme = "doom", config = { - header = { - "", - "", - "", - "", - "", - " ██▒ █▓ ██▓ ███▄ ▄███▓", - "▓██░ █▒▓██▒▓██▒▀█▀ ██▒", - " ▓██ █▒░▒██▒▓██ ▓██░", - " ▒██ █░░░██░▒██ ▒██ ", - " ▒▀█░ ░██░▒██▒ ░██▒", - " ░ ▐░ ░▓ ░ ▒░ ░ ░", - " ░ ░░ ▒ ░░ ░ ░", - " ░░ ▒ ░░ ░ ", - " ░ ░ ░ ", - " ░ ", - "", - "", - }, + header = header, center = { { icon = " ", @@ -50,12 +62,6 @@ return { key = "e", action = "Neotree toggle", }, - { - icon = " ", - desc = "Config ", - key = "c", - action = "edit ~/.config/nvim/init.lua", - }, { icon = " ", desc = "Quit ",