initial neovim config

main
Kevin Wojkovich 2025-08-22 15:51:28 -05:00
commit 3bd3dfdffd
2 changed files with 222 additions and 0 deletions

68
README.md Normal file
View File

@ -0,0 +1,68 @@
# Neovim Configuration
A modern Neovim configuration using lazy.nvim for plugin management.
## Installation
1. Make sure you have Neovim 0.8+ installed
2. Clone or copy the `init.lua` file to your Neovim configuration directory:
```bash
# For Linux/macOS
cp init.lua ~/.config/nvim/
# Or if using this directory structure
# The init.lua is already in ~/.vim/
```
3. Start Neovim - lazy.nvim will automatically install all plugins on first launch
## Plugins Included
- **lazy.nvim** - Plugin manager
- **CtrlP** - Fuzzy file finder (`<Ctrl-P>` to open)
- **lualine** - Modern status line
- **gitsigns** - Git change indicators
- **indent-blankline** - Visual indent guides
- **bufferline** - Tab-like buffer management
- **tokyonight** - Beautiful colorscheme
- **todo-comments.nvim** - TODO comment highlighting
## Key Features
- Line numbers and relative line numbers enabled
- Syntax highlighting enabled
- 2-space indentation
- Smart case searching
- True color support
- Git integration with visual indicators
## Usage
### File Navigation
- `<Ctrl-P>` - Open CtrlP fuzzy finder
- `:e filename` - Open file
- `:bn` / `:bp` - Next/previous buffer
### Git
- Git changes are automatically highlighted in the gutter
- `+` for additions, `~` for changes, `_` for deletions
### TODO Management
The configuration highlights TODO comments in your code:
- `TODO:`, `FIXME:`, `HACK:`, `WARN:`, `PERF:`, `NOTE:`, `TEST:`
## Customization
Edit `init.lua` to customize:
- Plugin configurations
- Key mappings
- Neovim settings
- Colorscheme options
## Troubleshooting
If plugins don't load:
1. Check Neovim version: `:version`
2. Check plugin status: `:Lazy`
3. Update plugins: `:Lazy update`
4. Check for errors: `:messages`

154
init.lua Normal file
View File

@ -0,0 +1,154 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Configure lazy.nvim
require("lazy").setup({
-- CtrlP fuzzy file finder
{
"kien/ctrlp.vim",
config = function()
vim.g.ctrlp_working_path_mode = 'ra'
vim.g.ctrlp_show_hidden = 1
end,
},
-- Lualine status line
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup({
options = {
theme = "tokyonight",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
})
end,
},
-- Git signs
{
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
},
})
end,
},
-- Indent guides
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
config = function()
require("ibl").setup({
indent = {
char = "",
tab_char = "",
},
scope = { enabled = false },
})
end,
},
-- Buffer line
{
"akinsho/bufferline.nvim",
version = "*",
dependencies = "nvim-tree/nvim-web-devicons",
config = function()
require("bufferline").setup({
options = {
numbers = "none",
close_command = "bdelete! %d",
right_mouse_command = "bdelete! %d",
left_mouse_command = "buffer %d",
middle_mouse_command = nil,
separator_style = "slant",
always_show_bufferline = true,
},
})
end,
},
-- Tokyo Night colorscheme
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
config = function()
require("tokyonight").setup({
style = "night",
light_style = "day",
transparent = false,
terminal_colors = true,
})
vim.cmd.colorscheme("tokyonight")
end,
},
-- TODO comments highlighting
{
"folke/todo-comments.nvim",
dependencies = "nvim-lua/plenary.nvim",
config = function()
require("todo-comments").setup()
end,
},
}, {
-- Lazy.nvim configuration
ui = {
border = "none",
size = {
width = 0.8,
height = 0.8,
},
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
-- Basic Neovim settings
vim.opt.number = true
vim.opt.relativenumber = false
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.termguicolors = true
-- Enable syntax highlighting
vim.cmd("syntax enable")