DEV Community

Cover image for Setup Neovim like an IDE For Development in Arch Based Linux
Sujit Kumar
Sujit Kumar

Posted on

Setup Neovim like an IDE For Development in Arch Based Linux

Image description
Note: Use these settings and configurations at your own risk. Make sure you understand what each change entails.

Configuring Neovim with Dotfiles

Contents

  • Vim (Neovim) Configuration
  • Tmux Configuration
  • Git Configuration
  • Fish Configuration ### Plugins and Themes

Install the following Neovim plugins and themes:

You will need Neovim (version 0.8 or higher) for these configurations.

  1. Install Neovim
sudo pacman -S neovim
Enter fullscreen mode Exit fullscreen mode

Plugin Manager: wbthomason/packer.nvim

Install the Packer plugin manager for Neovim:

git clone https://aur.archlinux.org/nvim-packer-git.git
cd nvim-packer-git/
makepkg -si
Enter fullscreen mode Exit fullscreen mode

Fancy Shell for Linux

Install Fish shell

sudo pacman -S fish
Enter fullscreen mode Exit fullscreen mode

Configuration

  1. Clone this repository:
git clone https://github.com/craftzdog/dotfiles-public
Enter fullscreen mode Exit fullscreen mode
  1. Create a directory at ~/.config/nvim and copy the dotfiles-public/.config/nvim directory:
mkdir ~/.config/nvim
cp -r dotfiles-public/.config/nvim/ ~/.config/nvim/
Enter fullscreen mode Exit fullscreen mode
  1. Open plugin.lua:
nvim ~/.config/nvim/lua/craftzdog/plugins.lua
Enter fullscreen mode Exit fullscreen mode
  1. Switch to COMMAND mode in Neovim and enter the following command to install the plugins: Note: For switching command mode in Neovim press "shift+:" when you are in normal mode in neovim:
:PackerInstall
Enter fullscreen mode Exit fullscreen mode

Tree-sitter for Syntax Highlighting

Install Tree-sitter for syntax highlighting:

  1. Install Tree-sitter:
sudo pacman -S tree-sitter
Enter fullscreen mode Exit fullscreen mode
  1. Install Tree-sitter CLI:
sudo npm install -g tree-sitter-cli
Enter fullscreen mode Exit fullscreen mode

Auto Suggestion & Syntax Highlighting (VSCode-like)

Set up language servers for JavaScript or TypeScript:

  1. Install the JavaScript/ TypeScript language server:
sudo npm install -g typescript-language-server typescript
Enter fullscreen mode Exit fullscreen mode

Note: This language server will work for JavaScript as well as TypeScript.

  1. For Tailwind CSS users, install a language server for Tailwind CSS:
sudo npm install -g @tailwindcss/language-server
Enter fullscreen mode Exit fullscreen mode
  1. To see a list of available languages for installation, use:
:TSInstallInfo
Enter fullscreen mode Exit fullscreen mode
  1. Install the required language parsers, e.g., for JavaScript, php, python, go:
:TSInstall python
Enter fullscreen mode Exit fullscreen mode

Finally You can launch Neovim by running:

nvim my_project # Replace "my_project" with your project name
# or
nvim . # Open Neovim in the current directory
Enter fullscreen mode Exit fullscreen mode

If you are getting any errors during installation or need setup instructions for other operating systems, please let me know, and I will provide further guidance.

Thanks for Reading!
Go GodSpeed!!

Top comments (0)