Merge pull request 'dashboard' (#6) from dashboard into main
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
28
README.md
28
README.md
@@ -10,11 +10,39 @@ A pre-configured, performance-oriented Neovim setup designed to get you from zer
|
||||
* **Modern Aesthetics:** Features the `tokyonight` color scheme with enabled transparency and `lualine` for a sleek, functional status bar.
|
||||
* **Syntax Highlighting:** Robust parsing for over 15 languages via `nvim-treesitter`.
|
||||
* **Git Integration:** Quick access to Git commands using `vim-fugitive`.
|
||||
* **Custom Dashboard:** A branded startup screen via `dashboard-nvim` with quick-access shortcuts to your most common actions.
|
||||
|
||||
## Essential Keybindings
|
||||
|
||||
The **Leader Key** is set to `Space`.
|
||||
|
||||
**Note:** Dashboard keybindings are active only on the startup screen and do not require the leader key prefix.
|
||||
|
||||
### Dashboard
|
||||
| Action | Keybinding | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| **File Explorer** | `cd` | Open Netrw directly from the dashboard. |
|
||||
| **Find Files** | `ff` | Fuzzy find files via Telescope. |
|
||||
| **Live Grep** | `fg` | Search across all files via Telescope. |
|
||||
| **Harpoon Menu** | `e` | Open the Harpoon quick menu. |
|
||||
| **Harpoon Search** | `fl` | Search Harpoon marks via Telescope. |
|
||||
| **Lazy Manager** | `z` | Open the Lazy plugin manager. |
|
||||
| **Help Tags** | `fh` | Search Neovim help tags via Telescope. |
|
||||
| **Quit** | `q` | Quit Neovim. |
|
||||
|
||||
### Dashboard
|
||||
| Action | Keybinding | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| **File Explorer** | `cd` | Open Netrw directly from the dashboard. |
|
||||
| **Find Files** | `ff` | Fuzzy find files via Telescope. |
|
||||
| **Live Grep** | `fg` | Search across all files via Telescope. |
|
||||
| **Harpoon Menu** | `e` | Open the Harpoon quick menu. |
|
||||
| **Harpoon Search** | `fl` | Search Harpoon marks via Telescope. |
|
||||
| **Lazy Manager** | `z` | Open the Lazy plugin manager. |
|
||||
| **Help Tags** | `fh` | Search Neovim help tags via Telescope. |
|
||||
| **Quit** | `q` | Quit Neovim. |
|
||||
|
||||
|
||||
### Navigation & Searching
|
||||
| Action | Keybinding | Description |
|
||||
| :--- | :--- | :--- |
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"nvim-treesitter": { "branch": "main", "commit": "2cc172c28e5550e00e6beead4599b1469469c1c7" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "a049339328e2599ad6e85a69fa034ac501e921b2" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||
|
||||
@@ -1,2 +1,32 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>cd", vim.cmd.Ex)
|
||||
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "netrw",
|
||||
callback = function(event)
|
||||
vim.schedule(function()
|
||||
vim.keymap.set("n", "<Esc>", function()
|
||||
vim.cmd("enew")
|
||||
vim.cmd("Dashboard")
|
||||
end, {
|
||||
buffer = event.buf,
|
||||
nowait = true,
|
||||
desc = "Return to Dashboard"
|
||||
})
|
||||
end)
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "netrw",
|
||||
callback = function(event)
|
||||
vim.schedule(function()
|
||||
vim.keymap.set("n", "<leader>;", function()
|
||||
vim.cmd("enew")
|
||||
vim.cmd("Dashboard")
|
||||
end, {
|
||||
buffer = event.buf,
|
||||
nowait = true, desc = "Return to Dashboard"
|
||||
})
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
42
lua/plugins/dashboard.lua
Normal file
42
lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
return {
|
||||
'nvimdev/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
opts = function()
|
||||
local logo = [[
|
||||
███╗ ███╗███████╗ █████╗ ███╗ ██╗███████╗██╗██╗ ██╗██╗███╗ ███╗
|
||||
████╗ ████║╚══███╔╝██╔══██╗████╗ ██║╚══███╔╝██║██║ ██║██║████╗ ████║
|
||||
██╔████╔██║ ███╔╝ ███████║██╔██╗ ██║ ███╔╝ ██║██║ ██║██║██╔████╔██║
|
||||
██║╚██╔╝██║ ███╔╝ ██╔══██║██║╚██╗██║ ███╔╝ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||
██║ ╚═╝ ██║███████╗██║ ██║██║ ╚████║███████╗██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||
]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
center = {
|
||||
-- Aligned to Mzansi Vim Essential Keybindings
|
||||
{ icon = " ", desc = " File Explorer ", key = "cd", action = "Explore" },
|
||||
{ icon = " ", desc = " Find Files ", key = "ff", action = "Telescope find_files" },
|
||||
{ icon = " ", desc = " Live Grep ", key = "fg", action = "Telescope live_grep" },
|
||||
{ icon = " ", desc = " Harpoon Menu ", key = "e", action = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end},
|
||||
{ icon = " ", desc = " Harpoon Search ", key = "fl", action = "Telescope harpoon marks" },
|
||||
{ icon = " ", desc = " Lazy Manager ", key = "z", action = "Lazy" },
|
||||
{ icon = " ", desc = " Help Tags ", key = "fh", action = "Telescope help_tags" },
|
||||
{ icon = " ", desc = " Quit ", key = "q", action = "qa" },
|
||||
},
|
||||
-- footer = { vim.fn.strftime("%Y-%m-%d %H:%M:%S") .. " • Mzansi Vim Kickstart" },
|
||||
footer = { "Let's Keep Working Hard Mzansi" },
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
||||
}
|
||||
Reference in New Issue
Block a user