-
-
Notifications
You must be signed in to change notification settings - Fork 200
Description
Good work on the recent update! I just moved over my config and had some things I wanted to suggest or bring to your attention.
If it's prefered, I can split these out into separate issues.
-
The doom dashboard is modifiable while hyper is not,
I assume there's a missingset nomodifiablefor the doom theme? -
Disable fillchar EndOfBuffer:
~for both themes.
While it's easy to use an autocmd to disable this withvim.opt_local.fillchar = { eob = " " }
Should this not be the default behaviour? I think it has a cleaner aesthetic across themes. -
Custom center description and shortcuts for doom theme has worse alignment than previous version.
Since updating the alignment is slightly off.
It's as if the shortcut string is not considered when calculating center position.I personally prefer the older representation for shortcuts like
SPC f rover implicitly setting dashboard keymaps.
As it looks more like emacs doom-dashboard and single letter keys are too easy to mess up.
Expectation:
- The user should not be allowed to enter insert mode in doom theme dashboard buffer.
- EndOfBuffer character
~should not be visible in dashboard buffer. - Description should be properly aligned between the previous and new version of the plugin.
Minimal config: init_minimal.lua
-- Minimal init
-- Define globals and leader keys
vim.g.mapleader = " "
vim.g.localleader = "\\"
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- dashboard desc formatting helper
local width = 24
local pad = function(str)
local whitespace = (" "):rep(math.abs(width - #str))
return ("%s%s"):format(str, whitespace)
end
-- Initialize plugin list
require("lazy").setup({
{ -- Dashboard / Start screen
"glepnir/dashboard-nvim",
event = "VimEnter",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
theme = "doom",
hide = {
statusline = false,
tabline = false,
winbar = true,
},
config = {
header = {
"",
"",
" ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗ ",
" ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║ ",
" ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║ ",
" ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║ ",
" ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ",
"",
string.format(
"--- [ %s.%s.%s%s ] ---",
vim.version().major,
vim.version().minor,
vim.version().patch,
vim.version().prerelease == true and "-dev" or ""
),
"",
},
center = {
{
icon = " ",
desc = pad("Recent"),
key = "SPC f r",
action = "Telescope oldfiles",
},
{
icon = " ",
desc = pad("Files"),
key = "SPC f f",
action = "Telescope find_files",
},
{
icon = " ",
desc = pad("Projects"),
key = "SPC f m",
action = "Telescope projects",
},
{
icon = " ",
desc = pad("Sessions"),
key = "SPC s l",
action = "Telescope session-lens search_session",
},
{
icon = " ",
desc = pad("Update"),
key = "SPC p u",
action = "Lazy update",
},
{
icon = " ",
desc = pad("Settings"),
key = "SPC f v",
action = 'lua require("plugins.telescope").search_vimfiles()',
},
{
icon = " ",
desc = pad("Exit"),
key = "SPC q",
action = "exit",
},
},
footer = (function()
local plugin_path = vim.fn.stdpath("data") .. "/lazy/"
local plugin_files = vim.fn.globpath(plugin_path, "*", 0, 1)
local plugin_count = vim.fn.len(plugin_files)
return { "", "", string.format("Started with %s detected plugins!", plugin_count) }
end)(),
},
},
},
})Screenshots: Attempting to reduce description padding doesn't offer better results.
Lines changed in init_minimal.lua
-- dashboard desc formatting helper
- local width = 24
+ local width = 12
local pad = function(str)
local whitespace = (" "):rep(math.abs(width - #str))
return ("%s%s"):format(str, whitespace)
end

