Working with Hoon can be a bit ass, To start your environment use the following commands.
npm install -g hoon-language-server
./urbit -F zod
|mount %base
|start %language-server
Everyone’s editor is a bit different but here is the vim config I use.
call plug#begin('~/.vim/plugged')
Plug 'urbit/hoon.vim'
call plug#end()
if executable('hoon-language-server')
au User lsp_setup call lsp#register_server({
\ 'name': 'hoon-language-server',
\ 'cmd': ['hoon-language-server'],
\ 'whitelist': ['hoon'],
\ })
endif
You can begin to edit files once you’ve mounted the %base
desk.
cd ./zod/base/gen
vim example.hoon
An example basic script looks like the following.
|= a=@ud
%- add [a 5]
Once saved you can load it in zod
and use it.
|commit %base
+example 5