My personal development environment for Neovim
Note
Tag with_submodules references the version containing git submodules
,
lazy.nvim
and mini.deps
Tag with_lazynvim references the version containing lazy.nvim
and mini.deps
init
: Uses:h vim.loader
and callsak.init
- ak.init: Invoke ak.mini_deps
- ak.deps: Load plugins
- ak.config: All setup for plugins, options, key-mappings, auto-commands, and colors
- ak.mini: Internal plugins ak.mini.visits_harpooned and ak.mini.pick_hinted
- ak.util: Shared code
Requirements: Neovim latest version or nightly.
Always review the code before trying a configuration.
Clone the repository:
git clone https://github.com/abeldekat/nvim_pde ~/.config/ak
Open Neovim with this config, installing the plugins:
NVIM_APPNAME=ak nvim
Remove the config:
rm -rf ~/.local/share/ak ~/.local/state/ak ~/.cache/ak
rm -rf ~/.config/ak
Note: For peek.nvim, deno needs to be installed.
I touch type using the right hand in combination with the forefinger of the left hand
- Leader:
space
- Main plugins: ak.mini.visits_harpooned, oil.nvim, mini.pick and mini.jump2d
- Menu: mini.clue
Internal plugin ak.mini.visits_harpooned is a customized mini.visits configuration,
operating in almost the same way as harpoon
- Info in statusline: ak.mini.visits_harpooned_line
- The shortcuts normally used for window navigation correspond to visit 1-4 in current label:
c-j
,<c-k>
,<c-l>
,<c-h>
- Toggle current label on visit:
<leader>a
- Add visit to "uncategorised" label:
<leader>oa
- Pick visits from all labels:
<leader>j
("strongest finger") - Pick visits having current label:
<leader>ol
- Change current label:
<leader>oj
- Maintain visits having active label:
<leader>om
- Remove active label from visits:
<leader>or
- Copy global visits to "uncategorised" label:
<leader>oc
Pickers can display hints using internal plugin ak.mini.pick_hinted
<c-w>hjkl
(stockNeovim
)mw
(next window)me
(last accessed window)
mk
("rolling fingers"), opening oilh
up one levell
down one level, open file
- tmux-sessionizer inspired by @ThePrimeagen
- workspaces at the top of the screen, using tmuxp
- leader:
ctrl space
- navigation:
tmux-sessionizer
: leader h- previous session: leader j
- previous window: leader l
- existing sessions: leader k
- switch pane: leader o
mini.statusline
, no colors, except on:- mode change
- diagnostics
- current buffer has current label (mini.visits)
- macro recording
- many color-schemes
Change color-schemes:
- on each startup, see scripts,
vim_menu_owns
- mini.pick,
leader f o c
, loads all colors, does not show builtin color-schemes - change the palette of the current color-scheme using leader h
Script vim_menu_owns
writes to lua.ak.colors
.
Ignoring changes to that file:
git update-index --assume-unchanged lua/ak/colors.lua
Replace replace with substitute mnemonic:
In my config, the suggested key gr
("go replace") in mini.operators is already used
for the lsp
("go references").
I prefer "two character hotkeys" as I use some lsp keys quite often(gd
, gr
).
Solution: Change operator gr
into gs
, mnemonic for "go substitute".
Consequences:
- mini.operators: Change suggested key
gs
("go sort") intogS
. - mini.surround: Change
sr
(surround replace) intoss
(surround substitute).
Many of the excellent modules included in mini.nvim are used in this config:
ai
, align
, animate
, base16
, clue
, cursorword
,
deps
, diff
, git
, hipatterns
, hue
, icons
,
indentscope
, jump2d
, move
, notify
, operators
, pairs
,
pick
, splitjoin
, starter
, statusline
, surround
, visits
Relevant discussions:
- From
grapple
tomini.visits
. See internal plugin ak.mini.visits_harpooned - Augment pickers with labels and hotkeys. See internal plugin ak.mini.pick_hinted
- Pick bufferlines with treesitter highlighting.
- Apply tokyonight dev environment.
- Optimized jumping with jump2d.
- Beta testing mini.deps.
tmux alacritty zsh scripts awesome arch linux
This repo uses code and ideas from the following repositories: