Rok language support for Vim and Neovim: syntax highlighting and filetype
settings for .rok and .rokon, plus (on Neovim) the rok language server
rokls wired up through the built-in LSP client.
Point your plugin manager at this repository:
" vim-plug
Plug 'rok-lang/rok.vim'-- lazy.nvim
{ "rok-lang/rok.vim" }Or add it to your runtimepath directly:
set runtimepath^=/path/to/rok.vimInstall the toolchain so rokls is on your PATH
(https://rok-lang.org/download.html); plugin/rok.lua then starts the
server for every rok buffer automatically.
vim.g.rok_lsp = 0 -- turn the server off (highlighting stays)
vim.g.rok_server = "/path/rokls" -- override the command (string or table)rokls speaks LSP over stdin/stdout, so point any client at it:
" vim-lsp
if executable('rokls')
au User lsp_setup call lsp#register_server({
\ 'name': 'rokls', 'cmd': {->['rokls']}, 'allowlist': ['rok'] })
endifLicensed under either of MIT or Apache-2.0, at your option.