diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md index 6a22e9d..9229b70 100644 --- a/nvim/.config/nvim/README.md +++ b/nvim/.config/nvim/README.md @@ -37,6 +37,11 @@ Telescope shortcuts: - `fb` list buffers - `fh` browse help tags +Git shortcuts: + +- `:Git` to run commands directly (`:Git status`, `:Git log --oneline`) +- `lg` open LazyGit + Oil usage: - `dl` opens the file browser @@ -70,7 +75,13 @@ Cycle through windows: Leave terminal mode and return to normal mode: ```vim - + +``` + +or + +```vim +<\\-Esc> ``` ## LSP @@ -87,9 +98,7 @@ Useful Mason commands: :checkhealth mason ``` -`ts_ls` provides TypeScript and JavaScript language server support after Mason installs `typescript-language-server`. - -When an LSP server is attached to the current buffer: +Useful LSP commands: - `gd` go to definition - `gD` go to declaration @@ -109,7 +118,7 @@ Diagnostics: ## Tree-sitter -Tree-sitter is managed with `nvim-treesitter` via `vim.pack`. `tree-sitter-cli` and a C compiler is required to be installed. +`tree-sitter-cli` and a C compiler is required to be installed. Useful commands: diff --git a/nvim/.config/nvim/lua/romanzy/keymaps.lua b/nvim/.config/nvim/lua/romanzy/keymaps.lua index 0c22b8f..c306f23 100644 --- a/nvim/.config/nvim/lua/romanzy/keymaps.lua +++ b/nvim/.config/nvim/lua/romanzy/keymaps.lua @@ -25,6 +25,7 @@ map("n", "ff", telescope_picker("find_files"), { desc = "find files" }) map("n", "fg", telescope_picker("live_grep"), { desc = "live grep" }) map("n", "fb", telescope_picker("buffers"), { desc = "find buffers" }) map("n", "fh", telescope_picker("help_tags"), { desc = "help tags" }) +map("n", "lg", "LazyGit", { desc = "open lazygit" }) -- map("n", "s", ":set spell!", { desc = "toggle spell" }) map("n", "sv", "vs", { desc = "split vertical" }) diff --git a/nvim/.config/nvim/lua/romanzy/plugins.lua b/nvim/.config/nvim/lua/romanzy/plugins.lua index af06b4a..6e73904 100644 --- a/nvim/.config/nvim/lua/romanzy/plugins.lua +++ b/nvim/.config/nvim/lua/romanzy/plugins.lua @@ -1,5 +1,6 @@ require("romanzy.plugins.rose-pine") require("romanzy.plugins.mini") +require("romanzy.plugins.lazygit") require("romanzy.plugins.oil") require("romanzy.plugins.telescope") require("romanzy.plugins.nvim-treesitter") diff --git a/nvim/.config/nvim/lua/romanzy/plugins/lazygit.lua b/nvim/.config/nvim/lua/romanzy/plugins/lazygit.lua new file mode 100644 index 0000000..9c49afe --- /dev/null +++ b/nvim/.config/nvim/lua/romanzy/plugins/lazygit.lua @@ -0,0 +1,10 @@ +vim.pack.add({ + { + src = "https://github.com/kdheepak/lazygit.nvim", + name = "lazygit.nvim", + }, + { + src = "https://github.com/nvim-lua/plenary.nvim", + name = "plenary.nvim", + }, +}) diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index 1c18167..7dcca8c 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -4,6 +4,10 @@ "rev": "d41468df1c53081c909fc78248cf233893b59809", "src": "https://codeberg.org/42nerds/header42.nvim" }, + "lazygit.nvim": { + "rev": "a04ad0dbc725134edbee3a5eea29290976695357", + "src": "https://github.com/kdheepak/lazygit.nvim" + }, "mason-lspconfig.nvim": { "rev": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76", "src": "https://github.com/mason-org/mason-lspconfig.nvim"