From 1447abb240f77b24cbe65df1a1c56e155fa8114c Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 20 Feb 2023 16:43:33 +0000 Subject: [PATCH] Add dashboard and which_key plugins --- config/nvim/lua/plugins/catppuccin.lua | 30 ++++++++++++++++++-- config/nvim/lua/plugins/dashboard.lua | 38 ++++++++++++++++++++++++++ config/nvim/lua/plugins/telescope.lua | 23 +++++----------- config/nvim/lua/plugins/which_key.lua | 8 ++++++ config/nvim/lua/ui/catppuccin_opts.lua | 22 --------------- 5 files changed, 81 insertions(+), 40 deletions(-) create mode 100644 config/nvim/lua/plugins/dashboard.lua create mode 100644 config/nvim/lua/plugins/which_key.lua delete mode 100644 config/nvim/lua/ui/catppuccin_opts.lua diff --git a/config/nvim/lua/plugins/catppuccin.lua b/config/nvim/lua/plugins/catppuccin.lua index 0e513185..2e5be25d 100644 --- a/config/nvim/lua/plugins/catppuccin.lua +++ b/config/nvim/lua/plugins/catppuccin.lua @@ -6,7 +6,33 @@ return { config = function() vim.opt.termguicolors = true require "ui.fillchars" - require("catppuccin").setup(require "ui.catppuccin_opts") - vim.cmd "colorscheme catppuccin" + require("catppuccin").setup { + flavour = "macchiato", + -- transparent_background = true, + term_colors = true, + dim_inactive = { + enabled = true, + }, + integrations = { + dashboard = true, + gitsigns = true, + indent_blankline = { + enabled = true, + colored_indent_levels = true, + }, + cmp = true, + native_lsp = { + enabled = true, + }, + notify = true, + nvimtree = true, + treesitter = true, + treesitter_context = true, + telescope = true, + lsp_trouble = true, + which_key = true, + }, + } + vim.cmd.colorscheme "catppuccin" end, } diff --git a/config/nvim/lua/plugins/dashboard.lua b/config/nvim/lua/plugins/dashboard.lua new file mode 100644 index 00000000..00d2c3b7 --- /dev/null +++ b/config/nvim/lua/plugins/dashboard.lua @@ -0,0 +1,38 @@ +return { + "glepnir/dashboard-nvim", + event = "VimEnter", + config = function() + require("dashboard").setup { + theme = "hyper", + config = { + week_header = { + enable = true, + }, + shortcut = { + { desc = " Update", group = "@property", action = "Lazy update", key = "u" }, + { + icon = " ", + icon_hl = "@variable", + desc = "Files", + group = "Label", + action = "Telescope find_files", + key = "f", + }, + { + desc = " Apps", + group = "DiagnosticHint", + action = "Telescope app", + key = "a", + }, + { + desc = " dotfiles", + group = "Number", + action = "Telescope dotfiles", + key = "d", + }, + }, + }, + } + end, + dependencies = { { "nvim-tree/nvim-web-devicons" } }, +} diff --git a/config/nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua index 05804426..9c5696a6 100644 --- a/config/nvim/lua/plugins/telescope.lua +++ b/config/nvim/lua/plugins/telescope.lua @@ -15,27 +15,18 @@ return { local trouble = require "trouble.providers.telescope" require("telescope").setup { + defaults = { + layout_strategy = "cursor", + mappings = { + i = { [""] = trouble.open_with_trouble }, + n = { [""] = trouble.open_with_trouble }, + }, + }, extensions = { fzf = { fuzzy = true, -- false will only do exact matching override_generic_sorter = true, -- override the generic sorter override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - aerial = { - show_nesting = { - ["_"] = false, - python = true, - json = true, - yaml = true, - }, - }, - }, - defaults = { - mappings = { - i = { [""] = trouble.open_with_trouble }, - n = { [""] = trouble.open_with_trouble }, }, }, } diff --git a/config/nvim/lua/plugins/which_key.lua b/config/nvim/lua/plugins/which_key.lua new file mode 100644 index 00000000..82b680d0 --- /dev/null +++ b/config/nvim/lua/plugins/which_key.lua @@ -0,0 +1,8 @@ +return { + "folke/which-key.nvim", + config = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + require("which-key").setup {} + end, +} diff --git a/config/nvim/lua/ui/catppuccin_opts.lua b/config/nvim/lua/ui/catppuccin_opts.lua deleted file mode 100644 index 1e89be42..00000000 --- a/config/nvim/lua/ui/catppuccin_opts.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - flavour = "macchiato", - transparent_background = true, - term_colors = true, - integrations = { - gitsigns = true, - indent_blankline = { - enabled = true, - colored_indent_levels = true, - }, - cmp = true, - native_lsp = { - enabled = true, - }, - notify = true, - nvimtree = true, - treesitter = true, - treesitter_context = true, - telescope = true, - lsp_trouble = true, - }, -}