Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NVIM CONFIG

LazyVim · Lua · LSP · Treesitter · Telescope

Neovim Lua LazyVim Treesitter LSP Telescope Mason Copilot TypeScript Go Vue Tailwind

A personal Neovim configuration built on LazyVim, with extra language support, GitHub Copilot, a transparent Tokyonight UI, and a focused set of coding and navigation plugins.

Features

  • Base: LazyVim 8 + lazy.nvim, with bytecode loader enabled.
  • Languages: TypeScript, JSON, Markdown, Go, Tailwind CSS, Vue, SQL, Prisma, YAML, CMake — plus Treesitter grammars for Astro, GraphQL, Svelte, and more.
  • AI: GitHub Copilot via LazyVim extra (lazyvim.plugins.extras.ai.copilot).
  • UI: Transparent Tokyonight Storm, Snacks dashboard, bufferline (tabs), incline filename, lualine, Noice, Zen Mode.
  • Coding: Incremental rename, refactoring, dial.nvim, symbols outline, blink.cmp, Mason-managed tools.
  • Navigation: Telescope + fzf-native + file browser, which-key, mini.bracketed.
  • Git: git.nvim, gitsigns (inline blame), git-conflict.
  • Quality: ESLint + Prettier extras, Stylua, Selene, ShellCheck, shfmt.

1. Prerequisites

Requirement Version / notes
Neovim >= 0.9.0 (0.10+ recommended)
Git Latest
Nerd Font Required for icons (dashboard, bufferline, lualine)
ripgrep Required for Telescope live grep
fd Recommended for faster file finding
make / gcc Required to build telescope-fzf-native.nvim
Node.js Required for Copilot, some Mason LSPs, Prettier
Go Optional — only if you use gopls
Shell Configured for /bin/zsh

Note: Mason installs LSP servers, linters, and formatters on first launch. You do not need to install them globally.


2. Installation

2.1 Backup existing config

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak

2.2 Clone the repository

git clone git@github.com:smile-ko/nvim-config.git ~/.config/nvim

HTTPS alternative:

git clone https://github.com/smile-ko/nvim-config.git ~/.config/nvim

2.3 Launch Neovim

nvim

lazy.nvim bootstraps itself, then installs LazyVim and all plugins. The first launch can take a few minutes.

2.4 What happens on first start

Stage What it does
Bootstrap Clones lazy.nvim into ~/.local/share/nvim/lazy/lazy.nvim
Plugins Installs LazyVim, extras, and specs under lua/plugins/
Mason Ensures LSP servers and tools listed in coding.lua
Treesitter Compiles parsers from ensure_installed

3. Project Structure

~/.config/nvim/
├── init.lua                 # Entry point — enables loader, loads config.lazy
├── lazy-lock.json           # Pinned plugin versions
├── lazyvim.json             # LazyVim extras / version metadata
├── stylua.toml              # Lua formatter (2 spaces, 120 columns)
├── lua/
│   ├── config/
│   │   ├── lazy.lua         # lazy.nvim setup + LazyVim extras
│   │   ├── options.lua      # Editor options (leader, indent, splits)
│   │   ├── keymaps.lua      # Custom keymaps
│   │   └── autocmds.lua     # Autocommands
│   ├── plugins/
│   │   ├── colorscheme.lua  # Tokyonight Storm (transparent)
│   │   ├── coding.lua       # LSP, Mason, Treesitter, blink.cmp, refactor
│   │   ├── editor.lua       # Telescope, Git, which-key, hipatterns
│   │   └── ui.lua           # Noice, dashboard, bufferline, lualine, zen
│   └── utils/
│       ├── discipline.lua   # Optional cowboy-mode (currently unused)
│       └── debug.lua        # Debug helpers
└── README.md

4. Key Mappings

Leader is <Space>.

4.1 General

Key Action
<Leader>p / <Leader>P Paste from register 0
<Leader>c / <Leader>d Change / delete without yanking
dw Delete word backwards
te New tab
<Tab> / <S-Tab> Next / previous tab (bufferline)
ss / sv Split horizontal / vertical
sh sj sk sl Move between windows
<C-w> arrows Resize window
<A-j> / <A-k> Move line or visual block down / up
<Leader>o / <Leader>O Insert line below / above, stay in insert
:W Write with sudo

4.2 Telescope

Key Action
;f Find files (respects .gitignore, includes hidden)
;r Live grep (hidden files included)
\\ Open buffers
;t Help tags
;e Diagnostics
;s Treesitter symbols
sf File browser in current buffer directory
;; Resume last picker
<Leader>fP Find files in the lazy.nvim plugin root

4.3 Git & LSP

Key Action
<Leader>gb Git blame window
<Leader>go Browse file / folder on remote
gd Go to definition (Telescope)
<Leader>cs Symbols outline
<Leader>r Refactor selection (visual mode)
<Leader>z Zen Mode
<Leader>? Buffer-local keymaps (which-key)
<C-a> / <C-x> Increment / decrement (dial.nvim)

