mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-31 07:57:57 +00:00
b088086b06
Now, it's all under the notebook umbrella. Seems to be appropriate as it is just my notes after all. I also updated some notes from there. I didn't keep track of what it is this time. Something about more learning notes extracted from my "Learning how to learn" course notes and then some. Lack of time and hurriness just makes it difficult to track but it should be under version control already.
2.0 KiB
2.0 KiB
Neovim Lua integration
- go-to resource when introducing using Lua into Neovim
- similar to VimL configs, really
- init file is
${XDG_CONFIG_HOME}/nvim/init.lua
- Lua configs doesn't configure much by default
- you can start with
lua-intro
help section in thelua
help page from Neovim — i.e.,:h lua
- you can still execute Vimscript with
vim.cmd
; more information is at:h lua-vimscript
-
basics from VimL
- to set options, it's mostly in
vim.opt
— e.g.,set number relativenumber
versusvim.opt.number, vim.opt.relativenumber = true, true
- highlight options are mostly in
vim.highlight
— e.g.,highlight clear SpellCap
versusvim.highlight
- to set local options, use
vim.opt_local
— e.g.,setlocal spell
versusvim.opt_local.spell = true
- otherwise, to set global options, use
vim.opt_global
- you can access environment variables through
vim.env
— e.g.,vim.env.HOME
,vim.env.MYVIMRC
- you can manipulate variables of various scales from
vim.{g,b,t}
; to see more details, seelua-vim-variables
help section vim.opt
will return an Option object, it has a common API; to learn more about it, seevim.opt
and its subsections- to run Vimscript, you can use
vim.cmd
— e.g.,vim.cmd "colorscheme nord"
- to set options, it's mostly in
-
there are Neovim configurations written in Lua
-
comprehensive examples include Neovim plugins that are already written in Lua
- paq-nvim is a simple Neovim package manager
- packer.nvim is a more comprehensive package manager
- LuaSnip is a snippet engine
- telescope.nvim is a fuzzy finder integrated inside Neovim