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|
Installation
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.
Configuration Structure
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
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.
General Keybindings
[!] Note:
means press both keys at the same time
→ means first the key on the left then the key on the right
Basic Navigation and Editing
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
Text Manipulation
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
Buffer Management
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
Window Management
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
Search and Replace
Keys
Mode
Description
, → R
Normal
Search and Replace the word under cursor
, → r
Normal
Search and replace in visual selection
Selection and Deletion
Keys
Mode
Description
Control + a
Normal
Select All
d + D
Normal
Delete current line without yanking
d + d
Normal
Yank non-empty lines
Insert Mode
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 {},
Editor Functionality
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
Plugin Management (Lazy)
Keys
Mode
Description
Leader → l → a
Normal
Open Lazy
Leader → l → c
Normal
Check Lazy Plugins
Leader → l → s
Normal
Sync Lazy Plugins
Debugging
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
Diff View
Keys
Mode
Description
Leader → d → v
Normal
Diffview Toggle
Noice
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
Terminal Bindings
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
Java Development Tools
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
LuaSnip
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
Nvim-Toggler
Keys
Mode
Description
Leader → w
Normal/Visual
Toggle a Value
Nvim-Tree
Keys
Mode
Description
Ctrl + t
Normal
Up Change Directory
Ctrl + d
Normal
Change Root Directory
?
Normal
Help
LSP (Language Server Protocol)
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
Treesitter
Keys
Mode
Description
m
Visual/Operator
Treesitter Nodes
Inspiration
The following projects were instrumental in the crafting of this environment