This is a Neovim configuration for a beginner who wants to set up a robust development environment with essential plugins, including telescope.nvim with the fzf-native extension for faster searching.
Ensure you have Neovim installed. If not, you can install it via your package manager:
For Arch Linux:
sudo pacman -S neovim-
ripgrep: Used by
telescopefor searching files efficiently.sudo pacman -S ripgrep
-
fzf: Required for the
telescope-fzf-native.nvimextension.sudo pacman -S fzf
We'll be using lazy.nvim to manage plugins. If you don't have it installed yet, follow these steps:
Clone lazy.nvim to your local Neovim configuration directory:
git clone --filter=blob:none https://github.com/folke/lazy.nvim.git ~/.local/share/nvim/lazy/lazy.nvimRun :Lazy install to Install the Plugins:
In Neovim, run the following to install the plugins:
:Lazy installIf you encounter errors, follow these steps:
-
Solution: Install
nvim-treesitter:In your
plugins.lua, add:{ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate", }Then run:
:Lazy syncAfter installation, you can set up Treesitter for code highlighting and more.
-
Solution: Build the
fzf-nativeextension manually if it wasn't built correctly.-
Go to the plugin directory:
cd ~/.local/share/nvim/lazy/telescope-fzf-native.nvim
-
Run the following to build the extension:
make
-
After that, reload Neovim and check again.
-
Once everything is set up, you can use Telescope with keybindings. For example, you can bind Telescope commands to your preferred keys:
-- Example keybindings for Telescope
vim.api.nvim_set_keymap('n', '<leader>ff', ':Telescope find_files<CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<leader>fg', ':Telescope live_grep<CR>', { noremap = true })-
Sync and Update Plugins:
After everything is set up, make sure all your plugins are synced and updated:
:Lazy sync -
Restart Neovim:
After the plugins are installed and the setup is complete, restart Neovim to make sure everything is loaded properly.
-
Check Health:
If you want to check for any issues with your Neovim setup, you can use:
:checkhealth