Skip to content

Mo0rBy/moorby-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mo0rBy's dotfiles

This repository contains files relevant to my development environment and other dotfiles that I want to to sync across multiple machines.

Cross-application colourscheme

I use the Tokyonight Moon colourscheme. I've experimented with a few different colourschemes and for now I have chosen Tokyonight because it is very well supported by many different applications. This means that I don't have much trouble in getting it to work across all the different tools that I use and it makes my life much easier.

WezTerm

I use WezTerm for my terminal needs. It's written using Rust and utlises the GPU for it's rendering, resulting in a super fast experience. I also love that all it's configuration and settings are set sing lua config files, just like with Neovim.

ZSH

I use ZSH as my shell of choice as it has really nice customization options using oh-my-zsh and I love the autocomplete features it comes with.

Setup

  1. You need to install ZSH by following the instructions provided on the ohmyzsh Github repo, here. This should create some new files in your $HOME directory, namely the .zshenv and .zshrc files.

  2. In order to use the ZSH configuration in this repo, you need to complete a few more steps. Remove both .zshenv and .zshrc files that were generated when installing ZSH. Next, symlink the .zshenv file: (this command assumes that this repo is cloned to ~/.config, modify the command if required)

      ln -s ~/.config/zsh/.zshenv ~/.zshenv

    The .zshenv file in this repo contains some configuration that tells ZSH that the remaining config files are located in $HOME/.config/zsh.

    This repository has a git submodule for the oh-my-zsh repository and the included .zshrc has a line telling ZSH where the oh-my-zsh installation is located so there is no need to install it separately.

Tmux

I use my terminal ALL the time. Tmux helps me to increase my productivity when in my terminal. The primary utility of Tmux is that it allows me to quickly switch between Neovim and a CLI terminal window.

Setup

Install tmux using your preferred method. I did not have any issues installing the latest version using the apt package manager like I did with alacritty.

To ensure that the tmux/tmux.conf file is loaded, open a tmux session and use the default keymap (Ctrl+b) and press : to enter the tmux command mode and execute source-file ~/.config/tmux/tmux.conf to load the config. If the default Ctrl+b doesn't work, then try Ctrl+a, this is what I have it set to in my config.

Once the tmux.conf has been loaded for the first time, then you can use Ctrl+a, r to refresh the tmux config.

Theming options

Tmux theming and colour configuration is all done within the tmux.conf file along with everything else. I struggled a bit to find information on the different styling options and what they do and then I found this video which made it quite easy to understand. Another good thing to look at would be the tmux man pages. In my opinion, the tmux man pages aren't really clear in what the option is modifying, it would be useful to have some visual examples like images or videos, hence why I have added the link to the video above that shows what some of the option do really clearly. I highly recommend playing with the options inside your tmux.conf file, just to get a feel for what the config option is doing and how it looks in your tmux.

Plugins

  • vim-tmux-navigator - adds useful keymaps for navigating splits within vim and tmux
  • tmux-resurrect - saves tmux windows & sessions when machine is restarted
  • tmux-continuum - continuously auto-saves the state of tmux (works nicely with tmux-resurrect)

Neovim

Neovim is an evolution of vi and vim. You can install many different plugins to make Neovim look and feel exactly as you want. I use it as my main code editor.

Plugins

This is a list of all the plugins I use in my Neovim config.

Quality of life

  • vim-tmux-navigator - adds useful keymaps for navigating splits within vim and tmux
  • telescope - a fuzzy finder plugin making it easier to find open buffers as well as files and text across directories, this has dependencies for:
    • plenary - adds extra lua functions
    • ripgrep - a tool that can recursively search across directories for a regex pattern
  • vim-illuminate - this plugin will highlight other instances of a word that the cursor is on
  • vim-highlightedyank - this plugin highlights what was just yanked (copied)
  • vim-maximizer - used to maximize (and return to normal) a split
  • indent-blankline - makes it easier to see indentation (my configuration uses the scope too), this has dependencies for:
  • comment - used for better commenting functionality, this has dependencies for:
  • vim-surround - adds useful keymaps to modify textobject surroundings
  • cutlass - modifies delete keys to use the blackhole register to make copy/paste/delete workflows easier
  • nvim-silicon - Adds nvim integration for Silicon code snapshot CLI tool
  • auto-session - adds session management functionality

