diff --git a/nvim/README.md b/nvim/README.md index 185280b..5580008 100644 --- a/nvim/README.md +++ b/nvim/README.md @@ -1,4 +1,141 @@ -# 💤 LazyVim +# List of keymaps -A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). -Refer to the [documentation](https://lazyvim.github.io/installation) to get started. +## Space as leader + +## Debugging +| key | Description | +| --- | ------------------------- | +| F5 | toggle breakpoint | +| F6 | step over breakpoint | +| F7 | step into breakpoint | +| F8 | start debugging | +| F9 | continue from breakpoint | +| F10 | close debug UI | + +## Nerd Tree +| key | Description | +| --- | ------------------------- | +| f |toggle open | +| a |create new file | +| d |remove file | +| r |rename file | +| y |copy name | +| Y |copy path | +| x |cut file | +| c |copy file | +| p |paste file | +| f |filter (inside nvim tree) | +| E |expand all folders | +| W |collapse all folders | + +## buffer switching +| key | Description | +| --- | ------------------------- | +| F1 | next buffer (cycles) | +| F2 | previous buffer (cycles) | + +## formatting +| key | Description | +| --- | ------------------------- | +| F4 | format this file | + +## telescope +| key | Description | +| --- | ------------------------- | +| ff | find files | +| fg | live ripgrep | +| fb | find buffers | +| fh | help for functions etc | +| fp | find projects | +| fb | file browser | + +### telescope git +| key | Description | +| ---------- | ------------------------- | +| gq | show commits | +| gw | show commits with diff | +| ge | show branches | +| gr | show git status | +| ga | show git stash | + +### project telescope + +
normal mode insert mode
+ +| key | Description | +| --- | --------------------------------- | +| d | delete project | +| r | rename project | +| c | create project | +| s | search files in project | +| b | browse files in project | +| w | change directory to project | +| R | recently opened files in project | +| f | find file within project | + + +| key | Description | +| -------- | --------------------------------- | +| Ctrl + d | delete project | +| Ctrl + v | rename project | +| Ctrl + a | create project | +| Ctrl + s | search files in project | +| Ctrl + b | browse files in project | +| Ctrl + l | change directory to project | +| Ctrl + r | recently opened files in project | +| Ctrl + f | find file within project | + +
+ + +## toggletrouble +| key | Description | +| -------- | ------------------------- | +| Ctrl + f | show errors and warnings | + +## cmp +Note, these require the cmp list view to be open to do anything! +| key | Description | +| ----------- | --------------------------------------------------------- | +| Ctrl + b | scroll docs up | +| Ctrl + f | scroll docs down | +| Ctrl + e | cancel cmp | +| Enter | write selected suggestion (does nothing if not selected) | +| Tab |scroll down through suggestion list | +| Shift + Tab | scroll up through suggestion list | + +## LSP +| key | Description | +| ----------- | ---------------------- | +| Leader + a | go to declaration | +| Leader + s | go to definition | +| Leader + d | go to type definitions | +| Leader + f | go to references | +| Leader + q | execute code actions | +| Leader + w | signature help | +| Leader + e | hover | +| Leader + r | rename | + +## snippets +These require you to be inside a snippet! +| key | Description | +| -------- | ------------------------- | +| Ctrl + j | jump to next entry | +| Ctrl + k | jump to previous entry | + +## Leap +| key | Description | +| -------- | ------------------------------------------------------ | +| s | followed by 2 other characters and the marker to jump | + +## Dashboard +only available on dashboard +| key | Description | +| --- | ------------------------- | +| f | file | +| e | new file | +| p | find project | +| r | recently used files | +| t | find text | +| c | open config | +| q | quit | diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index b685fe4..56ca958 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "LazyVim": { "branch": "main", "commit": "befa6c67a4387b0db4f8421d463f5d03f91dc829" }, "LuaSnip": { "branch": "master", "commit": "d33cf7de14eea209b8ed4a7edaed72f0b8cedb30" }, - "alpha-nvim": { "branch": "main", "commit": "c46c0c82d528835949edbf08dc1c6f69c0091dd9" }, + "alpha-nvim": { "branch": "main", "commit": "b6c7b5d9d6d2633722255abf2be3ecb8733e8d2d" }, "bufferline.nvim": { "branch": "main", "commit": "cbb798dd2db7841550cd2c6c6dde12dfda055928" }, "catppuccin": { "branch": "main", "commit": "4175759297350557315987d479fb687a9f0b781f" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -50,6 +50,7 @@ "nvim-web-devicons": { "branch": "master", "commit": "4709a504d2cd2680fb511675e64ef2790d491d36" }, "persistence.nvim": { "branch": "main", "commit": "d8a3eda0e19b4d5f3180fc832c25baab1709f2a1" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "6eb6bb45b7a9bed94a464a3e1dadfe870459628c" }, "telescope-project.nvim": { "branch": "master", "commit": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope.nvim": { "branch": "master", "commit": "a486ac3e8fb2198f3636da1927ed57a28836fbd8" }, diff --git a/nvim/lua/plugins/dap.lua b/nvim/lua/plugins/dap.lua index 1ca2b55..4a3fab5 100644 --- a/nvim/lua/plugins/dap.lua +++ b/nvim/lua/plugins/dap.lua @@ -1,6 +1,7 @@ return { { "mfussenegger/nvim-dap", + lazy = true, dependencies = { "rcarriga/nvim-dap-ui", "theHamsta/nvim-dap-virtual-text", diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index 64b754b..1c2b934 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -1,6 +1,7 @@ return { { "neovim/nvim-lspconfig", + lazy = true, event = { "BufReadPre", "BufNewFile" }, dependencies = { { "folke/neoconf.nvim", cmd = "Neoconf", config = true }, diff --git a/nvim/lua/plugins/plugins.lua b/nvim/lua/plugins/plugins.lua index 6c379eb..5eae06e 100644 --- a/nvim/lua/plugins/plugins.lua +++ b/nvim/lua/plugins/plugins.lua @@ -7,9 +7,12 @@ return { }, { "akinsho/toggleterm.nvim", + lazy = true, }, { "brenoprata10/nvim-highlight-colors", + lazy = true, + event = { "BufReadPre", "BufNewFile" }, config = function(_, _) require("nvim-highlight-colors").setup() vim.cmd(":hi clear CursorLine") @@ -19,30 +22,41 @@ return { }, { "gpanders/editorconfig.nvim", + event = { "BufReadPre", "BufNewFile" }, + lazy = true, }, { "lvimuser/lsp-inlayhints.nvim", + event = { "BufReadPre", "BufNewFile" }, + lazy = true, }, { "ThePrimeagen/harpoon", + lazy = true, config = function() require("telescope").load_extension("harpoon") end, }, { "iamcco/markdown-preview.nvim", + lazy = true, + event = "FileType markdown", + build = "cd app && yarn install", }, { "nvim-telescope/telescope-project.nvim", + lazy = true, }, { "nvim-telescope/telescope-file-browser.nvim", + lazy = true, config = function() require("telescope").load_extension("file_browser") end, }, { "jvgrootveld/telescope-zoxide", + lazy = true, config = function() local z_utils = require("telescope._extensions.zoxide.utils") local t = require("telescope")