⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣰⠤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠙⠺⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣼⠻⡄⠀⠀⠀⠀⠀⠀⠀⢐⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠚⠻⢧⣠⡼⠛⠂⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠘⡿⠀⠀⠀⠀⠀⠀⠀⠀⣾⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠟⠀⠀⠀⠀⠀⠀⠀⢀⡟⢽⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠁⠀⠻⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠉⠛⠛⠷⢦⣄⠀⠀⢀⣤⠟⠛⠛⠙⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣧⢠⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⡗⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠇⠀⠀⠀⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡧⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⡏⣄⣀⡀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠁⣷⠉⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡯⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⡀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠀⠀⠀⠀⠀⠀⠹⠶⠗
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡿⡆⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠗⠿⣥⣀⣼⠷⠒⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢺⠀⠀⠀⠀⠀⠀⠀⠀⠀

neovim

you need revo somewhere in your path
if you don’t want to do so, just change the cmd field to wherever it is

just add this to your config. it uses romus204/tree-sitter-manager.nvim, which may bring some side-effects about - if you don’t like that, do it manually (see bottom of code block)

-- [revo] ------------
do
	vim.filetype.add({
		extension = {
			rv = "revo",
			revo = "revo",
		},
	})

	vim.pack.add({
		{ src = "https://github.com/romus204/tree-sitter-manager.nvim" },
	})
	vim.treesitter.language.register("revo", "revo")
	require("tree-sitter-manager").setup({
		parser_dir = vim.fn.stdpath("data") .. "/site/parser",
		query_dir = vim.fn.stdpath("data") .. "/site/queries",
		auto_install = true,
		highlight = true,
		languages = {
			revo = {
				install_info = {
					url = "https://codeberg.org/doomy/tree-sitter-revo",
					queries = "queries/",
				},
			},
		},
		nerdfont = true,
		border = "rounded",
		min_width = 78,
		min_height = 40,
	})

	-- lsp
	vim.lsp.config("revo", {
		cmd = { "revo", "lsp" },
		filetypes = { "revo" },
		root_markers = { "lib.json", "exe.json", ".git" },
	})
	vim.lsp.enable("revo")
end
--[[
vim.treesitter.language.register("revo", { "revo" })

vim.api.nvim_create_autocmd("User", {
    pattern = "TSUpdate",
    callback = function() 
        require("nvim-treesitter.parsers").revo = {
            install_info = {
                path = "~/tree-sitter-revo", -- or whatever your path is
                queries = "queries",
            }
        }
    end
})
]]--

to check the status for all lsps, do :checkhealth vim.lsp

if it dies on you, do lsp restart revo or lsp enable revo

if you encounter a bug, especially if it’s a crash, add this to your config:

vim.lsp.log.set_level 'trace'

then open the logs via

:lua vim.cmd('tabnew ' .. vim.lsp.log.get_filename())

helix

you have to do it manually for highlighting to work

DIR=~/git # where you'd like to download it
git clone https://codeberg.org/doomy/tree-sitter-revo $DIR/tree-sitter-revo
mkdir -p ~/.config/helix/runtime/queries
ln -sf "$DIR/tree-sitter-revo/queries" ~/.config/helix/runtime/queries/revo

then put this in your languages.toml:

[[language]]
name = "revo"
scope = "source.revo"
file-types = ["rv"]
comment-tokens = "#"
indent = { tab-width = 2, unit = "  " }
language-servers = [ "revo" ]
grammar = "revo"

[[grammar]]
name = "revo"
source = { path = "/absolute/path/to/tree-sitter-revo", rev = "main" }

[language-server.revo]
command = "revo"
args = ["lsp"]

then fetch and build the grammar:

hx --grammar fetch
hx --grammar build

make sure revo is in your path, then open any .rv file
you can verify everything loaded with :health while a revo file is open

emacs

a literate config/plugin with full setup instructions exists in the repo’s extra/ directory, named Emacs.org

it covers both eglot and lsp-mode, plus font-lock highlighting

vscode

it is not available on the marketplace, so you need to get a version from the releases section

install from terminal

code --install-extension ~/Downloads/revo-lsp-<the version you've dowloaded>.vsix

install from gui

if it doesn’t work

revolt, the revo language server

the server builds on the great work done by the zls team, being lsp-kit
it’s bundled into the revo binary! start it with revo lsp

all lsp-specific information lives here here

references