diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 9a6e9c2..2191278 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -124,65 +124,19 @@ return { local mason_registry = require 'mason-registry' local vue_language_server_path = vim.fn.expand '$MASON/packages/vue-language-server/node_modules/@vue/language-server' local servers = { - -- -- clangd = {}, - -- -- gopls = {}, - -- -- pyright = {}, - -- -- rust_analyzer = {}, - -- -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs - -- -- - -- -- Some languages (like typescript) have entire language plugins that can be useful: - -- -- https://github.com/pmizio/typescript-tools.nvim - -- -- - -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- -- ts_ls = {}, - -- -- - -- - -- lua_ls = { - -- -- cmd = { ... }, - -- -- filetypes = { ... }, - -- -- capabilities = {}, - -- settings = { - -- Lua = { - -- completion = { - -- callSnippet = 'Replace', - -- }, - -- -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- -- diagnostics = { disable = { 'missing-fields' } }, - -- }, - -- }, - -- }, - -- ts_ls = { - -- init_options = { - -- plugins = { - -- { - -- name = '@vue/typescript-plugin', - -- location = vue_language_server_path, - -- languages = { 'vue' }, - -- }, - -- }, - -- preferences = { - -- importModuleSpecifierEnding = 'js', - -- importModuleSpecifierPreference = 'project-relative', - -- }, - -- }, - -- filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }, - -- capabilities = { - -- documentFormattingProvider = true, - -- documentRangeFormattingProvider = true, - -- }, - -- }, - -- - -- phpactor = { - -- on_attach = function(client, bufnr) - -- client.server_capabilities.documentFormattingProvider = false - -- end, - -- init_options = { - -- ['language_server_phpstan.enabled'] = false, - -- ['language_server_psalm.enabled'] = false, - -- ['language_server_php_cs_fixer.enabled'] = false, - -- ['language_server_php_cs_fixer.bin'] = vim.fn.expand '~/.local/share/composer/vendor/bin/php-cs-fixer', - -- }, - -- }, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, + lua_ls = { + settings = { + Lua = { + completion = { + callSnippet = 'Replace', + }, + }, + }, + }, phpactor = { init_options = { ['language_server_phpstan.enabled'] = false, diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index e86d389..e087757 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -8,7 +8,58 @@ 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, + session = false, + dirs = function() + return { + vim.fn.expand '~/Code/Sites/runcats', + vim.fn.expand '~/Code/Sites/moovaza', + 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 },