Simple configuration to get started with with Neovim.
- Packer for package management (packer)
- Language Server Support (nvim-lsp-installer, nvim-lspconfig)
- Tree sitter grammar support (nvim-treesitter)
- Completions (nvim-cmp)
- File menus (telescope)
- Keymap menus (which-key)
It does not include some things, but can be integrated as needed.
- Status line plugin (eg, lualine)
- File explorer (eg, neo-tree)
- Git integration (eg, neogit)
- Snippets (eg, luasnip)
Neovim 0.7 is required. Paste init.lua into ~/.config/nvim/init.lua
.
mkdir -p ~/.config/nvim
curl -sL https://raw.githubusercontent.com/rstacruz/nvim-starter/main/init.lua -o ~/.config/nvim/init.lua
# ...or paste init.lua into ~/.config/nvim/init.lua
Alternatively, if you just want to give it a try without overriding your config:
# Create a nvim directory
mkdir -p ~/nvim-starter/{nvim,data}
cd ~/nvim-starter
curl -sL https://raw.githubusercontent.com/rstacruz/nvim-starter/main/init.lua -o nvim/init.lua
# start nvim with this nvim directory
XDG_CONFIG_HOME=$(pwd) XDG_DATA_HOME=$(pwd)/data nvim
Not using bash/zsh?
# ...alternatively, for fish shell users:
XDG_CONFIG_HOME=(pwd) XDG_DATA_HOME=(pwd)/data nvim
Edit init.lua, and enable syntax for them (under nvim-treesitter.configs
). Optionally, advanced features can be unlocked by enablieng their language server (under lspconfig
).
- Provide a template for new Neovim users to start with
- Keep it in 1 file (init.lua) under 150 lines as much as possible