5. Plugin Highlights

Colorscheme

Plugin Role
tokyonight.nvim Storm style, transparent background, sidebars, and floats

Coding

Plugin Role
inc-rename.nvim Incremental LSP rename
refactoring.nvim Visual refactor picker
mini.bracketed [ / ] navigation
dial.nvim Increment numbers, dates, bools, let/const, semver
symbols-outline.nvim Code outline sidebar
mason.nvim LSP / linter / formatter installer
nvim-lspconfig TypeScript, Lua, YAML, CSS, HTML, Vue, Tailwind, Go, Prisma
nvim-treesitter Highlighting, indent, MDX as Markdown
blink.cmp Completion with ghost text

Editor

Plugin Role
mini.hipatterns Highlight hsl(...) colors
git.nvim Blame and browse
telescope.nvim Fuzzy finder + file browser + fzf
which-key.nvim Keymap hints (<Leader>a = AI group)
gitsigns.nvim Gutter signs + inline blame
git-conflict.nvim Merge conflict markers

UI

Plugin Role
noice.nvim Cmdline, messages, LSP hover border
snacks.nvim Dashboard + smooth scroll
bufferline.nvim Tab-mode buffer line
incline.nvim Floating filename with icon
lualine.nvim Statusline with pretty path
zen-mode.nvim Distraction-free editing

6. LazyVim Extras

Imported in lua/config/lazy.lua:

Category Extra
Linting linting.eslint
Format formatting.prettier
Lang TypeScript, JSON, Markdown, Go, Tailwind, Vue, SQL, Prisma, YAML, CMake
AI ai.copilot
Coding coding.neogen
Util util.mini-hipatterns

Disabled / commented extras (easy to re-enable):

Extra File
lang.toml lua/config/lazy.lua
ai.avante lua/config/lazy.lua + spec in lua/plugins/coding.lua

Remove an import line in lua/config/lazy.lua to disable an extra.


7. Mason Tools

Ensured in lua/plugins/coding.lua:

Tool Purpose
stylua Lua formatter
selene / luacheck Lua linters
shellcheck / shfmt Shell lint / format
vue-language-server Vue LSP
tailwindcss-language-server Tailwind LSP
typescript-language-server TypeScript / JavaScript LSP
css-lsp CSS LSP
prisma-language-server Prisma LSP
gopls Go LSP
:Mason

8. Customization

8.1 Add a plugin

  1. Create or edit a spec under lua/plugins/ (for example lua/plugins/myplugin.lua).
  2. Return a lazy.nvim plugin table.
  3. Restart Neovim or run :Lazy sync.

8.2 Change colorscheme

Edit lua/plugins/colorscheme.lua and the colorscheme option in lua/config/lazy.lua.

opts = {
  colorscheme = "tokyonight-storm",
}

8.3 Add an LSP server

  1. Append the Mason package name to ensure_installed in lua/plugins/coding.lua.
  2. Add a servers entry under the nvim-lspconfig spec.

8.4 Editor options

Defaults live in lua/config/options.lua:

Option Value
Leader <Space>
Indent 2 spaces
Wrap Off
Mouse Disabled
scrolloff 10
cmdheight 0 on Neovim 0.8+
Shell /bin/zsh

8.5 Discipline mode (optional)

Cowboy-mode lives in lua/utils/discipline.lua. It is commented out in lua/config/keymaps.lua. Uncomment to warn after repeated hjkl / arrow spam:

local discipline = require("utils.discipline")
discipline.cowboy()

9. Useful Commands

Command Purpose
:Lazy Plugin manager UI
:LazyExtras Enable / disable LazyVim extras
:Lazy sync Install, update, clean plugins
:Mason LSP / tool installer
:LspInfo Active language servers
:checkhealth Diagnose Neovim, LSP, treesitter
:IncRename Incremental rename
:SymbolsOutline Toggle outline
:ZenMode Toggle zen mode
:Noice Message history
:TSPlaygroundToggle Treesitter playground
:W Save with sudo

10. Troubleshooting

Plugins failed to install

:Lazy

Check failed specs, then :Lazy sync. Confirm Git and network access.

Missing LSP servers

:Mason
:checkhealth lsp

Install the server from Mason, or add it to ensure_installed and restart.

Telescope fzf native failed to build

Install a C compiler (gcc or clang) and make, then:

:Lazy build telescope-fzf-native.nvim

Icons look wrong

Install a Nerd Font and set it as the terminal font.

Slow first launch

Expected — plugins, Mason tools, and Treesitter parsers download and compile once. Later starts use the bytecode loader (vim.loader.enable()).

Keymaps not firing

Confirm leader is <Space> (:echo mapleader). Use <Leader>? or :WhichKey to inspect mappings.


11. License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages