Hoon.vim
No description available
Install / Use
/learn @urbit/Hoon.vimREADME
Install with your favorite package manager. For
Plug, between plug#begin and
plug#end in your .vimrc put:
Plug 'urbit/hoon.vim'
This will give you syntax highlighting and some useful keybindings, the
most useful of which is g/ (search for arm name).
For autocomplete, syntax checking, and rune snippets, you should connect to the Hoon Language Server. Install it with:
npm install -g @urbit/hoon-language-server
Install and build Urbit. Then, start a fake ~zod with:
urbit -lF zod -c zod
And start the language server at the Urbit Dojo prompt with:
|start %language-server
Then, you can connect to this language server with any vim LSP plugin. Here's one full-featured configuration, using UltiSnips for snippets, asyncomplete.vim for autocomplete and vim-lsp to connect to the language server.
call plug#begin('~/.vim/plugged')
Plug 'SirVer/ultisnips'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'thomasfaingnaert/vim-lsp-snippets'
Plug 'thomasfaingnaert/vim-lsp-ultisnips'
Plug 'urbit/hoon.vim'
call plug#end()
let g:UltiSnipsExpandTrigger="<TAB>"
let g:UltiSnipsJumpForwardTrigger="<TAB>"
let g:UltiSnipsJumpBackwardTrigger="<S-TAB>"
let g:asyncomplete_auto_completeopt = 0
set completeopt=menuone,noinsert
if executable('hoon-language-server')
au User lsp_setup call lsp#register_server({
\ 'name': 'hoon-language-server',
\ 'cmd': ['hoon-language-server'],
\ 'whitelist': ['hoon'],
\ })
endif
If this isn't working, check :LspStatus to see if the language server
started correctly.
This requires python support, and I've only tested it in neovim after
running pip3 install -U neovim. If you're willing to give up rune
snippets, you can get the other features in vanilla vim with this
simpler configuration:
call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'urbit/hoon.vim'
call plug#end()
let g:asyncomplete_auto_completeopt = 0
set completeopt=menuone,noinsert
if executable('hoon-language-server')
au User lsp_setup call lsp#register_server({
\ 'name': 'hoon-language-server',
\ 'cmd': ['hoon-language-server'],
\ 'whitelist': ['hoon'],
\ })
endif
Various other combinations of plugins are possible, to taste.
For using this language server with Neovim refer to the configuration provided by nvim-lspconfig.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
