From 2056e458abf0175dd1f43fcb2d5e3d68cd7de5a9 Mon Sep 17 00:00:00 2001 From: Andreas Gerlach Date: Thu, 12 Oct 2023 16:03:36 +0200 Subject: [PATCH] update to LazyVim 10.0 --- lazy-lock.json | 48 +++++++++--------- lua/config/autocmds.lua | 3 ++ lua/config/lazy.lua | 7 +-- lua/plugins/editor.lua | 47 ++--------------- lua/plugins/extras/theme/github.lua | 8 +-- lua/plugins/extras/theme/onedark.lua | 8 +-- lua/plugins/ui.lua | 75 +--------------------------- 7 files changed, 43 insertions(+), 153 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 47e4a36..e08c644 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,8 +1,8 @@ { - "LazyVim": { "branch": "main", "commit": "23a0004a86071164e66b76c32459c9b45b0d1e3e" }, - "LuaSnip": { "branch": "master", "commit": "cdbf6f41381e5ee4810b4b09284b603d8f18365d" }, + "LazyVim": { "branch": "main", "commit": "763c0fd9f296ec31119c0e7109b9b73d15553fff" }, + "LuaSnip": { "branch": "master", "commit": "0df29db3543837f8b41597f2640397c5ec792b7b" }, "SchemaStore.nvim": { "branch": "main", "commit": "854b38820036d81c5e6af1cae8797776ae5df56a" }, - "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, + "aerial.nvim": { "branch": "master", "commit": "da3041fd56c605dc1a07e6f8089312ff0a63da84" }, "bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" }, "bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -10,20 +10,22 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "4db76a68b47aa6e9777e4da4aed16f0fff74920e" }, "crates.nvim": { "branch": "main", "commit": "58bf989736765cae41fa5d0971027efeca033301" }, - "diffview.nvim": { "branch": "main", "commit": "0437ef8bfdd67156d87140d692840a3c2824fa20" }, - "dressing.nvim": { "branch": "master", "commit": "70fcf2a33c55e76854a9b3d2e3338a6526fd56f5" }, - "edgy.nvim": { "branch": "main", "commit": "70e334c9cd7915aedde3255ade01ceeebe735b53" }, + "dashboard-nvim": { "branch": "master", "commit": "8721edccead31c07c2cda0bc5ac75b0491b5adcd" }, + "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" }, + "dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" }, + "edgy.nvim": { "branch": "main", "commit": "4a4bab427e31eb37678bae3e478f166aae9deff3" }, "flash.nvim": { "branch": "main", "commit": "6d76c5dee65181ab55cbdfb0760260e800d643f4" }, "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, - "git-blame.nvim": { "branch": "master", "commit": "39df33dad2cbf4eb9d17264bcda0c12e670ef1c2" }, + "git-blame.nvim": { "branch": "master", "commit": "e4dafc79cc7dcf4eec0547dbc6f3f3821b2f2b14" }, "git-conflict.nvim": { "branch": "main", "commit": "896261933afe2fddf6fb043d9cd4d88301b151a9" }, "github-nvim-theme": { "branch": "main", "commit": "48f95f763e1a98e508260a20e448c3ff2d91213a" }, "gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" }, - "indent-blankline.nvim": { "branch": "master", "commit": "b808248f6a93ff4a2ed2932d68c6833ae167ecfc" }, - "lazy.nvim": { "branch": "main", "commit": "73fbf5ccabd0233653bdeb4bb2b07fcfa97b57e0" }, + "indent-blankline.nvim": { "branch": "master", "commit": "0fe34b4c1b926e106d105d3ae88ef6cbf6743572" }, + "lazy.nvim": { "branch": "main", "commit": "33c447b96e1cb1a5a2be87982d5d32bb5054079d" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "ddefe5ab051e7ca6a7b374754f0920c44668b54f" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "397273083f988c1a17acf3816947cd198338e700" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" }, "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" }, "mini.ai": { "branch": "main", "commit": "10ad2ed049fb681a829b44aeb23443c0a9c910ae" }, @@ -33,52 +35,52 @@ "mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" }, "mini.surround": { "branch": "main", "commit": "68ce058ef9716d7d955b79363845d2dd003d6500" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "6f8c49956c89e9fefae6acdfe1d57c6293b0a03d" }, - "neoconf.nvim": { "branch": "main", "commit": "89fdbc02266d714413b805084a1b44d3cc8ce103" }, - "neodev.nvim": { "branch": "main", "commit": "11329ba9c0c03d3e976ba4e833d42164737bd402" }, + "neoconf.nvim": { "branch": "main", "commit": "393d37abd9d82adcac627309a41758ae8e140d9e" }, + "neodev.nvim": { "branch": "main", "commit": "a4b6e7ca11ff5be2264d5c169fcedd97d8699ec4" }, "neotest": { "branch": "master", "commit": "1e67a504d03def3a6a1125d934cb511680f72555" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "neotest-rust": { "branch": "main", "commit": "03e036a310379f132d4e39387e9076396132ce3f" }, "noice.nvim": { "branch": "main", "commit": "fcd01710ff6918d4d3ef90c8e36f3addacba13bf" }, - "none-ls.nvim": { "branch": "main", "commit": "ae339f45590cc421a68de885fc5a3261cc247362" }, "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-coverage": { "branch": "main", "commit": "fd6f94781c94958d1c26353d0d43a82ea5572b31" }, - "nvim-dap": { "branch": "master", "commit": "e79007c6d7a24db3ad19ea9196f1f0b2840e8ae7" }, + "nvim-dap": { "branch": "master", "commit": "92dc531eea2c9a3ef504a5c8ac0decd1fa59a6a3" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, "nvim-jqx": { "branch": "master", "commit": "11b1d0368e5b23b9c356da8e5f70bb5827f27f62" }, - "nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" }, - "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, + "nvim-lint": { "branch": "master", "commit": "0f54481d7537a6872f7bb021575366657e123474" }, + "nvim-lspconfig": { "branch": "master", "commit": "cab7233cd6a89ec952dfd40c4b74341b1165830e" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, - "nvim-scrollview": { "branch": "main", "commit": "4a14332861f674b6f77cb5b0c84717935999a53e" }, + "nvim-scrollview": { "branch": "main", "commit": "e8befc94ea66194700495d2f71419ba112634b0b" }, "nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" }, - "nvim-treesitter": { "branch": "master", "commit": "0eb1a0ad1c82e080e77e7b9d7a5e42632cefb543" }, + "nvim-treesitter": { "branch": "master", "commit": "49f7194e4c4d3c9ed891b0968798c062e8ac5a3d" }, + "nvim-treesitter-context": { "branch": "master", "commit": "4cf64264c049c55f256550ad247b606f3e53bc77" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" }, + "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7241635869b7a8115893ffa67bab3907756caf4f" }, "nvim-web-devicons": { "branch": "master", "commit": "a1e6268779411048a87f767a27380089362a0ce2" }, "one-small-step-for-vimkind": { "branch": "main", "commit": "edbb34ee779049f2071dc7becff0bbf51c865906" }, "onedarkpro.nvim": { "branch": "main", "commit": "7c02b4eeb310173ef6d741e60200d72b76923eae" }, "package-info.nvim": { "branch": "master", "commit": "4d98c8cc90d970d87c472c04bf7ca712336cc753" }, "persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" }, - "plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" }, + "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rest.nvim": { "branch": "main", "commit": "5bcaa1012ea8efd6093c69d2a4c67fbde760d043" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "scope.nvim": { "branch": "main", "commit": "01ce40fe7434fba9a122c01b4734479b3860609a" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, - "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" }, - "telescope.nvim": { "branch": "master", "commit": "5a747a9587e4bfc4ae086a38cc679fe54f983b69" }, + "telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" }, "tidy.nvim": { "branch": "main", "commit": "86eab24e807ed2957d26ca43b2b76b92d0fbf8f4" }, "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, - "tokyonight.nvim": { "branch": "main", "commit": "6aaf3459c3a023eae6d340d31004400428ea61b2" }, + "tokyonight.nvim": { "branch": "main", "commit": "dce0ab49ae751f4f3617ab42d6f20c72369c7cb1" }, "trouble.nvim": { "branch": "main", "commit": "02219b557d4726a789be58c5d6bd6e139c46a9fe" }, "venv-selector.nvim": { "branch": "main", "commit": "6ef90a217299500edfd86a322b9a195fb1b07013" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }, - "yanky.nvim": { "branch": "main", "commit": "636632d70ac00c45bdc1751d7b35c83d47081f36" }, + "yanky.nvim": { "branch": "main", "commit": "cc3fc03c780a14f189290edcf1c47dc1306626d4" }, "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" } } \ No newline at end of file diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index bbd83e9..92bff97 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -35,3 +35,6 @@ vim.api.nvim_create_autocmd("FileType", { vim.keymap.set("n", "q", "bdelete!", { buffer = event.buf, silent = true }) end, }) + +-- show dashboard when new tab page is opened +vim.api.nvim_create_autocmd('TabNewEntered', { command = 'Dashboard' }) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index cfb14fb..7e1ec3c 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -32,11 +32,6 @@ return function(opts) require("tokyonight").load() -- fallback to tokyo night if not otherwise specified end end, - icons = { - kinds = { - Codeium = " " - } - }, }, }, -- lazyvim codeium extension modules @@ -68,6 +63,8 @@ return function(opts) -- lazyvim UI extension modules { import = "lazyvim.plugins.extras.ui.edgy" }, { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- lazyvim aerial extension modules │ + { import = "lazyvim.plugins.extras.editor.aerial" }, -- lazyvim project extension modules { import = "lazyvim.plugins.extras.util.project" }, -- import/override with your plugins diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 83c6dc1..7cf9cd8 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -9,17 +9,18 @@ return { -- stylua: ignore config = function(_, opts) -- switches to Alpha dashboard when last buffer is closed - local alpha_on_empty = vim.api.nvim_create_augroup("alpha_on_empty", { clear = true }) + local dashboard_on_empty = vim.api.nvim_create_augroup("dashboard_on_empty", { clear = true }) vim.api.nvim_create_autocmd("User", { pattern = "BDeletePost*", - group = alpha_on_empty, + group = dashboard_on_empty, callback = function(event) local fallback_name = vim.api.nvim_buf_get_name(event.buf) local fallback_ft = vim.api.nvim_buf_get_option(event.buf, "filetype") local fallback_on_empty = fallback_name == "" and fallback_ft == "" if fallback_on_empty then vim.cmd([[Neotree close]]) - vim.cmd("Alpha") + vim.cmd([[AerialCloseAll]]) + vim.cmd([[Dashboard]]) vim.cmd(event.buf .. "bwipeout") end end, @@ -132,46 +133,6 @@ return { opts = {}, }, - -- add symbols-outline - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, - opts = function(_, opts) - local icons = require("lazyvim.config").icons - require("symbols-outline").setup({ - symbols = { - File = { icon = icons.kinds.File, hl = "TSURI" }, - Module = { icon = icons.kinds.Module, hl = "TSNamespace" }, - Namespace = { icon = icons.kinds.Namespace, hl = "TSNamespace" }, - Package = { icon = icons.kinds.Package, hl = "TSNamespace" }, - Class = { icon = icons.kinds.Class, hl = "TSType" }, - Method = { icon = icons.kinds.Method, hl = "TSMethod" }, - Property = { icon = icons.kinds.Property, hl = "TSMethod" }, - Field = { icon = icons.kinds.Field, hl = "TSField" }, - Constructor = { icon = icons.kinds.Constructor, hl = "TSConstructor" }, - Enum = { icon = icons.kinds.Enum, hl = "TSType" }, - Interface = { icon = icons.kinds.Interface, hl = "TSType" }, - Function = { icon = icons.kinds.Function, hl = "TSFunction" }, - Variable = { icon = icons.kinds.Variable, hl = "TSConstant" }, - Constant = { icon = icons.kinds.Constant, hl = "TSConstant" }, - String = { icon = icons.kinds.String, hl = "TSString" }, - Number = { icon = icons.kinds.Number, hl = "TSNumber" }, - Boolean = { icon = icons.kinds.Boolean, hl = "TSBoolean" }, - Array = { icon = icons.kinds.Array, hl = "TSConstant" }, - Object = { icon = icons.kinds.Object, hl = "TSType" }, - Key = { icon = icons.kinds.Key, hl = "TSType" }, - Null = { icon = icons.kinds.Null, hl = "TSType" }, - EnumMember = { icon = icons.kinds.EnumMember, hl = "TSField" }, - Struct = { icon = icons.kinds.Struct, hl = "TSType" }, - Event = { icon = icons.kinds.Event, hl = "TSType" }, - Operator = { icon = icons.kinds.Operator, hl = "TSOperator" }, - TypeParameter = { icon = icons.kinds.TypeParameter, hl = "TSParameter" } - } - }) - end - }, - -- add zen-mode { "folke/zen-mode.nvim", diff --git a/lua/plugins/extras/theme/github.lua b/lua/plugins/extras/theme/github.lua index ca6cad3..98a258f 100644 --- a/lua/plugins/extras/theme/github.lua +++ b/lua/plugins/extras/theme/github.lua @@ -20,10 +20,10 @@ function M.setup(colorscheme) }, groups = { all = { - AlphaHeader = { link = 'Title' }, - AlphaButtons = { link = 'Identifier' }, - AlphaShortcut = { link = 'Keyword' }, - AlphaFooter = { link = 'Comment' }, + DashboardHeader = { link = 'Title' }, + DashboardIcon = { link = 'Identifier' }, + DashboardKey = { link = 'Keyword' }, + DashboardFooter = { link = 'Comment' }, } } } diff --git a/lua/plugins/extras/theme/onedark.lua b/lua/plugins/extras/theme/onedark.lua index 2c3f133..fd2ee65 100644 --- a/lua/plugins/extras/theme/onedark.lua +++ b/lua/plugins/extras/theme/onedark.lua @@ -18,10 +18,10 @@ function M.setup(colorscheme) cursorline = false, -- Use cursorline highlighting? }, highlights = { - AlphaHeader = { fg = colors.yellow }, - AlphaButtons = { fg = colors.fg }, - AlphaShortcut = { fg = colors.red }, - AlphaFooter = { fg = colors.highlight }, + DashboardHeader = { fg = colors.yellow }, + DashboardIcon = { fg = colors.green }, + DashboardKey = { fg = colors.red }, + DashboardFooter = { fg = colors.highlight }, } } theme.setup(opts) diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index cd5a5ff..3303229 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -59,85 +59,12 @@ return { } }, - -- statusline - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - opts = function(_, opts) - local function lsp_name(msg) - msg = msg or "Inactive" - local buf_clients = vim.lsp.get_active_clients() - if next(buf_clients) == nil then - if type(msg) == "boolean" or #msg == 0 then - return "Inactive" - end - return msg - end - local buf_client_names = {} - - for _, client in pairs(buf_clients) do - if client.name ~= "null-ls" then - table.insert(buf_client_names, client.name) - end - end - - return table.concat(buf_client_names, ", ") - end - - opts.sections = vim.tbl_deep_extend("force", opts.sections, { - lualine_y = { - { - lsp_name, - icon = "", - color = { gui = "none" }, - }, - { "progress", separator = " ", padding = { left = 1, right = 0 } }, - { "location", padding = { left = 0, right = 1 } }, - }, - }) - end - }, - - -- dashboard - { - "goolord/alpha-nvim", - opts = function(_, dashboard) - dashboard.config.opts.setup = function() - local alpha_start_group = vim.api.nvim_create_augroup("AlphaStart", { clear = true }) - vim.api.nvim_create_autocmd("TabNewEntered", { - callback = function() - require("alpha").start() - end, - group = alpha_start_group, - }) - vim.api.nvim_create_autocmd("User", { - pattern = "AlphaReady", - desc = "disable tabline for alpha", - callback = function() - vim.opt.showtabline = 0 - end, - }) - vim.api.nvim_create_autocmd("BufUnload", { - buffer = 0, - desc = "enable tabline after alpha", - callback = function() - vim.opt.showtabline = 2 - end, - }) - end - local button = dashboard.button("m", " " .. " Mason", ":Mason") - button.opts.hl = "AlphaButtons" - button.opts.hl_shortcut = "AlphaShortcut" - table.insert(dashboard.section.buttons.val, 9, button) - end - }, - -- scrollbar for Neovim { "dstein64/nvim-scrollview", event = "BufReadPre", opts = { - excluded_filetypes = { "alpha", "neo-tree" }, + excluded_filetypes = { "dashboard", "neo-tree" }, current_only = true, winblend = 75, }