aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/config
diff options
context:
space:
mode:
authordacctal <120422854+dacctal@users.noreply.github.com>2026-03-05 01:21:45 +0000
committerdacctal <120422854+dacctal@users.noreply.github.com>2026-03-05 01:21:45 +0000
commit69a722cfd33076a4d63f1d49e52bed427453eabe (patch)
tree56545e93c12a8232058a0ab2b258546418656e03 /.config/nvim/lua/config
initial commit
Diffstat (limited to '.config/nvim/lua/config')
-rwxr-xr-x.config/nvim/lua/config/keymaps.lua11
-rw-r--r--.config/nvim/lua/config/lazy.lua35
-rwxr-xr-x.config/nvim/lua/config/options.lua40
3 files changed, 86 insertions, 0 deletions
diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua
new file mode 100755
index 0000000..a6a9a9e
--- /dev/null
+++ b/.config/nvim/lua/config/keymaps.lua
@@ -0,0 +1,11 @@
+localopts = { noremap = true, silent = true }
+
+vim.g.mapleader = " "
+vim.g.maplocalleader = " "
+
+vim.keymap.set({"n", "v"}, "y", '"+y', { noremap = true, silent = true })
+
+vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "moves lines down in visual selection" })
+vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "moves lines up in visual selection" })
+
+vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua
new file mode 100644
index 0000000..c381a4b
--- /dev/null
+++ b/.config/nvim/lua/config/lazy.lua
@@ -0,0 +1,35 @@
+-- Bootstrap lazy.nvim
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+ local lazyrepo = "https://github.com/folke/lazy.nvim.git"
+ local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
+ if vim.v.shell_error ~= 0 then
+ vim.api.nvim_echo({
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ }, true, {})
+ vim.fn.getchar()
+ os.exit(1)
+ end
+end
+vim.opt.rtp:prepend(lazypath)
+
+-- Make sure to setup `mapleader` and `maplocalleader` before
+-- loading lazy.nvim so that mappings are correct.
+-- This is also a good place to setup other settings (vim.opt)
+vim.g.mapleader = " "
+vim.g.maplocalleader = "\\"
+
+-- Setup lazy.nvim
+require("lazy").setup({
+ spec = {
+ -- import your plugins
+ { import = "plugins" },
+ },
+ -- Configure any other settings here. See the documentation for more details.
+ -- colorscheme that will be used when installing plugins.
+ install = { colorscheme = { "habamax" } },
+ -- automatically check for plugin updates
+ checker = { enabled = true },
+})
diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua
new file mode 100755
index 0000000..03cdf88
--- /dev/null
+++ b/.config/nvim/lua/config/options.lua
@@ -0,0 +1,40 @@
+vim.cmd("let g:netrw_banner = 0")
+vim.cmd("set termguicolors")
+
+vim.opt.guicursor = ""
+vim.opt.nu = true
+vim.opt.relativenumber = true
+
+vim.opt.tabstop = 2
+vim.opt.softtabstop = 2
+vim.opt.shiftwidth = 2
+vim.opt.expandtab = true
+vim.opt.autoindent = true
+vim.opt.smartindent = true
+vim.opt.wrap = true
+
+vim.opt.swapfile = false
+vim.opt.backup = false
+vim.opt.undofile = true
+
+vim.opt.incsearch = true
+vim.opt.inccommand = "split"
+vim.opt.ignorecase = true
+vim.opt.smartcase = true
+
+vim.opt.termguicolors = true
+vim.opt.background = "dark"
+vim.opt.scrolloff = 8
+vim.opt.signcolumn = "yes"
+
+vim.opt.backspace = { "start", "eol", "indent" }
+
+vim.opt.splitright = true
+vim.opt.splitbelow = true
+
+vim.opt.hlsearch = true
+
+vim.opt.mouse = "a"
+vim.g.editorconfig = true
+
+vim.g.markdown_folding = 1