diff options
Diffstat (limited to 'lua/config')
| -rw-r--r-- | lua/config/init.lua | 1 | ||||
| -rw-r--r-- | lua/config/keybindings.lua | 20 | ||||
| -rw-r--r-- | lua/config/pack.lua | 12 | ||||
| -rw-r--r-- | lua/config/settings.lua | 19 |
4 files changed, 32 insertions, 20 deletions
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", "<Leader> ", ":update<CR> :source<CR>", { desc = "Source cur -- format vim.keymap.set("n", "<Leader>lf", vim.lsp.buf.format, { desc = "Format buffer with available lsp" }) --- setup mini.pick -vim.keymap.set("n", "<Leader>ff", ":Pick files<CR>", { desc = "Search file in directory" }) -vim.keymap.set("n", "<Leader>fh", ":Pick help<CR>", { desc = "Searcch neovim help" }) - --- move lines up or down -vim.keymap.set("n", "<A-j>", ":m .+1<CR>==", { desc = "Move line down" }) -vim.keymap.set("n", "<A-k>", ":m .-2<CR>==", { desc = "Move line up" }) -vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv", { desc = "Move selection down" }) -vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv", { desc = "Move selection up" }) +-- easy copy/cut/paste from system clipboard +vim.keymap.set({ "n", "v", "x" }, "<Leader>y", '"+y', { desc = "Yank to system clipboard" }) +vim.keymap.set({ "n", "v", "x" }, "<Leader>d", '"+d', { desc = "Cut to system clipboard" }) +vim.keymap.set({ "n", "v", "x" }, "<Leader>p", '"+p', { desc = "Paste from system clipboard" }) -- better indenting in visual mode vim.keymap.set("v", "<", "<gv", { desc = "Indent left and reselect" }) vim.keymap.set("v", ">", ">gv", { desc = "Indent right and reselect" }) -- file exploring -vim.keymap.set("n", "<Leader>e", ":Oil<CR>", { desc = "Open oil file explorer" }) -- Copy Full File-Path vim.keymap.set("n", "<leader>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 |
