Skip to content

abeldekat/nvim_pde

Repository files navigation

Neovim pde

My personal development environment for Neovim

Older versions

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

Structure

  • init: Defers to ak.init. Uses :h vim.loader.
  • ak.init: Bootstrap mini.deps using ak.boot.deps
  • ak.deps: Contains specs for mini.deps that load the config in ak.config
  • ak.config: Contains all setup for options, key-mappings, auto-commands, color-schemes and plugins.
  • ak.util: Shared code.

Install

Requirements: Neovim latest version or nightly.

Always review the code before installing 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.

Workflow

I touch type using the right hand in combination with the forefinger of the left hand

Leader: space

Navigation

  • Main plugins: harpoon, oil and telescope.
  • Menu: mini.clue

Harpoon

  • Switch active list: <leader>J
  • Info in statusline: abeldekat/harpoonline
  • Using the shortcuts for window navigation: c-j, <c-k>,<c-l>,<c-h>, corresponding to file 1-4
  • ui: <leader>j ("strongest finger")
  • add: <leader>a
  • next/prev: <leader>n / <leader>p

Window navigation:

  • <c-w>hjkl (stock Neovim)
  • mw(next window)
  • me(last accessed window)

Oil

  • ml("rolling fingers"), opening oil
  • h up one level
  • l down one level, open file

Tmux

  • 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

UI

  • mini.statusline, no colors, except on:
    • mode change
    • diagnostics
    • current buffer is harpooned
    • macro recording
  • cmdheight 0
  • many color-schemes

Change color-schemes:

  • on each startup, see scripts, vim_menu_owns
  • telescope, leader uu, loads all colors, does not show builtin color-schemes
  • change the palette of the current color-scheme using leader h, aka "hue"

Script vim_menu_owns writes to lua.ak.colors. Ignoring changes to that file:

git update-index --assume-unchanged lua/ak/colors.lua

Key conflicts

Surrounding:

Using mini.surround. Suggested keys: sa sd sr sf sF sh sn

The "s" is already used by leap.nvim. Solution: Use the m key in combination with asdf, adjacent keys on a qwerty keyboard. Key ms is a mnemonic for surround substitute, performing a surround replace.

Operators:

Using mini.operators. Suggested key gr("go replace") is already used by the lsp("go references"). Solution: Use gs, mnemonic for "go substitute". Change suggested key gs("go sort") into gS.

Environment

tmux alacritty zsh scripts awesome arch linux

Acknowledgements

This repo uses code and ideas from the following repositories: