small enhancements
This commit is contained in:
parent
910ffc0108
commit
41a690135a
6 changed files with 43 additions and 7 deletions
2
init.lua
2
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")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -16,6 +16,7 @@ vim.api.nvim_create_autocmd({ "User" }, {
|
|||
vim.cmd([[
|
||||
set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
||||
set laststatus=0 | autocmd BufUnload <buffer> set laststatus=3
|
||||
:DisableWhitespace
|
||||
]])
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -95,6 +95,9 @@ keymap("n", "<leader>sp", ":lua require('spectre').open_file_search()<CR>", opts
|
|||
-- UndoTree
|
||||
keymap("n", "<leader>u", ":UndotreeToggle<CR>", opts)
|
||||
|
||||
-- Legendary
|
||||
keymap("n", "<C-p>", ":lua require('legendary').find()<CR>", opts)
|
||||
|
||||
-- Insert --
|
||||
|
||||
-- Visual --
|
||||
|
|
6
lua/user/legendary.lua
Normal file
6
lua/user/legendary.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
local ok, legendary = pcall(require, "legendary")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
legendary.setup()
|
|
@ -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")
|
||||
|
|
Reference in a new issue