Skip to content

Commit

Permalink
Added Telescope keymappings to which-key and modified readme
Browse files Browse the repository at this point in the history
  • Loading branch information
prrockzed committed Oct 2, 2024
1 parent 71d2d75 commit 37d29d3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ To get started with nvimDev, you’ll need the following:

- **Operating System**: Linux/MacOS/WSL (Windows support coming soon)
- **[Neovim](https://github.com/neovim/neovim/releases/tag/stable)**: Version 0.10.0+ (built with LuaJIT)
- **[Nerd Font](https://www.nerdfonts.com/font-downloads)**: Optional for enhanced UI
- **Terminal**: One with true color support (optional for better aesthetics)
- **[Nerd Font](https://www.nerdfonts.com/font-downloads)**: For enhanced UI
- **[Clipboard-Tool](https://neovim.io/doc/user/provider.html#clipboard-tool)**: Essential for integrating with the system clipboard
- **Optional(but Recommended):**
- Terminal: One with true color support (For better aesthetics)
- [Ripgrep](https://github.com/BurntSushi/ripgrep) - Live grep telescope search (<Leader>Fl)

---

Expand Down
34 changes: 32 additions & 2 deletions lua/nvimdev/plugin_config/whichkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,36 @@ if not status_ok then
end

local mappings = {
{ "<leader>N", "<cmd> enew <CR>", desc = "New buffer", nowait = true, remap = false },
{ "<leader>N", "<cmd> enew <CR>", desc = "New Buffer", nowait = true, remap = false },
{ "<leader>c", "<cmd> BufferClose <CR>", desc = "Close Buffer", nowait = true, remap = false },
{ "<leader>e", "<cmd> NvimTreeToggle<cr>", desc = "Nvim Tree Toggle", nowait = true, remap = false },
{ "<leader>e", "<cmd> NvimTreeToggle<CR>", desc = "Nvim Tree Toggle", nowait = true, remap = false },
{ "<leader>q", "<cmd> q! <CR>", desc = "Quit", nowait = true, remap = false },
{ "<leader>w", "<cmd> w! <CR><CR>", desc = "Save", nowait = true, remap = false },
{ "<leader>f", "<cmd> Telescope find_files <CR>", desc = "Find Files", nowait = true, remap = false },
{ "<leader>p", "<cmd> Telescope projects <CR>", desc = "Projects", nowait = true, remap = false },

-- Diagnostics
{ "<leader>d", group = "Diagnostics", nowait = true, remap = false },
{ "<leader>db", "<cmd> Telescope diagnostics bufnr=0 <CR>", desc = "Buffer Diagnostics", nowait = true, remap = false },
{ "<leader>dp", "<cmd> Telescope diagnostics <CR>", desc = "Workspace Diagnostics", nowait = true, remap = false },

-- Finding files/texts etc
{ "<leader>F", group = "Find", nowait = true, remap = false },
{ "<leader>Fa", "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", desc = "Find All", nowait = true, remap = false },
{ "<leader>Fl", "<cmd> Telescope live_grep <CR>", desc = "Find Text", nowait = true, remap = false },
{ "<leader>Fb", "<cmd> Telescope buffers <CR>", desc = "Find Buffers", nowait = true, remap = false },
{ "<leader>Fh", "<cmd> Telescope help_tags <CR>", desc = "Help Page", nowait = true, remap = false },
{ "<leader>Fo", "<cmd> Telescope oldfiles <CR>", desc = "Find Old Files", nowait = true, remap = false },
{ "<leader>Fk", "<cmd> Telescope filetypes <CR>", desc = "Find Types", nowait = true, remap = false },
{ "<leader>Fc", "<cmd> Telescope current_buffer_fuzzy_find <CR>", desc = "Find in Current Buffer", nowait = true, remap = false },

-- Git
{ "<leader>g", group = "Git", nowait = true, remap = false },
{ "<leader>gb", "<cmd> Telescope git_branches <CR>", desc = "Git branches", nowait = true, remap = false },
{ "<leader>gc", "<cmd> Telescope git_commits <CR>", desc = "Git commit", nowait = true, remap = false },
{ "<leader>gf", "<cmd> Telescope git_files <CR>", desc = "Git files", nowait = true, remap = false },
{ "<leader>gh", "<cmd> Telescope git_stash <CR>", desc = "Git stash", nowait = true, remap = false },
{ "<leader>gs", "<cmd> Telescope git_status <CR>", desc = "Git Status", nowait = true, remap = false },

-- Buffer management using Barbar plugin
{ "<leader>B", group = "Buffer", nowait = true, remap = false },
Expand Down Expand Up @@ -39,6 +64,11 @@ local mappings = {
{ "<leader>slr", "<cmd> Lazy reload <CR>", desc = "Reload", nowait = true, remap = false },
{ "<leader>sls", "<cmd> Lazy sync <CR>", desc = "Sync", nowait = true, remap = false },
{ "<leader>slu", "<cmd> Lazy update <CR>", desc = "Update", nowait = true, remap = false },

-- Setup Releated Keymappings
{ "<leader>z", group = "Setup Keys", nowait = true, remap = false },
{ "<leader>zt", "<cmd> Telescope colorscheme <CR>", desc = "Coloschemes", nowait = true, remap = false },
{ "<leader>zh", "<cmd> checkhealth <CR>", desc = "Checkhealth", nowait = true, remap = false },
}

wk.add(mappings)

0 comments on commit 37d29d3

Please sign in to comment.