Improve dashboard
This commit is contained in:
@@ -249,15 +249,15 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
volar = {
|
-- volar = {
|
||||||
on_attach = function(client, bufnr)
|
-- on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
-- client.server_capabilities.documentFormattingProvider = false
|
||||||
end,
|
-- end,
|
||||||
capabilities = {
|
-- capabilities = {
|
||||||
documentFormattingProvider = true,
|
-- documentFormattingProvider = true,
|
||||||
documentRangeFormattingProvider = true,
|
-- documentRangeFormattingProvider = true,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
|
|
||||||
phpactor = {
|
phpactor = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
|
|||||||
@@ -8,7 +8,56 @@ return {
|
|||||||
-- or leave it empty to use the default settings
|
-- or leave it empty to use the default settings
|
||||||
-- refer to the configuration section below
|
-- refer to the configuration section below
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
dashboard = { enabled = true },
|
dashboard = {
|
||||||
|
enabled = true,
|
||||||
|
preset = {
|
||||||
|
keys = {
|
||||||
|
{ icon = ' ', key = 'f', desc = 'Find File', action = ":lua Snacks.dashboard.pick('files')" },
|
||||||
|
{ icon = ' ', key = 'n', desc = 'New File', action = ':ene | startinsert' },
|
||||||
|
{ icon = ' ', key = 'g', desc = 'Find Text', action = ":lua Snacks.dashboard.pick('live_grep')" },
|
||||||
|
{ icon = ' ', key = 'r', desc = 'Recent Files', action = ":lua Snacks.dashboard.pick('oldfiles')" },
|
||||||
|
{ icon = ' ', key = 'c', desc = 'Config', action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },
|
||||||
|
-- { icon = " ", key = "s", desc = "Restore Session", section = "session" },
|
||||||
|
{ icon = ' ', key = 'L', desc = 'Lazy', action = ':Lazy', enabled = package.loaded.lazy ~= nil },
|
||||||
|
{ icon = ' ', key = 'q', desc = 'Quit', action = ':qa' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
{ section = 'header' },
|
||||||
|
{ section = 'keys', gap = 1, padding = 1 },
|
||||||
|
{
|
||||||
|
pane = 2,
|
||||||
|
icon = ' ',
|
||||||
|
title = 'Projects',
|
||||||
|
section = 'projects',
|
||||||
|
indent = 2,
|
||||||
|
padding = 1,
|
||||||
|
dirs = function()
|
||||||
|
return {
|
||||||
|
vim.fn.expand '~/Code/Sites/runcats',
|
||||||
|
vim.fn.expand '~/Code/Sites/tuxtoolkit',
|
||||||
|
vim.fn.expand '~/Code/Sites/chrisstarling',
|
||||||
|
vim.fn.stdpath 'config',
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ pane = 2, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 },
|
||||||
|
{
|
||||||
|
pane = 2,
|
||||||
|
icon = ' ',
|
||||||
|
title = 'Git Status',
|
||||||
|
section = 'terminal',
|
||||||
|
enabled = function()
|
||||||
|
return Snacks.git.get_root() ~= nil
|
||||||
|
end,
|
||||||
|
cmd = 'git status --short --branch --renames',
|
||||||
|
height = 5,
|
||||||
|
padding = 1,
|
||||||
|
ttl = 5 * 60,
|
||||||
|
indent = 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
indent = { enabled = true },
|
indent = { enabled = true },
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
|
|||||||
Reference in New Issue
Block a user