Skip to main content

General Questions

Neovim from Scratch is a minimal yet complete Neovim configuration that serves as a foundation for building your own personalized IDE. It includes essential plugins and sensible defaults while remaining easy to understand and customize.The configuration is based on a popular YouTube tutorial series and is maintained with pinned plugin versions for stability.
You need Neovim v0.8.0 or higher. Check your version:
nvim -v
For the best experience, Neovim v0.9.0+ is recommended.
The configuration should be cloned to your Neovim config directory:
git clone https://github.com/LunarVim/Neovim-from-scratch.git ~/.config/nvim
Important: Back up your existing config first!
mv ~/.config/nvim ~/.config/nvim.bak
Use Neovim from Scratch if:
  • You want to learn how Neovim configurations work
  • You prefer a minimal starting point
  • You want full control over every aspect
  • You’re following the tutorial series
Use LunarVim if:
  • You want a fully-featured, production-ready IDE
  • You prefer a polished out-of-the-box experience
  • You want active development and regular updates
The creator recommends nvim-basic-ide or LunarVim for production use.
All plugins in the master branch are pinned to specific commits to ensure stability. The Neovim plugin ecosystem evolves rapidly with frequent breaking changes.Pinned commits mean:
  • The config remains stable and functional
  • The video tutorials stay accurate
  • You won’t encounter unexpected breaking changes
You can update pins manually if you understand the changes required.

Configuration Questions

Edit lua/user/colorscheme.lua:
local colorscheme = "tokyonight"  -- Change this

local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
  return
end
Available by default:
  • tokyonight
  • darkplus
To add more colorschemes, add them to lua/user/plugins.lua and run :PackerSync.
Add custom keybindings in lua/user/keymaps.lua:
local keymap = vim.keymap.set
local opts = { noremap = true, silent = true }

-- Example: Map jk to escape in insert mode
keymap("i", "jk", "<ESC>", opts)

-- Example: Quick save with <leader>w
keymap("n", "<leader>w", ":w<CR>", opts)
See the Keybindings guide for more details.
Edit lua/user/options.lua to customize Neovim behavior:
vim.opt.relativenumber = true     -- Relative line numbers
vim.opt.wrap = true               -- Line wrapping
vim.opt.tabstop = 4               -- Tab width
vim.opt.shiftwidth = 4            -- Indent width
See :help options for all available options.
Each plugin has its own configuration file in lua/user/:
  • telescope.lua - Fuzzy finder settings
  • treesitter.lua - Syntax highlighting
  • lsp/ - Language server configuration
  • cmp.lua - Autocompletion
  • nvim-tree.lua - File explorer
  • And more…
Check the Plugin Configuration guide for details.
  1. Add the plugin to lua/user/plugins.lua:
    use { "author/plugin-name" }
    
  2. Save the file (:w) - Packer will auto-sync
  3. Or manually run:
    :PackerSync
    
  4. Create a config file in lua/user/ if needed
  5. Require it in init.lua
See the Plugins guide for more details.

Plugin Questions

Mason is a package manager for LSP servers, linters, formatters, and DAP servers.Open Mason:
:Mason
Install a language server:
  • Navigate with j/k
  • Press i to install
  • Press X to uninstall
  • Press u to update
Common servers:
  • lua_ls - Lua
  • pyright - Python
  • tsserver - TypeScript/JavaScript
  • rust_analyzer - Rust
  • gopls - Go
Telescope is a fuzzy finder. Default keybindings (leader = space):
  • <leader>ff - Find files
  • <leader>fg - Live grep (search text)
  • <leader>fb - Find buffers
  • <leader>fh - Find help tags
For best results, install external dependencies:
# Ubuntu/Debian
sudo apt install ripgrep fd-find

# macOS
brew install ripgrep fd

# Arch Linux
sudo pacman -S ripgrep fd
The file explorer (nvim-tree) can be opened with:
<leader>e
Navigation:
  • j/k - Move up/down
  • Enter - Open file/folder
  • a - Create new file/folder
  • d - Delete
  • r - Rename
  • y - Copy
  • p - Paste
  • ? - Help
Which-Key shows available keybindings when you press the leader key.
  1. Press <Space> (leader key)
  2. Wait ~300ms
  3. A popup shows available commands
  4. Press the key for the action you want
