NVim
Common Commands
:w !python % # runs current file in python
Getting Started
Create a configuration file for neovim editor
Check if one exists already in neovim
:echo stdpath('config')
Writing Lua for config
Create an init.lua
file in ~/.config/nvim/
For vim, you use the :set
command, which in Lua is vim.o
vim.o.number = true -- in init.lua
:vim.o.number -- directly in nvim
To use other vim functions in lua
vim.api.nvim_set_hl(0, "LineNr", { ctermfg = "LightBlue", })
The vim.cmd runs vimscript rather than lua in-built functions, so its slower
vim.cmd("colorscheme elflord")
vim.cmd.colorscheme(elflord) -- same as above
From ytb video these are what you need to get started:
- Create our
init.lua
file - Install
lazy.vim
our package manager- custom theme settings for
nvim
- custom theme settings for
- Add colorscheme to init file:
colorscheme (catppuccin)
- Add plugins
telescope.nvim
Treesitter