This document is a collection of user-submitted instructions for setting up a text editor for Unison development.
LSP Integration
As of UCM version M4a, the UCM supports the Language Server Protocol. Features like in-editor error reporting, show-type-on-hover, and autocompletion are implemented, with more to come! Instructions for installing the UCM with LSP supportare available here
Vim
Usingvim-plug:
- Installvim-plugif you haven't already.
- Add the following to your .vimrc:
Plug 'unisonweb/unison', { 'branch': 'trunk', 'rtp': 'editor-support/vim' }
- Issue the vim command
:PlugInstall
.
For more information run:help unison
from within vim or view theonline help doc.
NeoVim
Usinglazy.nvim:
- Installlazy.nvimif you haven't already.
- Add the following to your init.lua:
require("lazy").setup({
{
-- Unison
"unisonweb/unison",
branch = "trunk",
config = function(plugin)
vim.opt.rtp:append(plugin.dir .. "/editor-support/vim")
require("lazy.core.loader").packadd(plugin.dir .. "/editor-support/vim")
end,
init = function(plugin)
require("lazy.core.loader").ftdetect(plugin.dir .. "/editor-support/vim")
end,
}
})
- Issue the vim command
:Lazy
.
Optionally you cansetup an LSP Server.
Atom
From the console, run:
apm install unisonweb/atom-unison
VS Code
- Install theUnison extension for VS Code
Emacs
Installunison-mode.