Skip to content
rok-langPublic

About

Vim and Neovim support for rok

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Rok for Vim and Neovim

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.

Install

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.vim

Language server (Neovim)

Install 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)

Classic Vim, coc.nvim, vim-lsp

rokls speaks LSP over stdin/stdout, so point any client at it:

// coc-settings.json
{ "languageserver": { "rok": { "command": "rokls", "filetypes": ["rok"] } } }
" vim-lsp
if executable('rokls')
  au User lsp_setup call lsp#register_server({
    \ 'name': 'rokls', 'cmd': {->['rokls']}, 'allowlist': ['rok'] })
endif

License

Licensed under either of MIT or Apache-2.0, at your option.

About

Vim and Neovim support for rok

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages