To prevent myself from going down wild Linux rabbit holes and trying every distribution I can get my hands on, I've transcended into an Apple chad. Therefore, this configuration may require changes to work in a Linux environment.
- neovim
- tmux
- yabai & skhd
- As part of the yabairc, we use jankyborders
- ripgrep
- fzf
- zsh
- sketchybar
- As part of the scripts (see here for example) we need jq
- Make sure you create a
sketchybar/scripts/weather.env.sh
file containing the values forWEATHER_KEY=123
andWEATHER_CITY=London
Optional Software: (Warning: you may have to remove some alises / plugins if these are not installed)
- bat
- eza
- zoxide
- todoist_helper
- neofetch
- tmate
- btop
- alacritty terminal
- zoxide
- nerd fonts for devicons to display in nvim-tree
- for instance,
brew tap homebrew/cask-fonts && brew install --cask font-commit-mono-nerd-font
, and added to your terminal (see ./alacrity/config.yml)
- for instance,
- cmake
brew install cmake
or else the installation of telescopes fzf plugin will fail - fd as an optional dependency of telescope, used in telescope.lua
- gpgtools for signing commits. (Note: instead of symlinking
git/.gitconfig
, copy it instead as you'll need to add a signingkey)
Most files in this repo are structured so that you can symlink the directory directly into ~/.config
, except for a few that need to live in different places such as zshrc
.
Using lazy.nvim as a plugin manager, here are the plugins used:
- goolord/alpha-nvim for the dashboard (see the asciis in utils)
- telescope.nvim for fuzzy finding
- nvim-treesitter for code parsing etc
- rose-pine/neovim as a colour scheme. an equivalent is used for tmux and alacritty themes too
- mason.nvim is used in conjunction with lsp-zero to manage your different LSPs
- lsp-zero.nvim to use NeoVim's LSP client
- harpoon is used for silky smooth file movement
- undotree for all your accidental undo's
- vim-fugitive for git within vim
- vim-rhubarb primarily just for
:GBrowse
- going to the file you're in, in your browser - copilot.vim to let robots do our work for us
- nvim-tree.lua for a better than nerdtree experience
- nvim-tree/nvim-web-devicons for icons
- lualine.nvim a good looking statusline
- Comment.nvim to comment out your broken code
- nvim-surround to surround whatever you want, with whatever you want
- conform.nvim to enable formatters such as eslint
- vim-dadbod for mysql connections and queries in vim
- Line numbers and relative numbers are turned on.
- Line wrapping is turned off.
- The grep program for searching is set to ripgrep.
- Trailing whitespace is automatically stripped on buffer write.
<leader>
is set to<Space>
<leader>sp
will spell the previous word correctly.n
andN
after a search will reposition the cursor to the center of the screen for better visibility.J
combines the next line with the current line, ensuring the cursor remains at the beginning of the combined line.<C-d>
and<C-u>
scroll half a screen down or up while keeping the cursor position fixed.<leader><Enter>
clears the search highlight.J
(Visual Mode) andK
(Visual Mode) move the selected lines down (J
) or up (K
) in visual mode.<leader>y
and<leader>Y
yank the current line (<leader>y
) or from the cursor to the end of the line (<leader>Y
) to the system clipboard.<leader>p
and<leader>d
paste (<leader>p
) or delete (<leader>d
) without copying to the buffer.<leader>f
formats the current buffer using the LSP (Language Server Protocol).<C-j>
and<C-k>
navigate through the quickfix list, ensuring the cursor position is centered.<leader>
+h,j,k,l
move your cursor to different windows.<leader>s
performs a case-insensitive search and replace across the entire buffer, prompting for confirmation.<leader>r
toggles relative line numbers.K
(Normal Mode) to show documentation.<leader>+
and<leader>-
vertically enlarge or reduce a pane.<leader>co
and<leader>cc
open and close the quickfix list.
A random list of handy vim commands
-
Copilot:
- In insert mode,
<C-L>
will complete the suggestion.
- In insert mode,
-
Fugitive:
<leader>gs
will open git in nvim.<leader>gdf
will open a git diff of the current file.
-
Harpoon:
<leader>a
will add to the list.<leader>e
will open the list. This is changeable using general vim motions, such as deleting or moving a line below.
-
Rhubarb:
<leader>gb
will open the browser to the current file.
-
Surround:
ys{motion}{wrapper}
will surround with the{wrapper}
variable. This also works invisual
mode.
-
Telescope:
- Use
\
for a fuzzy project word search. <C-T>
to search files.<C-P>
to search files that aren't in git.<leader>b
to browse your buffer files.- Pressing tab to select from the list, then following with
<C-q>
will open a quickfix list
- Use
-
Tree:
<leader>nn
to open the file tree.<leader>nf
to find the current file in the tree. Usea
to add files,d
to delete, andr
to rename from the tree.
-
Undotree:
<leader>u
to open undotree.
-
Dadbod:
<leader>db
to open the database UI.
By default, the following LSPs will be installed:
ts_ls
for typescript. (old:tsserver
)eslint
for eslint.solargraph
for ruby.lua_ls
for lua.tailwindcss
for tailwind.rust_analyzer
for rust.gopls
for golang.jsonls
for json.emmet_ls
for emmet html.
- Pressing
Tab
(orShift-Tab
) completes your LSP suggestions. - Pressing
<Enter>
populates the currently selected tab. [g
and]g
will go to the previous and next diagnostics error respectively.gd
will go to definition.<leader>gr
will go to references.<leader>cr
will rename the currently highlighted variable.<leader>vca
will display code actions.<leader>cf
will apply the quickfix code action.
Additionally, use <C-Space>
to open the completion menu if it's not automatically open.
A full list of zsh aliases live under ./zsh/aliases.zsh, but here are a few:
vi
andvim
are aliased tonvim
.ga
andgaa
alias git add for staging changes for either a specified file or all unstaged files.gap
prompts for interactive staging withgit add -p
.gb
shows the Git branch, andgc
initiates a Git commit.gca
combinesgit add .
andgit commit
.gco
is a shortcut forgit checkout
.gcob
allows you to interactively switch Git branches.gpushb
,gbd
,gpullb
, andgmergeb
streamline branch operations.gp
simplifies the Git push command.gf
andgfa
alias Git fetch commands.gst
provides a concise Git status with untracked files.egst
shows modified files withgit status
and opens them in Neovim.CTRL-T
will search for files from the command line with fzfESC-C
(ALT-C
on Linux) will search for directories from the command line, and selecting one will place you in the directory
See the tmux config in ./tmux/.tmux.conf, here are a few helpful aliases:
<C-b>
is the prefix<prefix>[
to open vi mode within tmux<prefix>f
to use thetmux-sessionizer
script, which will open a project in a new session<prefix>f
to use thetmux-sessionizer
script, which will open a project in a new session<prefix>|
to split vertically<prefix>-
to split horizontally
- Check
:checkhealth
to ensure all plugins are working correctly. - Use
:map
or:verbose map <leader>nn
(for instance) to check keybinds are being set correctly. :lua print(vim.inspect(vim.lsp.buf_get_clients()[1].resolved_capabilities))
to see what the LSP can do- If seeing errors using flags such as
error parsing flag -E
- remember that this could be because it's aliased. In the instance ofgrep
, you may need to use/usr/bin/grep
to use grep intead ofrg
- When starting
yabai
, you may need to runyabai --start-service
instead ofbrew services start yabai
per this issue
You're more than welcome to submit an issue or PR with any bugs or feature suggestions. See issues for current feature requests/bugs.
If you want to pair up on a project or build out any of the above, pop me an email at [email protected].