Skip to content

hyprland-community/hyprls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyprLS

A LSP server for Hyprland configuration files.

Features

Not checked means planned / work in progress.

  • Auto-complete
  • Hover
    • TODO: Documentation on hover of categories?
  • Go to definition
  • Color pickers
  • Document symbols
  • Diagnostics
  • Formatting
  • Semantic highlighting

Installation

Linux packages

hyprls has packages for various distributions, kindly maintained by other people

Packaging status

With go install

go install github.com/hyprland-community/hyprls/cmd/hyprls@latest

Pre-built binaries

Binaries for linux are available in Releases

From source

  • Required: Just (paru -S just on Arch Linux (btw))
git clone --recurse-submodules https://github.com/hyprland-community/hyprls
cd hyprls
# installs the binary to ~/.local/bin.
# Make sure that directory exists and is in your PATH
just install

Usage

With Neovim

Combine with The tree-sitter grammar for Hyprlang for syntax highlighting.

Add this to your init.lua:

-- Hyprlang LSP
vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
		pattern = {"*.hl", "hypr*.conf"},
		callback = function(event)
				print(string.format("starting hyprls for %s", vim.inspect(event)))
				vim.lsp.start {
						name = "hyprlang",
						cmd = {"hyprls"},
						root_dir = vim.fn.getcwd(),
				}
		end
})

With Emacs

Language server support is provided by the lsp-bridge.

Just install lsp-bridge in Emacs, that's all, no need to do any configuration.

VSCode

Official Marketplace (VisualStudio Marketplace)

Install it from the marketplace.

Tip

You can use the Hyprland extension pack to also get syntax highlighting.

Open VSX (for VSCodium & others)

Install it on OpenVSX

Zed

Language server support is provided by the Hyprlang extension. Detailed installation and setup instructions can be found in the extension repository [maintainer = @WhySoBad].