diff options
| author | Skladnayazebra <skladnayazebra@gmail.com> | 2025-11-03 11:46:39 +0100 |
|---|---|---|
| committer | Skladnayazebra <skladnayazebra@gmail.com> | 2025-11-03 11:46:39 +0100 |
| commit | 555096c75f062d8617c1194e77da114ce7214adc (patch) | |
| tree | d14e3ef4bfad6c5eebc5c95d0b41ae7874c5f9b0 /nvim | |
| parent | c8556f25bf3ea38b8799d9612723e11526604c2c (diff) | |
| parent | 310444ee9a4dfac0621ddda255a9ffc05a616d13 (diff) | |
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/init.lua | 27 | ||||
| -rw-r--r-- | nvim/lazy-lock.json | 2 | ||||
| -rw-r--r-- | nvim/lua/config/fzf.lua | 4 | ||||
| -rw-r--r-- | nvim/lua/config/lazy.lua | 1 | ||||
| -rw-r--r-- | nvim/lua/config/lazygit.lua | 23 |
5 files changed, 30 insertions, 27 deletions
diff --git a/nvim/init.lua b/nvim/init.lua index eebfc1e..6384e83 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -7,9 +7,36 @@ vim.o.number = true vim.o.signcolumn = "yes" vim.cmd([[colorscheme gruvbox]]) +-- easier window navigation +vim.keymap.set('n', '<C-h>', '<C-w>h', { noremap = true, silent = true }) +vim.keymap.set('n', '<C-j>', '<C-w>j', { noremap = true, silent = true }) +vim.keymap.set('n', '<C-k>', '<C-w>k', { noremap = true, silent = true }) +vim.keymap.set('n', '<C-l>', '<C-w>l', { noremap = true, silent = true }) +-- <C-l> by default clears search highlight, so we remap it +vim.keymap.set('n', '<leader><C-l>', ':nohl<CR>', { noremap = true, silent = true }) +-- quick window close +vim.keymap.set('n', '<C-c>', '<C-w>c', { noremap = true, silent = true }) +-- quick file write +vim.keymap.set('n', '<leader>w', ':w<CR>', { noremap = true, silent = true }) + +-- LSP binds vim.keymap.set('n', 'gl', vim.diagnostic.open_float, { noremap = true, silent = true }) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true, silent = true }) vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { noremap = true, silent = true }) + +-- la - for LAzy (plugin manager) +vim.keymap.set('n', '<leader>la', ':Lazy<CR>', { noremap = true, silent = true }) + +-- Fugitive shortcuts +-- opens current file diff as vertical split +vim.keymap.set('n', '<leader>gd', ':Gvdiffsplit<CR>', { noremap = true, silent = true }) +-- opens git fugitive status and make it the only visible window (gs is for Git Status) +vim.keymap.set('n', '<leader>gs', ':Git<CR><C-w>o', { noremap = true, silent = true }) +-- opens blame mode. Navigate everywhere with <CR> +vim.keymap.set('n', '<leader>gb', ':Git blame<CR>', { noremap = true, silent = true }) +-- from fugitive version of file, takes you back to HEAD +vim.keymap.set('n', '<leader>ge', ':Gedit<CR>', { noremap = true, silent = true }) + vim.diagnostic.config({ virtual_text = true, }) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 24c25e3..8a481da 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -7,7 +7,7 @@ "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "lazy.nvim": { "branch": "main", "commit": "f0f5bbb9e5bfae5e6468f9359ffea3d151418176" }, "lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" }, - "nvim-lspconfig": { "branch": "master", "commit": "e25994a1c2373784364852cd904cb39b6d75f227" }, + "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, "nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, diff --git a/nvim/lua/config/fzf.lua b/nvim/lua/config/fzf.lua index ef85a94..35e9c88 100644 --- a/nvim/lua/config/fzf.lua +++ b/nvim/lua/config/fzf.lua @@ -2,8 +2,8 @@ require('fzf-lua').setup({}) local opts = { silent = true } -vim.keymap.set('n', '<leader>f', ':FzfLua global<CR>', opts) +vim.keymap.set('n', '<leader>o', ':FzfLua global<CR>', opts) -- o means Open vim.keymap.set('n', '<leader>r', ':FzfLua lsp_references<CR>', opts) -vim.keymap.set('n', '<leader>g', ':FzfLua live_grep<CR>', opts) +vim.keymap.set('n', '<leader>f', ':FzfLua live_grep<CR>', opts) -- f means Find vim.keymap.set('n', '<leader>b', ':FzfLua buffers<CR>', opts) vim.keymap.set('n', '<leader>?', ':FzfLua keymaps<CR>', opts) diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 913bacb..18fb522 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -58,7 +58,6 @@ require("lazy").setup({ opts = {}, }, { "prettier/vim-prettier" }, - require("config.lazygit"), require("config.blink-cmp"), }, install = { colorscheme = { "gruvbox" } }, diff --git a/nvim/lua/config/lazygit.lua b/nvim/lua/config/lazygit.lua deleted file mode 100644 index e1c548e..0000000 --- a/nvim/lua/config/lazygit.lua +++ /dev/null @@ -1,23 +0,0 @@ -vim.g.lazygit_floating_window_scaling_factor = 1 -vim.g.lazygit_floating_window_border_chars = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '} - -return { - "kdheepak/lazygit.nvim", - lazy = true, - cmd = { - "LazyGit", - "LazyGitConfig", - "LazyGitCurrentFile", - "LazyGitFilter", - "LazyGitFilterCurrentFile", - }, - -- optional for floating window border decoration - dependencies = { - "nvim-lua/plenary.nvim", - }, - -- setting the keybinding for LazyGit with 'keys' is recommended in - -- order to load the plugin when the command is run for the first time - keys = { - { "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" } - } -} |
