annguyenwasd / dotfiles

Setup once, run forever

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personal Development Envionment

Workflow

I'll show serveral keymaps for daily basis workflow (not all keymaps)

Start a coding session with tmux

tmux

Prerequisites

  • Set WORKSPACE_FOLDER to your folder containing your projects
  • Set DOTFILES to your dotifles folder

Tmux + FZF

By setting WORKSPACE_FOLDER in the .zshrc file, navigates between project become eaziser when combines with fzf

Mappings:

  • fw show list of folder under WORKSPACE_FOLDER. Press Enter will cd into that folder
  • ff show list of folder under WORKSPACE_FOLDER. Press Enter will cd into that folder, and open nvim
  • fff show list of folder under WORKSPACE_FOLDER. Press Enter will cd into that folder, open nvim, and change the tmux window's name by the current directory's name

  • dot will cd to DOTFILES folder, open nvim and set tmux window to folder's name

  • c-a + o will close all panes in current window

  • c-a + O (capital O) will close all window in current session and re-index current window to 1

Neovim

Basic movement

  • space + o: open fuzzy finder

  • space + i: open list of open buffers

  • space + n: toggle explorer tree

  • space + space + f + c: open theme chooser, first choose theme, then choose variant

  • space + space + f + h: open help fuzzy finder

  • space + k + m: open key map fuzzy finder

  • space + /: fuzzy search current buffer

LSP

  • space + f + m: format current buffer

  • space + a + c: show code action

  • space + l + d: show diagnostics

  • K: hover

Git inside neovim

  • space + h + c: show diff current hunk

  • ] + c: go to next hunk

  • [ + c: go to previous hunk

  • space + h + a: stage current hunk

  • space + h + A: stage whole current buffer

  • space + h + d: reset current hunk

  • space + h + D: reset whole current buffer

  • space + b + l: show floating blame

  • space + space + b + l: show whole buffer blame

Installation

Homebrew

  git clone https://github.com/Homebrew/brew.git ~/homebrew

then (add this to your shell profile)

  export PATH="$PATH:$HOME/homebrew/bin"

Stow

Make sure you installed stow

brew install stow

After that, just clone my repo to your home directory

cd ~ && git clone https://github.com/annguyenwasd/dotfiles.git && cd ~/dotfiles && rm -rf .non-stow && stow . && git stash -u

if you just want to use neovim, just

stow neovim

Goal

  • Minimalism
  • Speed
  • Fun
  • Fully personal customization

Non-Goal

  • Become an IDE
  • Alternative pre-configured repos: Lunar.nvim, Astro.nvim, etc.

Issues

  • LSP not started in a single file
  • Diagnostic not working with javascript file
  • Find text in specific folder
  • jose-elias-alvarez/nvim-lsp-ts-utils oudated

About

Setup once, run forever


Languages

Language:Lua 50.5%Language:Shell 39.0%Language:Vim Snippet 5.2%Language:Ruby 2.8%Language:Vim Script 2.4%