My personal Neovim configuration setup for DevOps & Coding
- Easily Extendable and Configurable: Modular and simple directory structure
- Intelligent Autocompletion: Powered by
nvim-cmp
- Git Integration: Visualize git changes with
gitsigns
and TUI withlazygit
- Language Support: LSP configuration with
mason
andnvim-lspconfig
- File Management:
Neo-tree
as the file explorer andwindow-picker
for easier navigation - Syntax Highlighting: Treesitter integration for better syntax awareness
- Additional Utilities: Autopairs, indent guides, and more
- Neovim (version 0.10 or higher)
nvim-install.sh
installs the latest Neovim version (Run as. nvim-install.sh
so that it's sourced in the current shell and not a subshell)
- Git
- fortune: Displays random quotes on the dashboard
- Installation via Homebrew:
brew install fortune
- Manual Installation:
- Refer to the Fortune Installation Guide for other package managers
- Installation via Homebrew:
- Nerd Fonts: Required for displaying icons in Neovim
- Download and Installation:
- Visit the Nerd Fonts website and download the font
- I'm using the JetBrainsMono Nerd Font
- macOS:
- Double-click the downloaded
.zip
file - Open the font files and click "Install"
- Double-click the downloaded
- Download and Installation:
- lazygit Git in a TUI
- lazydocker Docker in a TUI
- lazysql SQL client in a TUI
Run :checkhealth
to see what is missing if you get any errors/warnings when opening neovim
After installation, simply open Neovim:
nvim
Here is a list of some of the key plugins included in this configuration:
- alpha.lua: Startup screen for Neovim
- bufferline.lua: Manage open buffers as tabs
- cmp.lua: Autocompletion engine
- kubectl.lua: Kubernetes integration
- mason.lua: Manage language servers, linters, and formatters
- neotree.lua: File explorer for Neovim
- scope.lua: Manage buffers between tabs and windows
- telescope.lua: Fuzzy finder for files and commands
- treesitter.lua: Enhanced syntax highlighting
For a complete list, refer to the lua/plugins
folder in the repository.
The configuration files are organized as follows:
~/.config/nvim/
├── lua/ # Lua configuration directory
│ ├── plugins/ # Individual plugin configurations
│ │ ├── alpha.lua
│ │ ├── autopairs.lua
│ │ ├── bufferline.lua
│ │ ├── ... (additional plugins)
│ ├── mappings.lua # Key mappings and shortcuts
│ ├── settings.lua # General settings and options
├── init.lua # Main entry point for the Neovim configuration
├── lazy-lock.json # Lock file for lazy.nvim (plugin management state)
├── nvim-install.sh # Installation script for setting up Neovim
└── ... (etc)
-- General Settings
vim.opt.number = true
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.termguicolors = true
-- Keybindings for Telescope fuzzy finder
map('n', '<leader>tf', '<cmd>Telescope find_files cwd=' .. initial_cwd .. '<cr>', default_opts)
map('n', '<leader>tg', '<cmd>Telescope live_grep cwd=' .. initial_cwd .. '<cr>', default_opts)
map('n', '<leader>tb', '<cmd>Telescope buffers<cr>', default_opts)
map('n', '<leader>th', '<cmd>Telescope help_tags<cr>', default_opts)
map('n', '<leader>ts', '<cmd>Telescope luasnip<cr>', default_opts)
-- Neotree keybindings
map('n', '<C-e>', ':Neotree toggle reveal=true reveal_force_cwd=true<CR>', default_opts)
-- Bufferline mappings
map('n', '<TAB>', ':BufferLineCycleNext<CR>', default_opts)
map('n', '<S-TAB>', ':BufferLineCyclePrev<CR>', default_opts)
-- Scope mappings / tab management
map('n', '<C-w>t', ':tabnew<CR>', default_opts)
-- Terminal splits mappings
map('n', '<leader>h', ':belowright 20split | terminal<CR>', default_opts)
map('n', '<leader>v', ':vsplit | wincmd l | terminal<CR>', default_opts)
- Themes: Change the colorscheme by modifying the
colorscheme.lua
file - Keybindings: Update or add new keybindings in the
mappings.lua
file - Plugins: Add or remove plugins in the
lua/plugins/
folder to install withlazy.nvim
- Language Servers: Configure additional language servers in the
lsp.lua
file or install with:Mason
This project is licensed under the MIT License