diff --git a/Cheatsheet.md b/Cheatsheet.md new file mode 100644 index 00000000..8831fec0 --- /dev/null +++ b/Cheatsheet.md @@ -0,0 +1,140 @@ +### Neovim Keybinds Cheatsheet + +This cheatsheet provides a structured overview of keybindings found in your Neovim configuration files. + +#### General Keymaps + +* ``: Clear highlights on search. + +* `q`: Open diagnostic Quickfix list. + +* ``: Exit terminal mode. + +* ``: Echo "Use h to move left!!". + +* ``: Echo "Use l to move right!!". + +* ``: Echo "Use k to move up!!". + +* ``: Echo "Use j to move down!!". + +* ``: Move focus to the left window. + +* ``: Move focus to the right window. + +* ``: Move focus to the lower window. + +* ``: Move focus to the upper window. + +#### GitSigns Keymaps + +* `n`\]c\`: Jump to next git change (normal mode). + +* `n`\[`c`: Jump to previous git change (normal mode). + +* `v`hs\`: Stage hunk (visual mode). + +* `v`hr\`: Reset hunk (visual mode). + +* `n`hs\`: Stage hunk (normal mode). + +* `n`hr\`: Reset hunk (normal mode). + +* `n`hS\`: Stage buffer (normal mode). + +* `n`hu\`: Undo stage hunk (normal mode). + +* `n`hR\`: Reset buffer (normal mode). + +* `n`hp\`: Preview hunk (normal mode). + +* `n`hb\`: Blame line (normal mode). + +* `n`hd\`: Diff against index (normal mode). + +* `n`hD\`: Diff against last commit (normal mode). + +* `n`tb\`: Toggle git show blame line (normal mode). + +* `n`tD\`: Toggle git show Deleted (normal mode). + +#### Debugging Keymaps + +* ``: Start/Continue debugging. + +* ``: Step Into. + +* ``: Step Over. + +* ``: Step Out. + +* `b`: Toggle Breakpoint. + +* `B`: Set Breakpoint (with condition prompt). + +* ``: See last session result. + +#### Telescope Keymaps + +* `sh`: Search Help. + +* `sk`: Search Keymaps. + +* `sf`: Search Files. + +* `ss`: Select Telescope Builtins. + +* `sw`: Search current Word. + +* `sg`: Search by Grep. + +* `sd`: Search Diagnostics. + +* `sr`: Resume last search. + +* `s.`: Search Recent Files. + +* ``: Find existing buffers. + +* `/`: Fuzzily search in current buffer. + +* `s/`: Live Grep in Open Files. + +* `sn`: Search Neovim files (in config directory). + +#### LSP (Language Server Protocol) Keymaps + +* `grn`: \[R\]e\[n\]ame. + +* `gra`: \[G\]oto Code \[A\]ction (normal and visual modes). + +* `grr`: \[G\]oto \[R\]eferences. + +* `gri`: \[G\]oto \[I\]mplementation. + +* `grd`: \[G\]oto \[D\]efinition. + +* `grD`: \[G\]oto \[D\]eclaration. + +* `gO`: Open Document Symbols. + +* `gW`: Open Workspace Symbols. + +* `grt`: \[G\]oto \[T\]ype Definition. + +* `th`: [T]oggle Inlay [H]ints. + +#### Neo-tree Keymaps + +* `e`: Toggle Neo-tree. + +* `E`: Reveal current file in Neo-tree. + +* `b`: Toggle Neo-tree (buffers). + +* `g`: Toggle Neo-tree (git_status). + +#### Conform (Autoformat) Keymaps + +* `f`: Format buffer. + diff --git a/Cheatsheet.pdf b/Cheatsheet.pdf new file mode 100644 index 00000000..a20f5406 Binary files /dev/null and b/Cheatsheet.pdf differ diff --git a/init.lua b/init.lua index b98ffc61..e60ffa3c 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -185,10 +185,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move left!!"') +vim.keymap.set('n', '', 'echo "Use l to move right!!"') +vim.keymap.set('n', '', 'echo "Use k to move up!!"') +vim.keymap.set('n', '', 'echo "Use j to move down!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -437,6 +437,14 @@ require('lazy').setup({ vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + -- Neo-tree Keymaps (add these to your init.lua) + -- These are common mappings often found in Kickstart.nvim configurations for Neo-tree. + -- Ensure nvim-neo-tree/neo-tree.nvim is correctly installed and loaded. + vim.keymap.set('n', 'e', ':Neotree toggle', { desc = 'Toggle Neo-tree' }) + vim.keymap.set('n', 'E', ':Neotree reveal', { desc = 'Reveal current file in Neo-tree' }) + vim.keymap.set('n', 'b', ':Neotree buffers', { desc = 'Toggle Neo-tree (buffers)' }) + vim.keymap.set('n', 'g', ':Neotree git_status', { desc = 'Toggle Neo-tree (git_status)' }) + -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. @@ -973,12 +981,12 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000..e6a3906e --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,34 @@ +{ + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, + "fidget.nvim": { "branch": "main", "commit": "c1725fbadd99c810273b202d67dbfedf66e61eaf" }, + "gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f2fa60409630ec2d24acf84494fb55e1d28d593c" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" }, + "mini.nvim": { "branch": "main", "commit": "c122e852517adaf7257688e435369c050da113b1" }, + "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" }, + "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "9c6207559297b24f0b7c32829f8e45f7d65b991f" }, + "nvim-lspconfig": { "branch": "master", "commit": "177be29e7b9c084c9200ee4033eb66e04ac536ec" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index c7067891..a541f7fd 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -10,16 +10,16 @@ return { 'MunifTanjim/nui.nvim', }, lazy = false, - keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, - }, + -- keys = { + -- { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + --}, + -- opts = { + -- filesystem = { + -- window = { + -- mappings = { + -- ['\\'] = 'close_window', + -- }, + -- }, + -- }, + --}, }