install neovim on archlinux

Install Neovim on ArchLinux – Easy Setup with init.vim Guide

How to install Neovim on ArchLinux is something every keyboard ninja wants to Google at some point.

If you’re tired of big bloated IDEs eating RAM like they’re at a buffet, then say hello to Neovim — the fast, minimal, and endlessly customizable text editor that makes you feel like a hacker in a movie.

So in this blog post, we’re gonna:

  • Install Neovim on Arch Linux
  • Configure it with init.vim
  • Set up plugins like coc.nvim, Telescope, and more
  • Feel cool (this step is automatic)

Let’s get into it like it’s our Vim crush 💘

Step 1: Install Neovim on Arch Linux

Installing Neovim is as easy as typing one command in Arch (thank you, pacman 😘).

Open terminal and run:

sudo pacman -S neovim

Boom. That’s it.

Wanna check if it worked?

nvim --version

If you see version details, you’re in business, boss.

🐍 Step 2: Install Python3 + Pynvim (for CoC & others)

Some plugins (like coc.nvim and ultisnips) need Python to behave nicely. So we install Python and pip first.

Run this:

sudo pacman -S python python-pip

That --user flag installs it locally for you. Less drama, more lama.

Step 3: Check Provider Health in Neovim

Open Neovim and type:

:checkhealth

Make sure everything looks good under:

  • Python 3 provider ✅
  • Node provider ✅ (we’ll fix this next if not)

Step 4: Install Node.js (For coc.nvim)

🧾 Run this to install Node.js:

sudo pacman -S nodejs npm

Now restart Neovim and run :checkhealth again. That sweet green “OK” is what you’re looking for 💚


Step 5: Create Your Config Folder (if it doesn’t exist)

Let’s create the config folder where your init.vim will live.

Run this:

mkdir -p ~/.config/nvim

Step 6: Add Your init.vim Configuration

Now comes the fun part — customizing your Neovim.

We’ve crafted a full-blown init.vim with:

  • Dracula theme 🧛
  • NERDTree file explorer 🌲
  • CoC for auto-complete 🔮
  • Telescope fuzzy finder 🔍
  • And other magic

📌 Paste your config in:

nano ~/.config/nvim/init.vim
install neovim on archlinux

Replace the content with this:

" ---------------------------- Basic Settings ----------------------------
set nocompatible
set showmatch
set ignorecase
set mouse=a
set hlsearch
set incsearch
set tabstop=4
set softtabstop=4
set expandtab
set shiftwidth=4
set autoindent
set number
set relativenumber
set wildmode=longest,list
set cc=80
set clipboard=unnamedplus
set cursorline
set ttyfast
syntax on
filetype plugin indent on
set splitright
set splitbelow

" ---------------------------- Plugin Manager ----------------------------
call plug#begin(stdpath('data') . '/plugged')

" Look and Feel
Plug 'dracula/vim'
Plug 'ryanoasis/vim-devicons'
Plug 'nvim-tree/nvim-web-devicons'
Plug 'mhinz/vim-startify'
Plug 'nvimdev/dashboard-nvim'

" File Explorer
Plug 'scrooloose/nerdtree'
Plug 'nvim-tree/nvim-tree.lua'

" Autocompletion and Snippets
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'L3MON4D3/LuaSnip'
Plug 'honza/vim-snippets'

" Commenting
Plug 'preservim/nerdcommenter'

" Copilot
Plug 'github/copilot.vim'

" Keybinding Helper
Plug 'folke/which-key.nvim'

" Fuzzy Finder
Plug 'nvim-telescope/telescope.nvim'

Plug 'nvim-lua/plenary.nvim'


call plug#end()

" ---------------------------- Colorscheme ----------------------------
if (has("termguicolors"))
  set termguicolors
endif
syntax enable
colorscheme dracula

" ---------------------------- Nvim Tree Setup ----------------------------
lua <<EOF
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup({
  sort_by = "case_sensitive",
  view = {
    adaptive_size = true,
    mappings = {
      list = {
        { key = "u", action = "dir_up" },
      },
    },
  },
  renderer = {
    group_empty = true,
  },
  filters = {
    dotfiles = false,
  },
})
EOF

