diff --git a/init.lua b/init.lua index 0de1ba3..c3fecfc 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,16 @@ -require("config.opts") + +-- +-- Initialize Neovim configuration +-- .............................................. +-- +-- Author: Sven Vogel +-- Created: 01.11.2024 +-- Edited: 01.11.2024 +-- +-- ============================================== + +-- Load plugin manager +-- and plugins, additonally setup global options require("config.lazy") +-- install custom keymaps require("config.keys") diff --git a/lua/config/keys.lua b/lua/config/keys.lua index 82feb80..3191d42 100644 --- a/lua/config/keys.lua +++ b/lua/config/keys.lua @@ -1,4 +1,14 @@ +-- +-- Global custom plugin agnostic keymaps +-- .............................................. +-- +-- Author: Sven Vogel +-- Created: 01.11.2024 +-- Edited: 01.11.2024 +-- +-- ============================================== + local keymaps = { -- -- Write buffer to disk @@ -116,8 +126,22 @@ local keymaps = { end end, desc = "Close buffer" + }, + -- + -- Tab (barbar) controls + -- .............................................. + { + mode = { 'n', 'i' }, + keys = '', + cmd = vim.cmd('BufferNext'), + desc = "Switch to the next buffer" + }, + { + mode = { 'n', 'i' }, + keys = '', + cmd = vim.cmd('BufferPrevious'), + desc = "Switch to the previous buffer" } - } for _, keymap in pairs(keymaps) do diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 0b93d4e..5703580 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,3 +1,19 @@ + +-- +-- Bootstrap and start Lazy.nvim plugins +-- manager. +-- .............................................. +-- +-- Author: Sven Vogel +-- Created: 01.11.2024 +-- Edited: 01.11.2024 +-- +-- ============================================== + +-- +-- Bootstrap Lazy.nvim package manager +-- .............................................. + -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then @@ -15,12 +31,23 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) +-- +-- Early setup of Neovim and VIM options +-- .............................................. + -- 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 = "\\" +-- load options +require("config.opts") + +-- +-- Start Lazy.nvim +-- .............................................. + -- Setup lazy.nvim require("lazy").setup({ spec = { @@ -32,4 +59,17 @@ require("lazy").setup({ install = { colorscheme = { "habamax" } }, -- automatically check for plugin updates checker = { enabled = false }, + rtp = { + disabled_plugins = { + "gzip", + "matchit", + "matchparen", + "netrw", + "netrwplugin", + "tarplugin", + "tohtml", + "tutor", + "zipplugin", + } + }, }) diff --git a/lua/config/opts.lua b/lua/config/opts.lua index 956698f..b3a96cb 100644 --- a/lua/config/opts.lua +++ b/lua/config/opts.lua @@ -37,4 +37,7 @@ opt.smartindent = true -- VIM global options -- .............................................. -vim.g.loaded_netrwPlugin = 0 -- disable netrw, VIM's builtin file explorer +-- disable netrw +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +