diff --git a/init.lua b/init.lua index 0883342..3841689 100644 --- a/init.lua +++ b/init.lua @@ -19,7 +19,7 @@ require("user.whitespace") require("user.lualine") require("user.toggleterm") require("user.indentline") -require("user.alpha") +require("user.legendary") require("user.whichkey") require("user.trouble") require("user.colorizer") diff --git a/lua/user/alpha.lua b/lua/user/alpha.lua index 44ecdd0..749ea2c 100644 --- a/lua/user/alpha.lua +++ b/lua/user/alpha.lua @@ -23,14 +23,34 @@ dashboard.section.buttons.val = { } local function footer() - return "I use Arch BTW" + -- Number of plugins + local total_plugins = #vim.tbl_keys(packer_plugins) + local datetime = os.date("%d-%m-%Y %H:%M:%S") + local plugins_text = "  " + .. total_plugins + .. " plugins" + .. "  v" + .. vim.version().major + .. "." + .. vim.version().minor + .. "." + .. vim.version().patch + .. "  " + .. datetime + + -- Quote + local fortune = require("alpha.fortune") + local quote = table.concat(fortune(), "\n") + + return "\n" .. plugins_text .. "\n" .. quote .. "\n" .. " I use Arch BTW" end dashboard.section.footer.val = footer() -dashboard.section.footer.opts.hl = "Type" +dashboard.section.footer.opts.hl = "Constant" dashboard.section.header.opts.hl = "Include" -dashboard.section.buttons.opts.hl = "Keyword" - +dashboard.section.buttons.opts.hl = "Function" +dashboard.section.buttons.opts.hl_shortcut = "Type" dashboard.opts.opts.noautocmd = true + alpha.setup(dashboard.opts) diff --git a/lua/user/autocommands.lua b/lua/user/autocommands.lua index d31bf83..b3210df 100644 --- a/lua/user/autocommands.lua +++ b/lua/user/autocommands.lua @@ -16,6 +16,7 @@ vim.api.nvim_create_autocmd({ "User" }, { vim.cmd([[ set showtabline=0 | autocmd BufUnload set showtabline=2 set laststatus=0 | autocmd BufUnload set laststatus=3 + :DisableWhitespace ]]) end, }) diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index 2dbd904..122782d 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -95,6 +95,9 @@ keymap("n", "sp", ":lua require('spectre').open_file_search()", opts -- UndoTree keymap("n", "u", ":UndotreeToggle", opts) +-- Legendary +keymap("n", "", ":lua require('legendary').find()", opts) + -- Insert -- -- Visual -- diff --git a/lua/user/legendary.lua b/lua/user/legendary.lua new file mode 100644 index 0000000..ea73c2d --- /dev/null +++ b/lua/user/legendary.lua @@ -0,0 +1,6 @@ +local ok, legendary = pcall(require, "legendary") +if not ok then + return +end + +legendary.setup() diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index 6597611..6ffb5d9 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -125,10 +125,16 @@ return packer.startup(function(use) use("lukas-reineke/indent-blankline.nvim") -- Alpha - use("goolord/alpha-nvim") + use({ + "goolord/alpha-nvim", + config = function() + require("user.alpha") + end, + }) - -- WhichKey + -- Keymaps use("folke/which-key.nvim") + use("mrjones2014/legendary.nvim") -- Illuminate use("RRethy/vim-illuminate")