Setup Neovim like an IDE For Development in Arch Based Linux
Tags: neovim, configurations, linux, productivity
Published: 2023-09-20 13:02:32


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7oe6abw1jhhkvneqnxjt.png)
**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:

- [svrana/neosolarized.nvim](https://github.com/svrana/neosolarized.nvim) - A truecolor, Solarized dark colorscheme.
- [nvim-lualine/lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - A fast and customizable statusline for Neovim written in Lua.
- [onsails/lspkind-nvim](https://github.com/onsails/lspkind-nvim) - Adds VSCode-like pictograms.
- [L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip) - A snippet engine for Neovim written in Lua.
- [hrsh7th/cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) - Provides nvim-cmp source for Neovim's built-in LSP.
- [hrsh7th/cmp-buffer](https://github.com/hrsh7th/cmp-buffer) - Offers nvim-cmp source for buffer words.
- [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - A Lua-based completion engine plugin for Neovim.
- [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - A collection of configurations for Neovim's built-in LSP.
- [jose-elias-alvarez/null-ls.nvim](https://github.com/jose-elias-alvarez/null-ls.nvim) - Allows Neovim to serve as a language server, providing LSP diagnostics, code actions, and more via Lua.
- [williamboman/mason.nvim](https://github.com/williamboman/mason.nvim) - A portable package manager for Neovim that runs everywhere Neovim does. Easily manage LSP servers, DAP servers, linters, and formatters.
- [williamboman/mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfig.nvim) - An extension to mason.nvim, simplifying the use of lspconfig with mason.nvim.
- [glepnir/lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim) - A lightweight LSP plugin based on Neovim's built-in LSP with a highly performant UI.
- [nvim-treesitter/nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - Provides Treesitter configurations and an abstraction layer for Neovim.
- [kyazdani42/nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) - A Lua fork of vim-web-devicons for Neovim.
- [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - A highly extendable fuzzy finder for lists.
- [nvim-telescope/telescope-file-browser.nvim](https://github.com/nvim-telescope/telescope-file-browser.nvim) - A file browser extension for telescope.nvim.
- [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs) - Autopairs support.
- [windwp/nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag) - Uses Treesitter to auto close and auto rename HTML tags.
- [norcalli/nvim-colorizer.lua](https://github.com/norcalli/nvim-colorizer.lua) - A high-performance color highlighter.
- [akinsho/nvim-bufferline.lua](https://github.com/akinsho/nvim-bufferline.lua) - A stylish bufferline.
- [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) - Git integration for buffers.
- [dinhhuy258/git.nvim](https://github.com/dinhhuy258/git.nvim) - A simple clone of the vim-fugitive plugin.
- [folke/zen-mode.nvim](https://github.com/folke/zen-mode.nvim) - Enables distraction-free mode.
- [iamcco/markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim) - Provides live Markdown preview.
# Installation Process
## Neovim Setup

You will need [Neovim](https://neovim.io/) (version 0.8 or higher) for these configurations.
1. Install Neovim
```bash
sudo pacman -S neovim
```


### Plugin Manager: [wbthomason/packer.nvim](https://github.com/wbthomason/packer.nvim)

Install the `Packer` plugin manager for Neovim:
```bash
git clone https://aur.archlinux.org/nvim-packer-git.git
cd nvim-packer-git/
makepkg -si
```

### Fancy Shell for Linux

 Install Fish shell
```bash
sudo pacman -S fish
```

### Configuration

1. Clone this repository:
```bash
git clone https://github.com/craftzdog/dotfiles-public
```

2. Create a directory at `~/.config/nvim` and copy the `dotfiles-public/.config/nvim` directory:
```bash
mkdir ~/.config/nvim
cp -r dotfiles-public/.config/nvim/ ~/.config/nvim/
```

3. Open `plugin.lua`:
```bash
nvim ~/.config/nvim/lua/craftzdog/plugins.lua
```

4. 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:
```bash
:PackerInstall
```

### Tree-sitter for Syntax Highlighting

Install Tree-sitter for syntax highlighting:

1. Install Tree-sitter:
```bash
sudo pacman -S tree-sitter
```

2. Install Tree-sitter CLI:
```bash
sudo npm install -g tree-sitter-cli
```

### Auto Suggestion & Syntax Highlighting (VSCode-like)

Set up language servers for JavaScript or TypeScript:

1. Install the JavaScript/ TypeScript language server:
```bash
sudo npm install -g typescript-language-server typescript
```

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

2. For Tailwind CSS users, install a language server for Tailwind CSS:
```bash
sudo npm install -g @tailwindcss/language-server
```

3. To see a list of available languages for installation, use:
```bash
:TSInstallInfo
```

4. Install the required language parsers, e.g., for JavaScript, php, python, go:
```bash
:TSInstall python
```

### Finally You can launch Neovim by running:
```bash
nvim my_project # Replace "my_project" with your project name
# or
nvim . # Open Neovim in the current directory
```

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!!