Example:
  • Press <Space>
  • See g for git commands
  • Press g to see git subcommands
  • Press s to stage the current hunk
Treesitter provides:
  • Better syntax highlighting
  • Intelligent code navigation
  • Smart text objects
  • Context-aware commenting
It’s highly recommended but optional.Install parsers:
:TSInstall python lua javascript typescript
Update all parsers:
:TSUpdate

LSP Questions

  1. Install the LSP server via Mason:
    :Mason
    
  2. The server should auto-attach when you open a file of that type
  3. For custom servers, add configuration in lua/user/lsp/mason.lua
  4. Check if it’s working:
    :LspInfo
    
With LSP attached, you have:
  • gd - Go to definition
  • gD - Go to declaration
  • gr - Show references
  • gi - Go to implementation
  • K - Show hover documentation
  • <leader>rn - Rename symbol
  • <leader>ca - Code actions
  • [d / ]d - Navigate diagnostics
  • gl - Show line diagnostics
See :help lsp for more information.
This config uses null-ls for formatting.Format current buffer:
<leader>f
Configure formatters:Edit lua/user/lsp/null-ls.lua to add formatters:
local formatting = null_ls.builtins.formatting

local sources = {
  formatting.prettier,  -- JavaScript/TypeScript
  formatting.black,     -- Python
  formatting.stylua,    -- Lua
}
Install formatters via Mason.
Check these items:
  1. LSP attached?
    :LspInfo
    
  2. nvim-cmp loaded?
    :Lazy check
    
  3. Sources configured? Check lua/user/cmp.lua for completion sources.
  4. Trigger completion manually: Press Ctrl+Space to manually trigger completions.

Troubleshooting Questions

  1. Run health check:
    :checkhealth
    
  2. View error messages:
    :messages
    
  3. Reinstall plugins:
    :PackerSync
    
  4. Check for deprecation warnings and update config accordingly
See the Troubleshooting guide for detailed solutions.
Solution 1: Reinstall Packer
rm -rf ~/.local/share/nvim/site/pack/packer
nvim
Solution 2: Manual sync
:PackerSync
Solution 3: Check internet connectionPacker needs to download plugins from GitHub.Solution 4: Check for errors
:PackerStatus
# Backup current config
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak

# Clone fresh config
git clone https://github.com/LunarVim/Neovim-from-scratch.git ~/.config/nvim

# Launch Neovim
nvim
Wait for all plugins to install before closing Neovim.
Install a clipboard provider:Ubuntu/Debian:
sudo apt install xsel
Arch Linux:
sudo pacman -S xsel
Wayland:
sudo apt install wl-clipboard
Verify it works:
:checkhealth provider

Advanced Questions

Yes, but you’ll need to migrate the plugin specifications. The structure is similar but lazy.nvim has different syntax.Consider using nvim-basic-ide which uses lazy.nvim and is actively maintained.
Plugins are pinned to specific commits for stability. To update:
  1. Find the plugin in lua/user/plugins.lua
  2. Update the commit hash
  3. Run :PackerSync
  4. Test thoroughly for breaking changes
Warning: Updating may introduce breaking changes. Read plugin changelogs first.
Yes, but paths will be different:
  • Config: ~\AppData\Local\nvim\
  • Data: ~\AppData\Local\nvim-data\
Some Unix-specific tools may need Windows alternatives (e.g., use win32yank for clipboard).
Method 1: Start with no plugins
nvim --clean
Method 2: Enable verbose logging
nvim -V9log.txt
Method 3: Check messages
:messages
Method 4: Profile startup
nvim --startuptime startup.log
cat startup.log

Contributing Questions

The project welcomes contributions! Common ways to contribute:
  • Fix errors in branches with plugin updates
  • Update deprecated API calls
  • Improve documentation
  • Report issues with detailed reproduction steps
See the Contributing guide for the full workflow.
Report bugs on the GitHub Issues page.Include:
  • Neovim version (:version)
  • Branch you’re using (git branch)
  • Output of :checkhealth
  • Steps to reproduce
  • Error messages (:messages)
Absolutely! Many users fork this repo and customize it. Consider:
  • Creating your own GitHub repository
  • Documenting your changes
  • Sharing with the community
This is encouraged as a learning experience!

Build docs developers (and LLMs) love