diff --git a/lazy-lock.json b/lazy-lock.json index c6a9805..bae718b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,5 +1,6 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "Korean-IME.nvim": { "branch": "master", "commit": "c733599b9219e25bb05d8aa0467327edc769be94" }, "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "blink.download": { "branch": "main", "commit": "86361b98f3c8317904a08e3bd12cf3cdcbe3e925" }, @@ -20,9 +21,11 @@ "neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, "neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "neotest": { "branch": "master", "commit": "7166dc36af2760a76479e021e0521e23f62165f1" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, "nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" }, "nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" }, "outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" }, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 41e2216..c72d9fc 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,6 +1,8 @@ -- LSP keymaps local opts = { noremap = true, silent = true } +vim.g.mapleader = " " + -- Go to definition vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) @@ -23,4 +25,13 @@ vim.keymap.set("n", "", vim.lsp.buf.signature_help, opts) vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- Code actions -vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) +vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) + +-- Show floating error +vim.keymap.set("n", "E", vim.diagnostic.open_float, opts) + +-- Window navigation with Ctrl + hjkl +vim.keymap.set('n', '', 'h', opts) +vim.keymap.set('n', '', 'j', opts) +vim.keymap.set('n', '', 'k', opts) +vim.keymap.set('n', '', 'l', opts) diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 0e844a4..8b2bde9 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -3,5 +3,8 @@ return { dependencies = { "nvim-tree/nvim-web-devicons" }, opts = {}, keys = { + { "dvo", "DiffviewOpen", desc = "Open Diff view" }, + { "dvc", "DiffviewClose", desc = "Close Diff view" }, + { "dvf", "DiffviewFocusFiles", desc = "Focus file in Diff view" }, }, } diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua new file mode 100644 index 0000000..71568f7 --- /dev/null +++ b/lua/plugins/neotest.lua @@ -0,0 +1,9 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "nvim-neotest/nvim-nio", + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter" + } +}