From d6f9403accc8bc6b9d2b5055c5c474f22d50c036 Mon Sep 17 00:00:00 2001 From: Philipp Heuer <10275049+PhilippHeuer@users.noreply.github.com> Date: Mon, 11 Mar 2024 06:40:24 +0100 Subject: feat: add vacuum support (#3065) --- lua/lspconfig/server_configurations/vacuum.lua | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lua/lspconfig/server_configurations/vacuum.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/vacuum.lua b/lua/lspconfig/server_configurations/vacuum.lua new file mode 100644 index 00000000..d0a6afcd --- /dev/null +++ b/lua/lspconfig/server_configurations/vacuum.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vacuum', 'language-server' }, + filetypes = { 'yaml.openapi', 'json.openapi' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +Vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. + +You can install vacuum using mason or follow the instructions here: https://github.com/daveshanley/vacuum + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['openapi.*%.ya?ml'] = 'yaml.openapi', + ['openapi.*%.json'] = 'json.openapi', + }, +} +``` +]], + }, +} -- cgit v1.2.3-70-g09d2