nvim lsp for patch rexx
- Vim Script 81.1%
- Lua 18.9%
┌───────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐ │ File │ Purpose │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ ftdetect/rexx.lua │ Registers .rexx and .rex extensions as rexx filetype │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ ftplugin/rexx.lua │ Sets comment string to /* %s */ │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ syntax/rexx.vim │ Syntax highlighting — keywords, BIFs, labels, strings, comments, operators, special variables │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ indent/rexx.vim │ Smart indentation for DO/END, IF/THEN/ELSE, SELECT/WHEN/OTHERWISE, labels │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ lua/rexx-lsp/init.lua │ LSP client that auto-starts rexx-lsp on REXX files │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ README.md │ Documentation with lazy.nvim install instructions │ ├───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ LICENSE │ MIT │ └───────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘ Key differences from patch-seq.nvim adapted for REXX: - Two extensions: .rexx and .rex - Case-insensitive syntax (syn case ignore) since REXX keywords are case-insensitive - Block comments: /* ... */ instead of # - 53 BIFs organized by category (string, word, numeric, conversion, etc.) - REXX-specific indent rules: DO/END blocks, SELECT/WHEN/OTHERWISE, label blocks - LSP features match what rexx-lsp provides: diagnostics, completion, hover, go-to-definition, symbols, code actions, inlay hints You'll want to git init it and push to GitHub to use it with lazy.nvim. |
||
|---|---|---|
| ftdetect | ||
| ftplugin | ||
| indent | ||
| lua/rexx-lsp | ||
| syntax | ||
| LICENSE | ||
| README.md | ||
patch-rexx.nvim
Neovim support for the REXX programming language.
Features
- Syntax highlighting - Keywords, built-in functions, strings, comments, labels
- Auto-indentation - Smart indentation for DO/END, IF/THEN/ELSE, SELECT/WHEN
- LSP integration - Real-time diagnostics (parse errors, undefined labels)
- Completions - Keywords, built-in functions, labels, variables
- Hover - Documentation for keywords and BIFs
- Go to definition - Jump to labels and subroutines
- Breadcrumbs - Document symbols showing subroutines in your statusline
- Code actions - Suggestions for misspelled function and label names
- Inlay hints - PARSE variable hints and NUMERIC DIGITS precision (opt-in)
Requirements
- Neovim 0.10+ (for
vim.lsp.startandvim.filetype.add) rexx-lspbinary in your PATH
Installing rexx-lsp
Build from source:
git clone https://github.com/navicore/patch-rexx
cd patch-rexx
cargo install --path . --features lsp
Installation
Using lazy.nvim
{
"navicore/patch-rexx.nvim",
ft = "rexx",
opts = {},
}
With custom configuration
{
"navicore/patch-rexx.nvim",
ft = "rexx",
opts = {
-- Enable inlay hints (off by default)
inlay_hints = true,
-- Custom path to rexx-lsp binary (optional)
cmd = { "/path/to/rexx-lsp" },
-- LSP capabilities (optional, for completion plugins)
capabilities = require("cmp_nvim_lsp").default_capabilities(),
-- on_attach callback (optional)
on_attach = function(client, bufnr)
-- Your keymaps here
end,
},
}
Manual setup
If you prefer manual configuration:
require("rexx-lsp").setup({})
Usage
Once installed, open any .rexx or .rex file and the LSP will start automatically. Diagnostics appear inline as you type.
License
MIT