From d0738bbf71b41b9394846cf9de96bbceeda7eebd Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Tue, 21 Oct 2025 20:26:16 +0200 Subject: feat: big refactor. --- lua/config/init.lua | 1 + lua/config/keybindings.lua | 20 +++++++------------- lua/config/pack.lua | 12 +++++------- lua/config/settings.lua | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 20 deletions(-) (limited to 'lua/config') diff --git a/lua/config/init.lua b/lua/config/init.lua index 33773ad..5ee3f6c 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -1,3 +1,4 @@ require('config.settings') require('config.keybindings') require('config.pack') +require('config.autocommands') diff --git a/lua/config/keybindings.lua b/lua/config/keybindings.lua index 6397476..69cf573 100644 --- a/lua/config/keybindings.lua +++ b/lua/config/keybindings.lua @@ -8,26 +8,20 @@ vim.keymap.set("n", " ", ":update :source", { desc = "Source cur -- format vim.keymap.set("n", "lf", vim.lsp.buf.format, { desc = "Format buffer with available lsp" }) --- setup mini.pick -vim.keymap.set("n", "ff", ":Pick files", { desc = "Search file in directory" }) -vim.keymap.set("n", "fh", ":Pick help", { desc = "Searcch neovim help" }) - --- move lines up or down -vim.keymap.set("n", "", ":m .+1==", { desc = "Move line down" }) -vim.keymap.set("n", "", ":m .-2==", { desc = "Move line up" }) -vim.keymap.set("v", "", ":m '>+1gv=gv", { desc = "Move selection down" }) -vim.keymap.set("v", "", ":m '<-2gv=gv", { desc = "Move selection up" }) +-- easy copy/cut/paste from system clipboard +vim.keymap.set({ "n", "v", "x" }, "y", '"+y', { desc = "Yank to system clipboard" }) +vim.keymap.set({ "n", "v", "x" }, "d", '"+d', { desc = "Cut to system clipboard" }) +vim.keymap.set({ "n", "v", "x" }, "p", '"+p', { desc = "Paste from system clipboard" }) -- better indenting in visual mode vim.keymap.set("v", "<", "", ">gv", { desc = "Indent right and reselect" }) -- file exploring -vim.keymap.set("n", "e", ":Oil", { desc = "Open oil file explorer" }) -- Copy Full File-Path vim.keymap.set("n", "yp", function() - local path = vim.fn.expand("%:p") - vim.fn.setreg("+", path) - print("file:", path) + local path = vim.fn.expand("%:p") + vim.fn.setreg("+", path) + print("file:", path) end) diff --git a/lua/config/pack.lua b/lua/config/pack.lua index e4e5443..7480a0c 100644 --- a/lua/config/pack.lua +++ b/lua/config/pack.lua @@ -1,14 +1,12 @@ vim.pack.add({ -- Colorscheme - {src = "https://github.com/ellisonleao/gruvbox.nvim"}, + { src = "https://github.com/ellisonleao/gruvbox.nvim" }, -- Treesitter parsers - {src = "https://github.com/nvim-treesitter/nvim-treesitter"}, + { src = "https://github.com/nvim-treesitter/nvim-treesitter" }, -- Preconfigured lsp's - {src = "https://github.com/neovim/nvim-lspconfig"}, - -- Nice file manager - {src = "https://github.com/stevearc/oil.nvim"}, + { src = "https://github.com/neovim/nvim-lspconfig" }, -- Amazing neovim bundle of plugins that are super nice - {src = "https://github.com/nvim-mini/mini.nvim"}, + { src = "https://github.com/nvim-mini/mini.nvim" }, -- Fix the annoying neovim+lua errors - {src = "https://github.com/folke/lazydev.nvim"}, + { src = "https://github.com/folke/lazydev.nvim" }, }) diff --git a/lua/config/settings.lua b/lua/config/settings.lua index d4225b2..87b0ff7 100644 --- a/lua/config/settings.lua +++ b/lua/config/settings.lua @@ -83,3 +83,22 @@ vim.opt.encoding = "UTF8" vim.opt.wildmenu = true vim.opt.wildmode = "longest:full,full" vim.opt.wildignore:append({ "*.o", "*.obj", "*.pyc", "*.class", "*.jar" }) + +-- disable builtin plugins that I don't use +local builtin_plugs = { + "gzip", + "matchit", + "matchparen", + "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + "2html_plugin", + "getscript", + "getscriptPlugin", +} + +for i = 1, #builtin_plugs do + vim.g['loaded_' .. builtin_plugs[i]] = true +end -- cgit v1.1