This configuration is no longer updated. Using this repository for it's Neovim configuration is not recommended.
If you don't care about bs and want straight to the bussiness then click here.
This configuration is aimed at development in Neovim on MacOS. That being said, the purpose of this repository is to help you get started. You are encouraged to change it to your liking, and I designed it with that in mind.
Note: The _
in the file/directory names represents .
Follow this quick tutorial to get everything you need for the full experience.
Alternatively, go through the plugins one by one and follow their installation guides.
Note1: I strongly recommend that you install everything using Brew as it will make maintaining everything way easier.
Note2: Brew is MacOS specific.
If you followed prerequisites section you should have most of the stuff done already. Now we just take it one step further. For a powerful zsh setup, read this article and then check my .zshrc
file.
You can find plugins I use in the .zshrc
file in
plugins =( ... )
Name | Description |
---|---|
Brew | Adds aliases for common brew commands |
Git | Adds aliases for common git commands |
MacOS | Utilities for macOS system |
Tmux | Aliases for common tmux commands |
Zsh-autosuggestions | This is a must have |
Zsh-syntax-highlighting | Does as it says |
The aliases.zsh
file, located in the .config
directory, contains my personal configuration. Plugins add a whole lot more, and I definitely recommend checking each plugin out.
Note: Don't forget to add this into your .zshrc
.
source ~/.config/aliases.zsh
Tip: I recommend setting up aliases for quick navigation to your work directory.
Alias | Command | Desription |
---|---|---|
General | Practical commands | |
c |
clear |
Clear your terminal |
x |
exit |
Leave current session |
n |
nvim |
Open neovim |
r |
source ~/.zshrc |
Reload zsh configuration |
u |
bubu && maintain |
Runs all necessary update commands |
Maintenance | Maintain this configuration with ease | |
u_colorls |
gem update colorls |
Updates colorls |
u_omz |
omz update |
Updates oh My ZSH! |
maintain |
u_colorls && u_omz && nonu |
Updates all plugins which are not managed by brew |
Filesystem | Move faster across files | |
~ |
cd ~/ |
Move to home directory |
. |
Open . |
Opens current directory |
.. |
cd .. |
Move up a directory |
... |
cd ../.. |
Move up 2 directories |
.... |
cd ../../.. |
Move up 3 directories |
..... |
cd ../../../.. |
Move up 4 directories |
ls |
colorls |
Beautiful file listing |
tree |
colorls --tree=3 --sd --dark |
File tree |
utree |
colorls --tree=10 --sd --dark |
Unlimited file tree |
detail |
colorls -lA --sd --dark |
Detailed info about files |
Shortcuts | Fast navigation | |
desk |
cd ~/Desktop |
move to desktop directory |
.zshrc |
nvim ~/.zshrc |
Opens .zshrc in neovim |
aliases |
nvim ~/.config/aliases.zsh |
Opens aliases.zsh in neovim |
neovim |
nvim ~/.config/nvim/init.lua |
Opens init.lua in neovim |
.tmux.conf |
nvim ~/.tmux.conf |
Opens .tmux.conf in neovim |
.p10k |
nvim ~.p10k.zsh |
Opens .p10k.zsh in neovim |
.config |
cd ~/.config |
Go to .config directory |
work |
Move to your work directory | |
Brew | Note: Brew plugin adds a lot more | Common brew comands |
bu |
brew upgrade |
Upgrades outdated packages |
bi |
brew install |
Install package |
bri |
brew reinstall |
Reinstall package |
bl |
brew list |
List of brew packages |
bubo |
brew update && brew outdated |
Update Brew and list outdated packages |
bubc |
brew upgrade && brew cleanup |
Upgrade outdated packages and run cleanup |
bubu |
bubo && bubc |
Runs both commands above |
Git | Note: Git plugin adds a lot more | Common git commands |
gc |
git clone --recursive |
Clones git repository properly |
repo |
gc https://github.com/Roiqk7/dotfiles.git |
Clones this repository |
Tmex | Read official docs for more info | |
te <layout> |
tmex -l |
After te you add your layout |
Npm | Read official docs for more info | |
ni |
npm install |
Install package |
nonu |
npm outdated && npm update |
Maintain packages |
- Install tmux.
- Clone this repository (if you haven't done so already)
gc https://github.com/Roiqk7/dotfiles
or if you don't use my aliases then by running:
git https://github.com/Roiqk7/dotfiles
- Rename the
_tmux.conf
to.tmux.conf
and put it in your root directory (~/
). - Open a terminal and run the code bellow to reload the configuration file.
tmux source ~/.tmux.conf
Follow the tmux installation guide to install it properly.
- If you want your temperature in fahrenheit then in
.tmux.conf
file change
set -g @dracula-show-fahrenheit
to false
.
- To further customize your tmux read the official Dracula theme plugin documentation for more information.
You may also like tmex. You will need to install npm by running bi npm
and when that's done run ni tmex
. Tmex will let you esily start multi-pane sessions using tmux. I recommend reading the docs for more info.
For these commands to work, you need to have my zsh configuration and have this tmux plugin and my aliases.zsh
file setup properly.
Commands | Description |
---|---|
t |
Opens tmux |
ts <name> |
Create new session with name |
ta <name> |
Come back to session |
tl |
List of sessions |
td |
Leave session |
tkc |
Terminate current session |
tko |
Terminate all other sessions |
tka |
Terminate all sessions |
<prefix>
represents <control>a
(must be pressed at the same time).
Shortcut | Description |
---|---|
<prefix>I |
Reload tmux |
<control>h/j/k/l |
Move across panes |
<prefix>h/j/k/l |
Resize panes |
<prefix>? |
Help with commands |
<prefix>| |
Horizontal split |
<prefix>- |
Vertical split |
<prefix>m |
Maximize/Minimize pane |
π ~/.config/nvim/
βββββ π lua/
β βββββ π editor/
β βββββ π mapping/
β βββββ π plugrc/
β β βββββ π lsp/
β βββββ π ui/
β βββββ π plugins.lua
β βββββ π utils.lua
βββββ π init.lua
editor
contains the neovim editor configuration.
mapping
contains all key bindings.
plugrc
contains individual plugin setups.
ui
contains settings for neovim appearance.
plugins
contains Packer with a list of all plugins.
utils.lua
contains handy, reusable functions.
- Run this to install neovim.
bi neovim
or if you don't use my aliases then by running:
brew install neovim
- Install plugin manager Packer on MacOS or Linux using this:
gc https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
- Clone this repository (if you haven't done so already)
gc https://github.com/Roiqk7/dotfiles
or if you don't use my aliases then by running:
git https://github.com/Roiqk7/dotfiles
- Go to
downloads/_config
and then move thenvim
to your~/.config
directory. - Open your terminal and run:
n
or if you do not use my aliases then do:
nvim
- Now you will see lot of errors. Simply click though them and then type
:PackerSync
. This will update your neovim. Then type:q
to leave and reopen neovim. May be neccesary to again type:PackerSync
and also wait for other plugins to install what they need so do not close neovim right away.
See this for information on how to install and setup nvim for MacOS and other platforms.
Here is a complete list of all plugins. Special thanks to all of the authors and maintainers. The order is the same as in the plugins.lua
file.
With over 60 plugins, the average load time is under 9 milliseconds (measured on a MacBook M2).
Plugins list
Name | Description |
---|---|
Packer | Plugin/Package manager |
Plenary | Used by plugins |
Impatient | Speed up startup time |
Theme | Plugins affecting visuals |
Onedark | Awesome theme |
Startup | Customizable startup screen |
Essential | Add functionality |
Surround | Master parentheses, brackets, quotes, XML tags, and more |
Comment | Better comments |
Leap | Super fast movement |
Vim Tmux Navigator | Navigate seamlessly between vim and tmux |
Nvim Tree | File explorer |
Vim Dev Icons | Adds icons for plugins |
Lualine | Adds neovim status line |
Telescope | Finder |
Todo Comments | Add todo comments |
Sad | Find and replace |
Neorg | Organizer |
Bufferline | Shameless attempt to emulate the aesthetics of GUI text editors |
Languages | Language specific plugins |
Clangd Extensions | Better C/C experience |
Neodev | Better Lua experience |
Rust Tools | Better Rust experience |
Glow | Markdown preview |
LSP | Lsp related |
LSP Setup | Wrapper for LSP Config and Mason-lspconfig |
LSP Config | Configs for the neovim LSP client |
Mason | Vital for LSP |
Mason-lspconfig | Vital for Mason |
Nvim Cmp | Completion engine for neovim |
Cmp Nvim LSP | Source for neovim's built-in language server client |
Lua Snip | Snippets for Lua |
Cmp Lua Snip | Lua Snip completion source for Nvim Cmp |
LSP Kind | Adds VS code like pictograms |
LSP Fuzzy | Makes neovim LSP use FZF |
LSP Signature | Show function signature when you type |
DAP | Debugging |
DAP UI | UI for DAP |
DAP Virtual Text | Adds virtual text support to DAP |
Trouble | Pretty list for diagnostics, definitions, etc. |
Null-ls | Inject LSP diagnostics, code actions, etc. |
Mason Null-ls | Bridges Mason and Null-ls |
Treesitter | Highlighting |
LSP Saga | Powerfull LSP UI plugin |
Fidget | LSP progress handler |
LSP Colors | Adds colors for LSP |
LSP Kind | Nicer LSP |
Lsp status | Status of LSP |
Esthetics | Style guide, indentation, trailing spaces etc. |
Guess indent | Formats indentation |
Autopairs | Automatically close parens, brackets, quotes, etc. |
Custom Diagnostic Highlight | Better LSP Highlight |
Dressing | Better UI |
Git Signs | Git decorations |
<leader>
represents space key.
Shortcut | Mode | Description |
---|---|---|
Most common | ||
jk |
Insert | Enter normal mode |
<leader>e |
Normal | Toggle file explorer |
<leader>dtd |
Normal | Display all TODO comments |
<leader>rn |
Normal | Project wide find and replace |
<leader>gc |
Normal | Toggle grammar check |
General | ||
<leader>su |
Normal | Return to Startup screen |
<leader>r |
Normal | Reload nvim configuration |
<leader>ps |
Normal | Run :PackerSync command |
<leader>lt |
Normal | See load times at the startup |
<leader>t |
Any | Opens terminal on next window |
Navigation | ||
<leader>bc |
Normal | Close current buffer |
<leader>ba |
Normal | Close all buffers |
<leader>bn |
Normal | Move to next buffer |
<leader>bp |
Normal | Move to previous buffer |
<leader>bl |
Normal | Move to last visited buffer |
<leader>b1 |
Normal | Move to first buffer |
<leader>b9 |
Normal | Move to last buffer |
<leader>sv |
Normal | Split vertically |
<leader>sh |
Normal | Split horizontally |
<leader>sx |
Normal | Close split window |
Search | ||
<leader>ff |
Normal | Find file in current directory |
<leader>fs |
Normal | Find string in current directory |
<leader>ftd |
Normal | Search though TODO comments |
<leader>rb |
Normal | Recent buffers in current session |
<leader>of |
Normal | Old files |
LSP | ||
pd |
Normal, Insert | Peek definition |
fd |
Normal, Insert | Find definition and references |
gd |
Normal, Insert | Go to definition |
[d ]d |
Normal, Insert | Move between diagnostics |
[e ]e |
Normal, Insert | Jump between errors |
<leader>dd |
Normal | Display diagnostics |
hd |
Normal, Insert | Get hover doc with useful information |
<leader>bd |
Normal | Show buffer diagnostics |
<leader>gr |
Normal | Get references |
<leader>ca |
Normal | Code actions |
<leader>o |
Normal | Toggle outline |
Here are some resources you can use to master this configuration. Note that all the plugins mentioned are already installed and configured.
Name | Description |
---|---|
leap | Move around even faster using this plugin |
surround.vim | Master the art of parentheses, brackets, quotes, XML tags, and more |
comment.nvim | Supper easy way to comment out code etc. |
If you get this error message after running
:PackerSync
then go into a terminal and enter this piece of code:
ulimit -n 10240
Note that this is not a permanent solution. It will increase the maximum number of files just for the current session.