From a14a65d7574fe139ab954e704a5e866a4f0d1c69 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Tue, 14 Jan 2025 13:47:48 +0100 Subject: [PATCH] feat: add alloy language server (#3560) --- lua/lspconfig/configs/alloy_ls.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lua/lspconfig/configs/alloy_ls.lua diff --git a/lua/lspconfig/configs/alloy_ls.lua b/lua/lspconfig/configs/alloy_ls.lua new file mode 100644 index 0000000000..4a9a06e29a --- /dev/null +++ b/lua/lspconfig/configs/alloy_ls.lua @@ -0,0 +1,17 @@ +return { + default_config = { + cmd = { 'alloy', 'lsp' }, + filetypes = { 'alloy' }, + root_dir = function(fname) + return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/AlloyTools/org.alloytools.alloy + +Alloy is a formal specification language for describing structures and a tool for exploring them. +]], + }, +}