From 9e0e8c0286396cbc22b5174d6d7d6400e7f6f032 Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Sun, 7 Apr 2024 18:29:54 -0400 Subject: [PATCH] feat: update --- init.lua | 1 + lazy-lock.json | 1 + lua/config/dashboard.lua | 30 ++++++++++++++++++++++++++++++ lua/keymaps.lua | 1 - lua/options.lua | 6 ++++++ lua/plugins.lua | 15 ++++++++++++--- requirements.md | 2 ++ 7 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 lua/config/dashboard.lua diff --git a/init.lua b/init.lua index f61d512..28af065 100644 --- a/init.lua +++ b/init.lua @@ -13,4 +13,5 @@ require("config.fterm") require("config.harpoon") require("config.autopairs") require("config.autotags") +-- require("config.dashboard") require("keymaps") diff --git a/lazy-lock.json b/lazy-lock.json index 207940a..11a719b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -7,6 +7,7 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "copilot.vim": { "branch": "release", "commit": "7097b09e52621a97d11f254e04de5e5a0f26e5f5" }, + "dashboard-nvim": { "branch": "master", "commit": "681300934baf36f6184ca41f0b26aed22056d4ee" }, "harpoon": { "branch": "harpoon2", "commit": "da326d0438ac68dee9b6b62a734be940a8bd8405" }, "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, diff --git a/lua/config/dashboard.lua b/lua/config/dashboard.lua new file mode 100644 index 0000000..bc4bc83 --- /dev/null +++ b/lua/config/dashboard.lua @@ -0,0 +1,30 @@ +local dashboard = require("dashboard-nvim") + +dashboard.setup({ + theme = 'doom', + config = { + header = {}, --your header + center = { + { + icon = ' ', + icon_hl = 'Title', + desc = 'Find File ', + desc_hl = 'String', + key = 'b', + keymap = 'SPC f f', + key_hl = 'Number', + key_format = ' %s', -- remove default surrounding `[]` + action = 'lua print(2)' + }, + { + icon = ' ', + desc = 'Find Dotfiles', + key = 'f', + keymap = 'SPC f d', + key_format = ' %s', -- remove default surrounding `[]` + action = 'lua print(3)' + }, + }, + footer = {} --your footer + } +}) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 205cce0..a12361e 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -6,7 +6,6 @@ local api = vim.api -- Custom commands api.nvim_create_user_command('FTermToggle', fterm.toggle, { bang = true }) api.nvim_create_user_command('FTermClose', fterm.close, { bang = true }) - local mappings = { n = { -- highlighting diff --git a/lua/options.lua b/lua/options.lua index 3a59061..529829e 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -48,3 +48,9 @@ api.nvim_create_autocmd({ "BufWritePre" }, { pattern = { "*" }, command = [[if &filetype !~# 'lsp' | %s/\s\+$//e | endif]], }) +-- Startup +vim.api.nvim_create_autocmd("VimEnter", { + callback = function() + vim.defer_fn(function() vim.cmd("NvimTreeOpen") end, 100) -- Delays NVim Tree opening by 100ms + end +}) diff --git a/lua/plugins.lua b/lua/plugins.lua index 7cf0af0..4d2c511 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -10,9 +10,20 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then lazypath, }) end + vim.opt.rtp:prepend(lazypath) require("lazy").setup({ + { + 'nvimdev/dashboard-nvim', + event = 'VimEnter', + config = function() + require('dashboard').setup { + theme = "doom" + } + end, + dependencies = { { 'nvim-tree/nvim-web-devicons' } } + }, "tanvirtin/monokai.nvim", { "onsails/lspkind.nvim", @@ -69,9 +80,7 @@ require("lazy").setup({ 'windwp/nvim-autopairs', event = "InsertEnter", config = true - -- use opts = {} for passing setup options - -- this is equalent to setup({}) function }, 'windwp/nvim-ts-autotag', - 'nvim-treesitter/nvim-treesitter' + 'nvim-treesitter/nvim-treesitter', }) diff --git a/requirements.md b/requirements.md index 70e8965..995bfab 100644 --- a/requirements.md +++ b/requirements.md @@ -10,3 +10,5 @@ - extended history x - auto-pairs x - lua vim linting x +- dashboard +- debugger