add some keymaps
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
"Korean-IME.nvim": { "branch": "master", "commit": "c733599b9219e25bb05d8aa0467327edc769be94" },
|
"Korean-IME.nvim": { "branch": "master", "commit": "c733599b9219e25bb05d8aa0467327edc769be94" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||||
"blink.download": { "branch": "main", "commit": "86361b98f3c8317904a08e3bd12cf3cdcbe3e925" },
|
"blink.download": { "branch": "main", "commit": "86361b98f3c8317904a08e3bd12cf3cdcbe3e925" },
|
||||||
@@ -20,9 +21,11 @@
|
|||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" },
|
"neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||||
|
"neotest": { "branch": "master", "commit": "7166dc36af2760a76479e021e0521e23f62165f1" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
|
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" },
|
"nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" },
|
"nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
||||||
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
|
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
-- LSP keymaps
|
-- LSP keymaps
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- Go to definition
|
-- Go to definition
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||||
|
|
||||||
@@ -23,4 +25,13 @@ vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
|||||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||||
|
|
||||||
-- Code actions
|
-- Code actions
|
||||||
vim.keymap.set("n", "<leader>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', '<C-h>', '<C-w>h', opts)
|
||||||
|
vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
|
||||||
|
vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
|
||||||
|
vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
|
||||||
|
|||||||
@@ -3,5 +3,8 @@ return {
|
|||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
opts = {},
|
opts = {},
|
||||||
keys = {
|
keys = {
|
||||||
|
{ "<leader>dvo", "<Cmd>DiffviewOpen<CR>", desc = "Open Diff view" },
|
||||||
|
{ "<leader>dvc", "<Cmd>DiffviewClose<CR>", desc = "Close Diff view" },
|
||||||
|
{ "<leader>dvf", "<Cmd>DiffviewFocusFiles<CR>", desc = "Focus file in Diff view" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
9
lua/plugins/neotest.lua
Normal file
9
lua/plugins/neotest.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user