From 9e69e3554ee1dd56f055423de09a0a575fbe73b0 Mon Sep 17 00:00:00 2001 From: Marek Muzyka Date: Fri, 14 Nov 2025 19:26:59 +0100 Subject: Basic config --- lua/config/keymaps.lua | 17 +++++++++++++++++ lua/config/lazy.lua | 27 +++++++++++++++++++++++++++ lua/config/options.lua | 25 +++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 lua/config/keymaps.lua create mode 100644 lua/config/lazy.lua create mode 100644 lua/config/options.lua (limited to 'lua/config') diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua new file mode 100644 index 0000000..af9a88e --- /dev/null +++ b/lua/config/keymaps.lua @@ -0,0 +1,17 @@ +local map = vim.keymap.set + +-- move between windows +map("n", "", "h") +map("n", "", "j") +map("n", "", "k") +map("n", "", "l") + +-- clear highligths and command +map("n", "", "nohlsearchecho") + +-- file explorer +map("n", "-", "Ex") + +-- copy and paste using the system clipboard +map({"n", "v"}, "y", '"+y') +map({"n", "v"}, "p", '"+p') diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..f82efed --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,27 @@ +-- 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) + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + install = { colorscheme = { "gruvbox" } }, + change_detection = { notify = false }, + ui = { border = "rounded" } +}) diff --git a/lua/config/options.lua b/lua/config/options.lua new file mode 100644 index 0000000..00ebeff --- /dev/null +++ b/lua/config/options.lua @@ -0,0 +1,25 @@ +vim.g.mapleader = " " + +local opt = vim.opt + +opt.expandtab = true +opt.tabstop = 2 +opt.shiftwidth = 0 + +opt.nu = true +opt.rnu = true +opt.signcolumn = "yes" + +opt.splitright = true +opt.splitbelow = true + +opt.showmode = false + +opt.winborder = "rounded" + +opt.virtualedit = "block" + +-- netrw config +vim.g.netrw_banner = 0 + +vim.diagnostic.config({ virtual_text = true }) -- cgit v1.2.3