I'm using LazyVim in another repo for the foreseeable future, this was fun to learn though. Til next time!
Oh we're so back.
Based on the starter template for π€ LazyVim.
Will contain a combination of snippets derived from LazyVim documentation and various VIM notes that include but aren't limited to its functionality, QoL, and quirks.
~/.config/nvim βββ lua β βββ config β β βββ autocmds.lua β β βββ keymaps.lua β β βββ lazy.lua β β βββ options.lua β βββ plugins β βββ spec1.lua β βββ ** β βββ spec2.lua βββ init.lua
Property | Default Merging Rule |
---|---|
cmd |
The list of commands will be extended with your custom commands. |
event |
The list of events will be extended with your custom events. |
ft |
The list of filetypes will be extended with your custom filetypes. |
keys |
The list of keymaps will be extended with your custom keymaps. |
opts |
Your custom options (opts ) will be merged with the default options. |
dependencies |
The list of dependencies will be extended with your custom dependencies. |
Any other property | Will override the defaults. |
For ft, event, keys, cmd and opts you can instead also specify a values function that can make changes to the default values, or return new values to be used instead.
Mode | Identifier |
---|---|
Normal Mode | n |
Insert Mode | i |
Character-wise Visual Mode | v |
Line-wise Visual Mode | V |
Block-wise Visual Mode | ^V (Ctrl-v) |
Replace Mode | R |
Virtual Replace Mode | Rv |
Command-Line Mode | c |
Terminal Mode | t |
Operator-Pending Mode | o |
Select Mode | s |
Ex-Mode | ! |
- Yanking an entire file:
:%y+
+
is a register that is tied to the system clipboard.
Getting current buffer path:
-- 0 stands for current buffer
-- https://neovim.io/doc/user/api.html#nvim_buf_get_name()
vim.api.nvim_buf_get_name(0)
Reference for PyLsp LazyVim Configuration
- Blob for PyLSP and Ruff heavily customized in the context of LazyVim.
Using Microsoft python-type-stubs with Pyright
Essentially:
- Add python-type-stubs as a git submodule under the directory stubs:
cd proj
# Assuming you have GitHub SSH authentication set up.
git submodule add git@github.com:microsoft/python-type-stubs stubs
- Point to stubs
- Using
pyrproject.toml
[tool.pyright]
stubPath = "./stubs/stubs"
- If not
pyporject.toml
, must havepyrightconfig.json
in root of workspace
{
"stubPath": "./stubs/stubs"
}
- To update:
git submodule update