diff options
| author | Philipp Heuer <10275049+PhilippHeuer@users.noreply.github.com> | 2024-03-11 06:40:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-11 13:40:24 +0800 |
| commit | d6f9403accc8bc6b9d2b5055c5c474f22d50c036 (patch) | |
| tree | 2b9e765fd8a47989de7e990b90be38d79c3d9f4b /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar.gz nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar.bz2 nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar.lz nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar.xz nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.tar.zst nvim-lspconfig-d6f9403accc8bc6b9d2b5055c5c474f22d50c036.zip | |
feat: add vacuum support (#3065)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/vacuum.lua | 28 |
1 files changed, 28 insertions, 0 deletions
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', + }, +} +``` +]], + }, +} |
