Skip to content

xvrlang/xvr.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xvr.nvim

Neovim tree-sitter based syntax highlighting and filetype support for the XVR programming language.

Features

  • Tree-sitter based syntax highlighting for XVR
  • Filetype detection (.xvr files)
  • Code folding support
  • Syntax-based textobjects

Installation

Using :TSInstall (Recommended)

First, install the plugin via your plugin manager, then run:

:TSInstall xvr

Using lazy.nvim

{
  'xvrlang/xvr.nvim',
  lazy = true,
}

Requirements

The plugin will automatically install the XVR tree-sitter parser.

Quick Setup

Ensure you have nvim-treesitter installed and configured:

-- In your plugins/init.lua
{
  "nvim-treesitter/nvim-treesitter",
  opts = {
    ensure_installed = { "xvr" },
    highlight = { enable = true },
  },
}

The plugin handles the rest automatically.

Manual Parser Installation

If you need to install manually:

# In the xvr.nvim plugin directory
npm install -g tree-sitter-cli
tree-sitter generate
cc -shared -o xvr.so -fPIC -Os -I./src src/parser.c
mkdir -p parser && mv xvr.so parser/

Supported Syntax

  • Keywords: var, proc, if, else, while, for, return, break, continue, include, astype, type
  • Types: int, float, string, bool, void, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64
  • Boolean: true, false, null
  • Operators: +, -, *, /, %, ==, !=, <, >, <=, >=, &&, ||, !, ++, --
  • Strings: Double quotes with {} interpolation
  • Comments: // (line)

License

MIT

About

syntax highlighting for xvr on neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors