Skip to content

CoMfUcIoS/neovim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration Repository

This repository contains a comprehensive Neovim configuration written in Lua. It includes a variety of plugins and settings to enhance your Neovim experience.

Notice: This configuration is tuned for MacOS using a Customised Miryoku ColemakDH keyboard layout on a split keyboard. If you are using a different keyboard layout, you may need to make some adjustments to the keybindings.

You can check the following repositories for the ZMK and QMK firmware for the above mentioned keyboard layout: qmk firmware, zmk firmware

Structure

The repository is structured as follows:

Plugins

The project includes a variety of plugins, each with its own purpose. All plugins are located in the lua/plugins/ directory.

Installation

MacOS

  1. Install Neovim using Homebrew:
brew install neovim

for images to work properly, install the following:

  1. Install kitty terminal
brew install imagemagick
brew install luarocks
luarocks --local --lua-version=5.1 install magick
```
If you use Tmux, ~/Tmux.conf should have set -gq allow-passthrough on

2. Clone this repository into your Neovim configuration directory:

```bash
git clone https://github.com/CoMfUcIoS/neovim.git ~/.config/nvim

Tmux navigation

for tmux - nvim navigation to work properly, you need to add the following to your ~/.tmux.conf file:

# in your tpm plugins
set -g @plugin 'christoomey/vim-tmux-navigator'

# in your key bindings

# decide whether we're in a Vim process
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"

bind-key -n 'M-Left' if-shell "$is_vim" 'send-keys M-Left' 'select-pane -L'
bind-key -n 'M-Down' if-shell "$is_vim" 'send-keys M-Down' 'select-pane -D'
bind-key -n 'M-Up' if-shell "$is_vim" 'send-keys M-Up' 'select-pane -U'
bind-key -n 'M-Right' if-shell "$is_vim" 'send-keys M-Right' 'select-pane -R'

tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'

if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
    "bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\'  'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
    "bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\\\'  'select-pane -l'"

bind-key -n 'M-Space' if-shell "$is_vim" 'send-keys M-Space' 'select-pane -t:.+'

bind-key -T copy-mode-vi 'M-Left' select-pane -L
bind-key -T copy-mode-vi 'M-Down' select-pane -D
bind-key -T copy-mode-vi 'M-Up' select-pane -U
bind-key -T copy-mode-vi 'M-Right' select-pane -R
bind-key -T copy-mode-vi 'M-\' select-pane -l
bind-key -T copy-mode-vi 'M-Space' select-pane -t:.+

Now you can use your Alt/Options key to navigate between tmux panes and nvim splits

Obsidian

For obsidian (https://obsidian.md/) functionality and features in your neovim you need to install the following:

brew install pngpaste

Linux

  1. Install Neovim using your package manager. For Ubuntu, you can use:
sudo apt install neovim
  1. Clone this repository into your Neovim configuration directory:
git clone https://github.com/CoMfUcIoS/neovim.git ~/.config/nvim

About

My configuration of Neovim.

Resources

Stars

Watchers

Forks