Installation notes for a Hyprland setup on Arch Linux with a dotfiles collection managed by GNU Stow. The Neovim configuration is located at ~/dotfiles/nvim/.config/nvim and is usually stowed to ~/.config/nvim.
| Component | Package/action | Purpose |
|---|---|---|
| Avante.nvim | Add ColinKennedy/mega.cmdparse and ColinKennedy/mega.logging as plugin dependencies |
Fixes module mega.cmdparse not found |
nvim-treesitter (branch main) |
tree-sitter-cli, base-devel, tar, and curl; then update/install parsers |
Fixes tree-sitter ENOENT and provides the CLI and C compiler |
Mason / ruby_lsp |
ruby and, for native extensions, base-devel; add the RubyGems binary path to PATH |
Enables installing and running ruby_lsp through Mason |
Add the two Mega modules to the Avante plugin spec. First, find the relevant file in the active configuration:
grep -rn avante ~/.config/nvimAdd the following entries under dependencies in the Avante spec (for example, in a lazy.nvim plugin spec):
{
"yetone/avante.nvim",
dependencies = {
"ColinKennedy/mega.cmdparse",
"ColinKennedy/mega.logging",
},
}If the spec already has a dependencies list, add only the two entries there; keep any existing dependencies. With a Stow configuration, edit the source file in ~/dotfiles/nvim/.config/nvim. The path ~/.config/nvim points to the stowed configuration.
Parser processing requires the Tree-sitter CLI, a C compiler, and the necessary archive/download tools:
sudo pacman -S tree-sitter-cli
sudo pacman -S --needed base-devel
sudo pacman -S --needed tar curlAmong other things, base-devel provides the tools needed for compilation. Check that the CLI is available in the shell:
tree-sitter --versionStart Neovim from a shell with the correct PATH. Then, in Neovim, install the required parser or update the parsers, and run the diagnostic:
:TSInstall scss
:TSUpdate
:checkhealth nvim-treesitterRun :TSInstall scss if the SCSS parser is needed; :TSUpdate updates the configured parsers. If you do not want to install the CLI via pacman, Mason (:MasonInstall tree-sitter-cli) or a Cargo installation are alternatives.
Install Ruby. For native Ruby extensions, also provide the build tools:
sudo pacman -S ruby
sudo pacman -S --needed base-develAdd the user-specific RubyGems path to the shell environment. Add both lines to ~/.zshrc (Zsh) or ~/.bashrc (Bash):
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"Then reload the shell configuration or start a new terminal. Update the Mason package information in Neovim and, if the installation fails again, check the installation log:
:MasonUpdate
:MasonLogIf ruby_lsp is not needed, it can be removed from ensure_installed. Alternatively, its automatic activation can be excluded in mason-lspconfig:
require("mason-lspconfig").setup({
automatic_enable = {
exclude = { "ruby_lsp" },
},
})Install the required Arch packages together:
sudo pacman -S --needed tree-sitter-cli base-devel ruby
sudo pacman -S --needed tar curlThese two commands cover the Tree-sitter CLI, build tools, Ruby, and archive and download tools. Then configure GEM_HOME and PATH for RubyGems as described above.
-
grep -rn avante ~/.config/nvimfinds the Avante plugin spec;mega.cmdparseandmega.loggingare listed in itsdependencies. -
tree-sitter --versionprints version information. - Neovim is launched from a shell where
tree-sitteris inPATH. - The required parser can be installed with
:TSInstall scssor updated with:TSUpdate. -
:checkhealth nvim-treesitterreports no missing prerequisites for the configuration in use. -
ruby --versionworks;GEM_HOME/binis included inPATH. -
:MasonUpdatecompletes; if installation fails,:MasonLogprovides diagnostic context forruby_lsp. - If
ruby_lspshould not be installed, it has been removed fromensure_installedor listed inautomatic_enable.exclude.