UI modifications

  • nvim-tree - a file explorer plugin, I prefer it over the default netrw plugin
  • nvim-web-devicons - better icons for filetypes
  • dressing - modifies some UI elements for example, adding/renaming files in nvim-tree or inputs for LSP renaming
  • lualine - adds a status line
  • [noice]https://github.com/folke/noice.nvim) - adds different UI elements and more customisation to notifications, cmdline and searching
  • alpha - adds a customizable greeting pane when you start neovim
  • nvim-pqf - modifies the quickfix window and makes it easier to read

Syntax highlighting

  • nvim-treesitter - provides better syntax highlighting, this has dependencies for:
  • vim-polyglot - this plugin is a language pack that adds syntax highlighting support for ~150 more languages. This includes adding helm filetypes which is one of the reasons I use it
  • tree-sitter-go-tempalte - adds syntax highlighting for Go template filetypes

Auto-completion features

  • nvim-cmp - used for autocompletion snippets, this has dependencies for:
  • mason - this is a plugin manager for LSP servers, this has dependencies for:
    • mason-lspconfig - this plugin makes it easier to use lspconfig with Mason
  • lspconfig - this plugin allows setup and configuration of LSP servers

Git

  • gitsigns - adds git integration to buffers so you can see git changes + git blame etc
  • neogit - adds neovim integration for git workflows, e.g. viewing diffs and committing changes, viewing git log/reflog, interactive rebasing, etc (same sort of thing as lazygit, but has a more intuative UI design and better configurability + keymapping)
  • diffview - adds a nice git diff view (like VSCode)

Note Taking

K9s

As a DevOps Engineer / SRE, I interact with Kubernetes clusters literally all day, almost every day. For this reason, I use the K9s terminal GUI as a great way to understand whatever is happening in a K8s cluster at any given time. It's a very intuative UI with sensible keyboard shortcuts and you can add configuration options in a file just like alacritty and tmux!

Setup

This one is pretty easy! Just install K9s using your preferred method and it will automatically be setup to read it's config file inside the $XDG_CONFIG_HOME/k9s directory. It really is as simple as that!

Extra CLI Tools

Here is a list with the links to the relevant Github pages for CLI tools that I like to use in my setup. My .zshrc file contains some aliases for these CLI tools, so you must make sure they are installed for these aliases to work correctly.

  • eza (a better ls command)
  • bat (a better cat command)
  • zoxide (a better cd command)
  • fzf (a really nice fuzzyfinder tool)
  • ripgrep (a better grep command)
  • sdkman (helps to install and organize SDK's (JDK's, Maven, Gradle, etc))
  • pyenv (tool that helps to manage multiple python versions)
  • silicon (allows you to take nice screenshots of code)
  • yazi (a terminal file explorer (similar to Ranger)

Custom Scripts

I am new to creating custom scripts for my workflows and for this reason I only have 2 currently. All my custom scripts are stored in the scripts directory and more child directories exist here to categorize different scripts.

In the future, I will create a "setup script" that can be run to setup and install this entire dot-files repository. The main point of this will be to create a number of symlinks and run installation commands (if possible).


Need to add a new part of the README that describes how to setup on a branch new machine:

  1. symlink zshenv file
  2. Install HomeBrew
  3. Install Brew file with brew bundle install --file=Brewfile
  4. git submodule update --init --recursive
  5. Navigate to .config/zsh/.oh-my-zsh
  6. Run tools/upgrade.sh
  7. Install p10k (git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k) (config should be loaded automatically by restarting terminal)
  8. Install SDKMan (curl -s "https://get.sdkman.io" | bash)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published