diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 6c34895..8f8ab4d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -249,15 +249,15 @@ return { }, }, - volar = { - on_attach = function(client, bufnr) - client.server_capabilities.documentFormattingProvider = false - end, - capabilities = { - documentFormattingProvider = true, - documentRangeFormattingProvider = true, - }, - }, + -- volar = { + -- on_attach = function(client, bufnr) + -- client.server_capabilities.documentFormattingProvider = false + -- end, + -- capabilities = { + -- documentFormattingProvider = true, + -- documentRangeFormattingProvider = true, + -- }, + -- }, phpactor = { on_attach = function(client, bufnr) diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index e86d389..a1643b0 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -8,7 +8,56 @@ return { -- or leave it empty to use the default settings -- refer to the configuration section below 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 }, input = { enabled = true }, notifier = { enabled = true },