My Winchester Mystery
Neovim Configuration, using lazy.nvim
for plugin management and Lua as its
configuration language. My Personal Development Environment (PDE) and the core tool used in cultivating my Personal Knowledge Base (PKB).
Warning This is my personal configuration, subject to experimentation and radical rewrites periodically, rebases or substantially modifications without prior warning and other things that may make this unstable for you to use as it is presented.
With this in mind, feel free to take from it as you please, use pieces of it or the whole thing as a basis for your own, and you are more than welcome to submit pull requests if it so pleases you, that's why its on GitHub |wink|
To use this configuration, clone or copy it directly into your ~/.config/nvim
directory.
# Back up your old configuration if present
mv ~/.config/nim ~/.config/nvim.bak
# Now clone this one
git clone https://github.com/Thomashighbaugh/nvim-forge ~/.config/nvim
And that should be it, if you have the prerequisites installed it should run through the lazy.nvim installation process and handle setting up everything in the process from Treesitter grammars to Mason dependencies, it might just take a few minutes so be patient.
This configuration roughly follows that of LazyVim, with some minor changes that are mostly due to personal taste, which while arbitrary is much easier to quickly locate various things when they are arranged in the way one prefers and not an artificially imposed standard. The lion's share of the configuration exists within the lua/
subdirectory as is the convention of Lua-based NeoVim configurations.
Unlike many other highly customized NeoVim configurations, as well as most major configuration frameworks, the configuration is not nested within a subdirectory of the Lua subdirectory named after the author, plugin or configuration, I find no need to brand this configuration in a way that makes using its parts elsewhere highly onerous and introduces a needless source of potential errors for me to deal with instead of working on code like I intend to be.
Below is a representation of the structure of the configuration in tree format
. ├── Dockerfile ├── ftplugin │ └── java.lua ├── init.lua ├── lazy-lock.json ├── lua │ ├── code_action_utils.lua │ ├── core │ │ ├── autocommands.lua │ │ ├── keymaps.lua │ │ ├── options.lua │ │ ├── usercommands.lua │ │ └── utils.lua │ └── plugins │ ├── aisync.lua │ ├── bufferline.lua │ ├── cmp.lua │ ├── codesnap.lua │ ├── comments.lua │ ├── conform.lua │ ├── dap │ │ └── debug_adapter.lua │ ├── dashboard.lua │ ├── devdocs.lua │ ├── dressing.lua │ ├── flash.lua │ ├── focus.lua │ ├── git.lua │ ├── image_preview.lua │ ├── inc_rename.lua │ ├── indent-blankline.lua │ ├── init.lua │ ├── lsp │ │ ├── aerial.lua │ │ ├── glance.lua │ │ ├── lazydev.lua │ │ ├── lsp-config.lua │ │ ├── mason.lua │ │ ├── nvim-navic.lua │ │ ├── outline.lua │ │ └── trouble.lua │ ├── lualine.lua │ ├── luasnip.lua │ ├── mini-align.lua │ ├── mini-indentscope.lua │ ├── neo-tree.lua │ ├── noice.lua │ ├── nvim-autopairs.lua │ ├── nvim-lint.lua │ ├── nvim-notify.lua │ ├── nvim-surround.lua │ ├── nvim-tree.lua │ ├── oil.lua │ ├── ollama.lua │ ├── rainbow-delimiters.lua │ ├── rest.lua │ ├── snipe.lua │ ├── ssr.lua │ ├── statuscol.lua │ ├── symbols.lua │ ├── telescope.lua │ ├── toggleterm.lua │ ├── treesitter.lua │ ├── web_devicons.lua │ ├── which-key.lua │ └── yanky.lua ├── README.md → .github/README.md ├── snippets │ ├── all.lua │ ├── java.snippets │ ├── javascript.lua │ ├── lua.lua │ ├── markdown.lua │ ├── package.json │ ├── vscode │ │ ├── c.json │ │ ├── cpp.json │ │ ├── css.json │ │ ├── frameworks │ │ │ ├── ejs.json │ │ │ ├── flutter.json │ │ │ ├── jekyll.json │ │ │ └── vue │ │ │ ├── html.json │ │ │ ├── javascript.json │ │ │ ├── pug.json │ │ │ └── vue.json │ │ ├── gdscript.json │ │ ├── gitcommit.json │ │ ├── global.json │ │ ├── glsl.json │ │ ├── go.json │ │ ├── haskell.json │ │ ├── html.json │ │ ├── java.json │ │ ├── javascript │ │ │ ├── javascript.json │ │ │ ├── react-native-ts.json │ │ │ ├── react-native.json │ │ │ ├── react-ts.json │ │ │ ├── react.json │ │ │ └── typescript.json │ │ ├── kotlin.json │ │ ├── kubernetes.json │ │ ├── latex │ │ │ ├── latex-snippets.json │ │ │ └── vscode-latex-snippets.json │ │ ├── latex.json │ │ ├── lua.json │ │ ├── markdown.json │ │ ├── meson.json │ │ ├── norg.json │ │ ├── org.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── python │ │ │ ├── base.json │ │ │ ├── comprehension.json │ │ │ ├── debug.json │ │ │ ├── python.json │ │ │ └── unittest.json │ │ ├── rust.json │ │ ├── scala.json │ │ ├── shell.json │ │ └── sql.json │ └── yaml.lua └── spell ├── en.dict ├── en.utf-8.add └── en.utf-8.add.spl
Below are the keybind mappings used in this configuration, they are subject to change and are not exhaustive, but they should give you a good idea of how the configuration is set up and how to use it.
[!] Note:
→ means first the key on the left then the key on the rightmeans press both keys at the same time
Keys | Mode | Description |
---|---|---|
j/k | Normal/Visual | Better Up/Down |
/ | Normal | Search |
g, | Normal | Go to the newest change |
g; | Normal | Go to last change |
i | Normal | Better Insert |
, → w | Normal | Save |
Alt + Enter | Normal | List suggested code actions |
Keys | Mode | Description |
---|---|---|
Ctrl + k | Normal | Move line up |
Ctrl + j | Normal | Move line down |
Ctrl + k | Visual | Move line up visual |
Ctrl + j | Visual | Move line down visual |
< | Visual | Unindent lines in visual selection |
> | Visual | Indent lines in visual selection |
p | Visual | Paste without yanking |
p | Select(x) | Paste without yanking |
c | Normal/Visual | Change without yanking |
C | Normal | Change line without yanking |
Space + Up | Normal | Add blank line below |
Space + Down | Normal | Add blank line below |
Ctrl + , | Insert | Add comma after character |
Ctrl + b | Insert | Add curly with comma {}, |
i + q | Operator/Visual | Inner Single Quotes |
i + Q | Operator/Visual | Inner Double Quotes |
a + q | Operator/Visual | Around Single Quotes |
a + Q | Operator/Visual | Around Double Quotes |
a + ' | Operator/Visual | Around Single Quotes |
a + " | Operator/Visual | Around Double Quotes |
i + r | Operator/Visual | Inner Brackets |
a + r | Operator/Visual | Inner Brackets |
Keys | Mode | Description |
---|---|---|
, → b → d | Normal | Delete Buffer |
Leader → f → n | Normal | New File |
Shift + Left | Normal | Buffer Previous |
Shift + Right | Normal | Buffer Next |
Space → b → p | Normal | Pin Buffer |
Space → b → k | Normal | Pick Buffer |
Space → b → o | Normal | Close Other Buffers |
Space → b → Left | Normal | Move Buffer to Left |
Space → b → Right | Normal | Move Buffer to Right |
Space → b → 1 | Normal | Go to Buffer 1 |
Space → b → 2 | Normal | Go to Buffer 2 |
Space → b → 3 | Normal | Go to Buffer 3 |
Space → b → 4 | Normal | Go to Buffer 4 |
Space → b → 5 | Normal | Go to Buffer 5 |
Space → b → 6 | Normal | Go to Buffer 6 |
Space → b → 7 | Normal | Go to Buffer 7 |
Space → b → 8 | Normal | Go to Buffer 8 |
Space → b → 9 | Normal | Go to Buffer 9 |
Keys | Mode | Description |
---|---|---|
Space → \ | Normal | Split Window Vertically |
Space → / | Normal | Split Window Vertically |
Space → h/l/k/j | Normal | Move split panes Left/Right/Up/Down |
Space → m | Normal | Equalize split panes |
Alt + Up | Normal | Resize pane up |
Alt + Down | Normal | Resize pane down |
Alt + Left | Normal | Resize pane left |
Alt + Right | Normal | Resize pane right |
Keys | Mode | Description |
---|---|---|
, → R | Normal | Search and Replace the word under cursor |
, → r | Normal | Search and replace in visual selection |
Keys | Mode | Description |
---|---|---|
Control + a | Normal | Select All |
d + D | Normal | Delete current line without yanking |
d + d | Normal | Yank non-empty lines |
Keys | Mode | Description |
---|---|---|
Escape | Insert | Exit Insert Mode |
Control + l | Insert | Correct Word |
Alt + i | Insert | Jump to Beginn of Line in insert mode |
Alt + a | Insert | Jump to End of Line in insert mode |
Ctrl + b | Insert | Add curly with comma {}, |
Keys | Mode | Description |
---|---|---|
Escape | Insert/Normal | Escape and clear highlighted search |
z → . | Normal | Fix Spelling |
z → = | Normal | Spelling suggestions |
Leader → m → m | Normal | File Changes (Messages) |
Leader → c → t | Normal | Toggle TS Context |
Keys | Mode | Description |
---|---|---|
Leader → l → a | Normal | Open Lazy |
Leader → l → c | Normal | Check Lazy Plugins |
Leader → l → s | Normal | Sync Lazy Plugins |
Keys | Mode | Description |
---|---|---|
Leader → d → B | Normal | Add Conditional Breakpoint |
Leader → d → c | Normal | Dap Continue |
Leader → d → s → i | Normal | Dap Step Into |
Leader → d → s → o | Normal | Dap Step Over |
Leader → d → s → t | Normal | Dap Step Out |
Leader → d → t | Normal | Dap Terminate |
Leader → d → l | Normal | Dap Show Log |
Leader → d → r | Normal | Dap Toggle Repl |
Keys | Mode | Description |
---|---|---|
Leader → d → v | Normal | Diffview Toggle |
Keys | Mode | Description |
---|---|---|
Space → n → n | Normal | Noice Messages |
Space → n → a | Normal | Noice All Messages |
Space → n → l | Normal | Noice Last |
Space → n → t | Normal | Noice Telescope |
Space → n → e | Normal | Noice Errors |
Space → n → s | Normal | Noice Notifications |
Keys | Mode | Description |
---|---|---|
Escape | Terminal | Exit Terminal Mode |
k → j | Terminal | Exit Terminal Mode |
Ctrl + h | Terminal | Window Left |
Ctrl + j | Terminal | Window Down |
Ctrl + k | Terminal | Window Up |
Ctrl + l | Terminal | Window Right |
Ctrl + w | Terminal | Window |
Keys | Mode | Description |
---|---|---|
Alt + o | Normal | Organize Imports |
c → r → v | Normal/Visual | Extract Variable |
c → r → c | Normal/Visual | Extract Constant |
c → r → m | Visual | Extract Method |
Leader → d → f | Normal | Test Class |
Leader → d → n | Normal | Test Nearest Method |
Keys | Mode | Description |
---|---|---|
Ctrl + i | Insert/Select | |
Ctrl + l | Insert/Select | |
Ctrl + h | Insert/Select | |
Ctrl + Shift + o | Insert/Select | |
Ctrl + Shift + a | Insert/Select |
Keys | Mode | Description |
---|---|---|
Leader → w | Normal/Visual | Toggle a Value |
Keys | Mode | Description |
---|---|---|
Ctrl + t | Normal | Up Change Directory |
Ctrl + d | Normal | Change Root Directory |
? | Normal | Help |
Keys | Mode | Description |
---|---|---|
Space → d | Normal | Open Diagnostic Window |
Space → Left | Normal | |
Space → Right | Normal | |
Space → q | Normal | Send Diagnostic to Locallist |
K | Normal | Hover |
g → r → a | Normal/Visual | LSP Code Action |
Alt + Enter | Normal/Visual | LSP Code Action |
g → r → n | Normal | LSP Rename |
g → r → r | Normal | LSP References |
g → r → d | Normal | LSP Go to Definition |
g → r → D | Normal | LSP Go to Declaration |
g → r → i | Normal | LSP Go to Implementation |
g → r → f | Normal | |
g → r → k | Normal | LSP Signature Help |
g → r → s | Normal | LSP Document Symbols |
g → r → t | Normal | LSP Type Definition |
g → r → w → a | Normal | LSP Add Workspace Folder |
g → r → w → r | Normal | LSP Remove Workspace Folder |
g → r → w → l | Normal | List Workplace Folder |
Space → i → h | Normal | Inlay Hints |
Keys | Mode | Description |
---|---|---|
m | Visual/Operator | Treesitter Nodes |
The following projects were instrumental in the crafting of this environment
- Allaman's nvim
- Alexis12119's nvim-config
- glepnir's nvim
- ayamir's nvimdots
- CharlesChiuGit's nvimdots
- dragove's nvim
- Dharmx's Nvim
- loctvl842's nvim'
- ... and many, many more!