" ---------------------------- Dashboard Setup ----------------------------
lua <<EOF
require('dashboard').setup({
  theme = 'doom',
  config = {
    header = {
      '',
      'Welcome to Neovim',
      '',
    },
    center = {
      { icon = '  ', desc = 'Find File          ', action = 'Telescope find_files' },
      { icon = '  ', desc = 'Find Word          ', action = 'Telescope live_grep' },
      { icon = '  ', desc = 'Recent Files       ', action = 'Telescope oldfiles' },
      { icon = '  ', desc = 'New File           ', action = 'ene!'},
    },
    footer = { 'Happy Hacking!' }
  }
})
EOF

" ---------------------------- Telescope Setup ----------------------------
lua <<EOF
require('telescope').setup{
  defaults = {
    file_ignore_patterns = {"node_modules", ".git/"},
  }
}
EOF

" ---------------------------- Which-Key Setup ----------------------------
lua <<EOF
require("which-key").setup {}
EOF

" ---------------------------- CoC Config ----------------------------
" Use <Tab> for trigger completion and navigate
inoremap <silent><expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <silent><expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>"

" CoC extensions for Python, Go, Web, Shell
let g:coc_global_extensions = [
  \ 'coc-pyright',
  \ 'coc-go',
  \ 'coc-tsserver',
  \ 'coc-html',
  \ 'coc-json',
  \ 'coc-css',
  \ 'coc-snippets',
  \ 'coc-sh',
  \ 'coc-prettier'
\ ]

" Format on save
autocmd BufWritePre *.py,*.js,*.ts,*.go,*.sh,*.html,*.css :silent! :CocCommand editor.action.formatDocument

" ---------------------------- Custom Keymaps ----------------------------
" Move line or selected block - alt+j/k
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv

" Pane navigation with Ctrl + hjkl
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l

" Quick Esc
inoremap jk <Esc>
inoremap kj <Esc>
vnoremap jk <Esc>
vnoremap kj <Esc>

" Open file under cursor with :gf
nnoremap gf :vert winc f<cr>

" Copy file path with yf / yd
nnoremap <silent> yf :let @+=expand('%:p')<CR>
nnoremap <silent> yd :let @+=expand('%:p:h')<CR>

" Jump to last position when reopening file
if has("autocmd")
  autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
    \ exe "normal! g'\"" | endif
endif

That’s your golden config, friend.

Step 7: Install Plugins with Vim-Plug

We’re using vim-plug as our plugin manager.

Run this to install it:

curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Now open Neovim and install plugins:

:PlugInstall
install neovim on archlinux

Give it a few seconds to do its magic 🪄

Step 8: Learn Some Useful Keymaps (included in config)

Here are a few hotkeys from your config:

  • Ctrl + hjkl → Move between splits
  • Alt + j/k → Move lines up or down
  • gf → Open file under cursor
  • jk or kj → Escape insert mode (faster than your ex leaving 😅)

You can explore more in the keymaps section of your init.vim.

Final Words (install neovim on archlinux)

That’s it, boss!

You’ve just installed Neovim on Arch Linux, and configured it like a real dev-hero.

You’re now ready to code, write, and even hack like it’s 1999 💻

Wanna go further? Try:

  • Custom themes
  • More CoC extensions
  • Creating your own Vim functions

Also, don’t forget to backup your init.vim file because you’ll fall in love with it 💘

FAQs

Where is Neovim config file on Linux?

In Arch, it’s located at:

~/.config/nvim/init.vim

Can I use Lua instead of VimScript?

Yes, but that’s a journey for another blog post. One step at a time, sensei 🥷

Let me know if you want a Part 2: Lua Config for Neovim or How to use Telescope like a spy agent 🕵️

Wanna make it downloadable as PDF too? I got you!


other blogs

  1. Build a Micro SaaS Image to WebP Converter Using Python Flask
  2. 10 Best Final Year Cybersecurity Project Ideas with source code.
  3. Interactive Snake Game Using OpenCV & Hand Tracking
  4. Build a URL Shortener with Python, Flask & MySQL, Tailwindcss
  5. Microblogging for Cybersecurity: The Future of Short-form Content
  6. Cyber Security vs AI: Which Career Should You Choose?
  7. Instagram Video Downloader: Your Easy-to-Use Tool

Leave a Comment

Your email address will not be published. Required fields are marked *