From 436aad992dd5d8e47c711ab758d5d2ff49479e3e Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Tue, 10 Sep 2024 08:31:00 -0500 Subject: [PATCH] feat(ziggy): add ziggy and ziggy_schema support (#3296) Add support for the Ziggy data serialization format language server. The server supports both the ziggy file format and the schema format --- lua/lspconfig/server_configurations/ziggy.lua | 21 +++++++++++++++++++ .../server_configurations/ziggy_schema.lua | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 lua/lspconfig/server_configurations/ziggy.lua create mode 100644 lua/lspconfig/server_configurations/ziggy_schema.lua diff --git a/lua/lspconfig/server_configurations/ziggy.lua b/lua/lspconfig/server_configurations/ziggy.lua new file mode 100644 index 0000000000..4ca58fb346 --- /dev/null +++ b/lua/lspconfig/server_configurations/ziggy.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ziggy', 'lsp' }, + filetypes = { 'ziggy' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for the Ziggy data serialization format + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/lua/lspconfig/server_configurations/ziggy_schema.lua b/lua/lspconfig/server_configurations/ziggy_schema.lua new file mode 100644 index 0000000000..2bd01cc8ff --- /dev/null +++ b/lua/lspconfig/server_configurations/ziggy_schema.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ziggy', 'lsp', '--schema' }, + filetypes = { 'ziggy_schema' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for schema files of the Ziggy data serialization format + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +}