aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMatthias Schaub <83658582+matthiasschaub@users.noreply.github.com>2022-03-21 21:16:53 +0100
committerGitHub <noreply@github.com>2022-03-21 13:16:53 -0700
commitb3564c95b4e431219cd382c509c4c5e8f1ccf48e (patch)
tree7f5c379c2ffd0ea7b430980fc7e92cd7b7db9adf /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar.gz
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar.bz2
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar.lz
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar.xz
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.tar.zst
nvim-lspconfig-b3564c95b4e431219cd382c509c4c5e8f1ccf48e.zip
feat: add hoon-language-server support (#1802)
Co-authored-by: Matthias Schaub <matthias.schaub@posteo.de>
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/hoon_ls.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/hoon_ls.lua b/lua/lspconfig/server_configurations/hoon_ls.lua
new file mode 100644
index 00000000..d947ea76
--- /dev/null
+++ b/lua/lspconfig/server_configurations/hoon_ls.lua
@@ -0,0 +1,37 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'hoon-language-server'
+local cmd = { bin_name, '-p', '8080' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '-p', '8080' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'hoon' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/urbit/hoon-language-server
+
+A language server for Hoon.
+
+The language server can be installed via `npm install -g 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`
+
+If your ship does not run on port 8080 change the `cmd` setting:
+
+```lua
+require'lspconfig'.elixirls.setup{
+ cmd = { 'hoon-language-server', '-p', '80' }
+}
+```
+]],
+ },
+}