mirror of
https://github.com/neovim/nvim-lspconfig.git
synced 2025-12-24 15:01:00 +01:00
17 lines
424 B
Lua
17 lines
424 B
Lua
---@brief
|
|
---
|
|
--- https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown
|
|
|
|
local util = require 'lspconfig.util'
|
|
|
|
---@type vim.lsp.Config
|
|
return {
|
|
cmd = { 'nc', 'localhost', os.getenv 'UNISON_LSP_PORT' or '5757' },
|
|
filetypes = { 'unison' },
|
|
root_dir = function(bufnr, on_dir)
|
|
local fname = vim.api.nvim_buf_get_name(bufnr)
|
|
on_dir(util.root_pattern('*.u')(fname))
|
|
end,
|
|
settings = {},
|
|
}
|