All the latest changes.

This commit is contained in:
ikolokolnikov committed 2026-09-15 16:19:34 -07:00
1 parent 9632256e1b
commit cef83f1278
20 files changed
+438 -136

No files matched your search

+39 -21
View File
@@ -44,6 +44,10 @@ require("lazy").setup({
-- mappings here...
end
},
{
"L3MON4D3/LuaSnip",
version = "v2.5",
},
},
install = { colorscheme = { "habamax" } },
@@ -82,27 +86,41 @@ vim.opt.signcolumn = "auto"
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
function! ResizeIfTooWide()
let max_width = float2nr(&columns * 0.8)
if winwidth(0) > max_width
execute 'vertical resize ' . float2nr(&columns * 0.5)
endif
endfunction
----- Keybinds ------------------------------------------------------------
local map = vim.keymap.set
local NS = { noremap = true, silent = true }
map("n", "K", "<Nop>", NS)
map("v", ">", ">gv", NS)
map("v", "<", "<gv", NS)
map("v", "J", ":m '>+1<CR>gv=gv", NS)
map("v", "K", ":m '<-2<CR>gv=gv", NS)
map("n", "H", ":bnext<CR>zz", NS)
map("n", "L", ":bprev<CR>zz", NS)
map("n", ",", ":copen<CR>", NS)
map("n", ">", ":cn<CR>", NS)
map("n", "<", ":cp<CR>", NS)
map("n", "\\", ":noh<CR>", NS)
map("n", "E", ":Ex<CR>", NS)
map("n", "<space>z", ":set relativenumber<CR>", NS)
map("n", "<space>x", ":set norelativenumber<CR>", NS)
map("n", "gb", ":make<CR>", NS)
map("n", "gs", ":w<CR>", NS)
map("n", "ghp", ":Gitsigns preview_hunk_inline<CR>", NS)
map("n", "gs", ":w<CR>", NS)
map('n', '<leader>ff', function() require('telescope.builtin').find_files() end, NS)
map('n', '<leader>fg', function() require('telescope.builtin').live_grep() end, NS)
map('x', '<leader>ga', function() require('align').align_to_string({ preview = true, regex = false }) end, NS)
map("n", "gw", ":bdelete<CR>", NS)
map("n", "K", "<Nop>", NS)
map("v", ">", ">gv", NS)
map("v", "<", "<gv", NS)
map("v", "J", ":m '>+1<CR>gv=gv", NS)
map("v", "K", ":m '<-2<CR>gv=gv", NS)
map("n", "H", ":bnext<CR>zz", NS)
map("n", "L", ":bprev<CR>zz", NS)
map("n", ",", ":copen<CR>", NS)
map("n", ">", ":cn<CR>", NS)
map("n", "<", ":cp<CR>", NS)
map("n", "\\", ":noh<CR>", NS)
map("n", "E", ":Ex<CR>", NS)
map("n", "<space>z", ":set relativenumber<CR>", NS)
map("n", "<space>x", ":set norelativenumber<CR>", NS)
map("n", "gb", ":make<CR>", NS)
map("n", "gs", ":w<CR>", NS)
map("n", "ghp", ":Gitsigns preview_hunk_inline<CR>", NS)
map("n", "gs", ":w<CR>", NS)
map('n', '<leader>ff', function() require('telescope.builtin').find_files() end, NS)
map('n', '<leader>fg', function() require('telescope.builtin').live_grep() end, NS)
map('x', '<leader>ga', function() require('align').align_to_string({ preview = true, regex = false }) end, NS)
map({'i'}, '<C-K>', function() require('luasnip').expand() end, NS)
map({'i', 's'}, '<C-L>', function() require('luasnip').jump( 1) end, NS)
map({'i', 's'}, '<C-J>', function() require('luasnip').jump(-1) end, NS)
map({'i', 's'}, '<C-E>', function() if require('luasnip').choice_active() then require('luasnip').change_choice(1) end end, NS)
map("n", "#", ":execute 'vertical resize ' . float2nr(&columns * 0.9)<CR>", NS)