vim.g.mapleader = " " vim.g.maplocalleader = " " vim.opt.number = true vim.opt.clipboard = "unnamedplus" vim.opt.termguicolors = true vim.opt.cursorline = true vim.opt.mouse = "a" vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.wildmode = "longest:full,full" vim.opt.expandtab = true vim.opt.smarttab = true vim.opt.tabstop = 2 vim.opt.shiftwidth = 2 vim.opt.smartindent = true vim.opt.list = true vim.opt.listchars:append("space:⋅") vim.opt.completeopt = "menu,menuone,noselect" vim.keymap.set("i", "jj", "", { noremap = true }) vim.keymap.set("n", "x", '"_x', { noremap = true }) vim.keymap.set("n", "s", '"_s', { noremap = true }) vim.keymap.set("n", "h", "^", { noremap = true }) vim.keymap.set("n", "l", "$", { noremap = true }) vim.keymap.set("v", "h", "^", { noremap = true }) vim.keymap.set("v", "l", "$", { noremap = true }) vim.keymap.set("n", "w", ":w") vim.keymap.set("n", "", ":nohlsearch") -- terminal vim.keymap.set("t", "", "", { noremap = true }) local function float_term(cmd) local opts = { size = { width = 0.9, height = 0.9 } } require("lazy.util").float_term(cmd, opts) end vim.keymap.set("n", "gg", function() float_term({ "lazygit" }) end) -- buffers vim.keymap.set("n", "[b", "bprevious", { desc = "Prev buffer" }) vim.keymap.set("n", "]b", "bnext", { desc = "Next buffer" }) -- window vim.keymap.set("n", "ww", "p", { desc = "Other window" }) vim.keymap.set("n", "wd", "c", { desc = "Delete window" }) vim.keymap.set("n", "w-", "s", { desc = "Split window below" }) vim.keymap.set("n", "w|", "v", { desc = "Split window right" }) vim.keymap.set("n", "-", "s", { desc = "Split window below" }) vim.keymap.set("n", "|", "v", { desc = "Split window right" }) -- tabs vim.keymap.set("n", "l", "tablast", { desc = "Last Tab" }) vim.keymap.set("n", "f", "tabfirst", { desc = "First Tab" }) vim.keymap.set("n", "", "tabnew", { desc = "New Tab" }) vim.keymap.set("n", "]", "tabnext", { desc = "Next Tab" }) vim.keymap.set("n", "d", "tabclose", { desc = "Close Tab" }) vim.keymap.set("n", "[", "tabprevious", { desc = "Previous Tab" }) local lazypath = "@lazy_nvim@" vim.opt.rtp:prepend(lazypath) require("lazy").setup({ defaults = { lazy = true }, performance = { rtp = { disabled_plugins = { "gzip", "matchit", "matchparen", "netrwPlugin", "tarPlugin", "tohtml", "tutor", "zipPlugin", }, }, }, spec = "plugins", }) require("misc")