From 976aa4fbee8a070f362cab6f6ec84e9251a90cf9 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 8 Jul 2022 18:34:38 +0200 Subject: refactor: add mason-schemas and mason-core modules (#29) * refactor: add mason-schemas and move generated filetype map to mason-lspconfig * refactor: add mason-core module --- lua/mason-core/EventEmitter.lua | 64 +++ lua/mason-core/async/control.lua | 75 +++ lua/mason-core/async/init.lua | 245 ++++++++++ lua/mason-core/async/uv.lua | 49 ++ lua/mason-core/clients/eclipse.lua | 15 + lua/mason-core/fetch.lua | 124 +++++ lua/mason-core/fs.lua | 152 ++++++ lua/mason-core/functional/data.lua | 30 ++ lua/mason-core/functional/function.lua | 89 ++++ lua/mason-core/functional/init.lua | 112 +++++ lua/mason-core/functional/list.lua | 175 +++++++ lua/mason-core/functional/logic.lua | 63 +++ lua/mason-core/functional/number.lua | 34 ++ lua/mason-core/functional/relation.lua | 17 + lua/mason-core/functional/string.lua | 74 +++ lua/mason-core/functional/table.lua | 45 ++ lua/mason-core/functional/type.lua | 14 + lua/mason-core/health/init.lua | 298 ++++++++++++ lua/mason-core/installer/context.lua | 278 +++++++++++ lua/mason-core/installer/handle.lua | 214 +++++++++ lua/mason-core/installer/init.lua | 176 +++++++ lua/mason-core/installer/linker.lua | 84 ++++ lua/mason-core/log.lua | 174 +++++++ lua/mason-core/managers/cargo/client.lua | 14 + lua/mason-core/managers/cargo/init.lua | 140 ++++++ lua/mason-core/managers/composer/init.lua | 135 ++++++ lua/mason-core/managers/dotnet/init.lua | 64 +++ lua/mason-core/managers/gem/init.lua | 159 +++++++ lua/mason-core/managers/git/init.lua | 76 +++ lua/mason-core/managers/github/client.lua | 117 +++++ lua/mason-core/managers/github/init.lua | 171 +++++++ lua/mason-core/managers/go/init.lua | 171 +++++++ lua/mason-core/managers/luarocks/init.lua | 144 ++++++ lua/mason-core/managers/npm/init.lua | 143 ++++++ lua/mason-core/managers/opam/init.lua | 69 +++ lua/mason-core/managers/pip3/init.lua | 175 +++++++ lua/mason-core/managers/powershell/init.lua | 46 ++ lua/mason-core/managers/std/init.lua | 188 ++++++++ lua/mason-core/notify.lua | 13 + lua/mason-core/optional.lua | 100 ++++ lua/mason-core/package/init.lua | 205 +++++++++ lua/mason-core/package/version-check.lua | 91 ++++ lua/mason-core/path.lua | 51 +++ lua/mason-core/platform.lua | 159 +++++++ lua/mason-core/process.lua | 213 +++++++++ lua/mason-core/receipt.lua | 180 ++++++++ lua/mason-core/result.lua | 152 ++++++ lua/mason-core/spawn.lua | 112 +++++ lua/mason-core/ui/display.lua | 507 +++++++++++++++++++++ lua/mason-core/ui/init.lua | 203 +++++++++ lua/mason-core/ui/state.lua | 24 + lua/mason-lspconfig/init.lua | 12 +- lua/mason-lspconfig/mappings/filetype.lua | 162 +++++++ lua/mason-lspconfig/mappings/server.lua | 130 ++++++ lua/mason-lspconfig/server-mapping.lua | 130 ------ .../server_configurations/angularls/init.lua | 8 +- .../server_configurations/apex_ls/init.lua | 2 +- .../server_configurations/bicep/init.lua | 2 +- .../server_configurations/bsl_ls/init.lua | 2 +- .../server_configurations/elixirls/init.lua | 4 +- .../server_configurations/groovyls/init.lua | 2 +- .../haxe_language_server/init.lua | 2 +- .../server_configurations/jdtls/init.lua | 6 +- .../server_configurations/julials/init.lua | 8 +- .../server_configurations/omnisharp/init.lua | 2 +- .../server_configurations/perlnavigator/init.lua | 2 +- .../server_configurations/pylsp/init.lua | 12 +- .../r_language_server/init.lua | 2 +- .../server_configurations/rescriptls/init.lua | 2 +- .../server_configurations/solang/init.lua | 4 +- .../server_configurations/visualforce_ls/init.lua | 2 +- .../server_configurations/volar/init.lua | 6 +- .../angular-language-server/init.lua | 4 +- .../ansible-language-server/init.lua | 4 +- lua/mason-registry/apex-language-server/init.lua | 12 +- .../arduino-language-server/init.lua | 8 +- lua/mason-registry/asm-lsp/init.lua | 4 +- lua/mason-registry/astro-language-server/init.lua | 4 +- lua/mason-registry/awk-language-server/init.lua | 4 +- lua/mason-registry/bash-language-server/init.lua | 4 +- .../beancount-language-server/init.lua | 4 +- lua/mason-registry/bicep-lsp/init.lua | 8 +- lua/mason-registry/bsl-language-server/init.lua | 4 +- lua/mason-registry/ccls/common.lua | 12 +- lua/mason-registry/ccls/init.lua | 4 +- lua/mason-registry/ccls/linux.lua | 14 +- lua/mason-registry/ccls/mac.lua | 8 +- lua/mason-registry/chrome-debug-adapter/init.lua | 12 +- lua/mason-registry/clangd/init.lua | 10 +- lua/mason-registry/clarity-lsp/init.lua | 8 +- lua/mason-registry/clojure-lsp/init.lua | 10 +- lua/mason-registry/cmake-language-server/init.lua | 4 +- lua/mason-registry/codelldb/init.lua | 10 +- lua/mason-registry/codeql/init.lua | 10 +- lua/mason-registry/cpptools/init.lua | 12 +- lua/mason-registry/crystalline/init.lua | 10 +- lua/mason-registry/csharp-language-server/init.lua | 4 +- lua/mason-registry/css-lsp/init.lua | 4 +- .../cssmodules-language-server/init.lua | 4 +- .../cucumber-language-server/init.lua | 4 +- lua/mason-registry/debugpy/init.lua | 4 +- lua/mason-registry/delve/init.lua | 4 +- lua/mason-registry/deno/init.lua | 8 +- lua/mason-registry/dhall-lsp/init.lua | 14 +- .../diagnostic-languageserver/init.lua | 4 +- .../dockerfile-language-server/init.lua | 4 +- lua/mason-registry/dot-language-server/init.lua | 4 +- lua/mason-registry/efm/init.lua | 4 +- lua/mason-registry/elixir-ls/init.lua | 8 +- lua/mason-registry/elm-format/init.lua | 4 +- lua/mason-registry/elm-language-server/init.lua | 4 +- lua/mason-registry/ember-language-server/init.lua | 4 +- lua/mason-registry/emmet-ls/init.lua | 4 +- lua/mason-registry/erlang-ls/init.lua | 14 +- lua/mason-registry/esbonio/init.lua | 4 +- lua/mason-registry/eslint-lsp/init.lua | 4 +- lua/mason-registry/firefox-debug-adapter/init.lua | 12 +- lua/mason-registry/flux-lsp/init.lua | 4 +- lua/mason-registry/foam-language-server/init.lua | 4 +- lua/mason-registry/fortls/init.lua | 4 +- lua/mason-registry/fsautocomplete/init.lua | 4 +- lua/mason-registry/go-debug-adapter/init.lua | 9 +- .../golangci-lint-langserver/init.lua | 4 +- lua/mason-registry/golangci-lint/init.lua | 4 +- lua/mason-registry/gomodifytags/init.lua | 4 +- lua/mason-registry/gopls/init.lua | 4 +- lua/mason-registry/gotests/init.lua | 4 +- .../grammarly-languageserver/init.lua | 4 +- .../graphql-language-service-cli/init.lua | 4 +- lua/mason-registry/groovy-language-server/init.lua | 6 +- .../haskell-language-server/init.lua | 14 +- lua/mason-registry/haxe-language-server/init.lua | 10 +- lua/mason-registry/hoon-language-server/init.lua | 4 +- lua/mason-registry/html-lsp/init.lua | 4 +- lua/mason-registry/impl/init.lua | 4 +- lua/mason-registry/init.lua | 12 +- lua/mason-registry/intelephense/init.lua | 4 +- lua/mason-registry/jdtls/init.lua | 11 +- lua/mason-registry/jedi-language-server/init.lua | 4 +- lua/mason-registry/json-lsp/init.lua | 4 +- .../jsonnet-language-server/init.lua | 4 +- lua/mason-registry/julia-lsp/init.lua | 8 +- lua/mason-registry/kotlin-language-server/init.lua | 8 +- lua/mason-registry/ktlint/init.lua | 10 +- lua/mason-registry/lelwel/init.lua | 4 +- lua/mason-registry/lemminx/init.lua | 8 +- lua/mason-registry/lemmy-help/init.lua | 4 +- lua/mason-registry/ltex-ls/init.lua | 14 +- lua/mason-registry/lua-language-server/init.lua | 10 +- lua/mason-registry/marksman/init.lua | 10 +- lua/mason-registry/metamath-zero-lsp/init.lua | 8 +- lua/mason-registry/mockdebug/init.lua | 10 +- lua/mason-registry/netcoredbg/init.lua | 10 +- lua/mason-registry/nickel-lang-lsp/init.lua | 6 +- lua/mason-registry/nimlsp/init.lua | 10 +- lua/mason-registry/node-debug2-adapter/init.lua | 12 +- lua/mason-registry/ocaml-lsp/init.lua | 4 +- lua/mason-registry/omnisharp-roslyn/init.lua | 9 +- lua/mason-registry/opencl-language-server/init.lua | 8 +- lua/mason-registry/perlnavigator/init.lua | 4 +- lua/mason-registry/php-debug-adapter/init.lua | 8 +- lua/mason-registry/phpactor/init.lua | 14 +- .../powershell-editor-services/init.lua | 6 +- lua/mason-registry/prisma-language-server/init.lua | 4 +- lua/mason-registry/prosemd-lsp/init.lua | 10 +- lua/mason-registry/psalm/init.lua | 4 +- lua/mason-registry/puppet-editor-services/init.lua | 6 +- .../purescript-language-server/init.lua | 4 +- lua/mason-registry/pyright/init.lua | 4 +- lua/mason-registry/python-lsp-server/init.lua | 4 +- lua/mason-registry/quick-lint-js/init.lua | 12 +- lua/mason-registry/r-languageserver/init.lua | 2 +- lua/mason-registry/reason-language-server/init.lua | 10 +- lua/mason-registry/remark-language-server/init.lua | 4 +- lua/mason-registry/rescript-lsp/init.lua | 4 +- lua/mason-registry/rnix-lsp/init.lua | 4 +- lua/mason-registry/robotframework-lsp/init.lua | 4 +- lua/mason-registry/rome/init.lua | 6 +- lua/mason-registry/rust-analyzer/init.lua | 10 +- lua/mason-registry/salt-lsp/init.lua | 4 +- lua/mason-registry/serve-d/init.lua | 8 +- lua/mason-registry/shellcheck/init.lua | 8 +- lua/mason-registry/shopify-theme-check/init.lua | 4 +- lua/mason-registry/slint-lsp/init.lua | 8 +- lua/mason-registry/solang/init.lua | 12 +- lua/mason-registry/solargraph/init.lua | 4 +- lua/mason-registry/solidity/init.lua | 10 +- lua/mason-registry/sorbet/init.lua | 4 +- lua/mason-registry/sourcery/init.lua | 4 +- lua/mason-registry/sqlls/init.lua | 4 +- lua/mason-registry/sqls/init.lua | 4 +- lua/mason-registry/stylelint-lsp/init.lua | 4 +- lua/mason-registry/stylua/init.lua | 4 +- lua/mason-registry/svelte-language-server/init.lua | 4 +- lua/mason-registry/svlangserver/init.lua | 4 +- lua/mason-registry/svls/init.lua | 4 +- .../tailwindcss-language-server/init.lua | 4 +- lua/mason-registry/taplo/init.lua | 4 +- lua/mason-registry/teal-language-server/init.lua | 4 +- lua/mason-registry/terraform-ls/init.lua | 8 +- lua/mason-registry/texlab/init.lua | 8 +- lua/mason-registry/tflint/init.lua | 8 +- .../typescript-language-server/init.lua | 4 +- lua/mason-registry/vala-language-server/init.lua | 10 +- lua/mason-registry/verible/init.lua | 10 +- lua/mason-registry/vetur-vls/init.lua | 4 +- lua/mason-registry/vim-language-server/init.lua | 4 +- .../visualforce-language-server/init.lua | 10 +- lua/mason-registry/vls/init.lua | 14 +- lua/mason-registry/vue-language-server/init.lua | 4 +- lua/mason-registry/wgsl-analyzer/init.lua | 4 +- lua/mason-registry/yaml-language-server/init.lua | 4 +- lua/mason-registry/zk/init.lua | 8 +- lua/mason-registry/zls/init.lua | 12 +- lua/mason-schemas/lsp/astro-language-server.lua | 3 + lua/mason-schemas/lsp/bash-language-server.lua | 3 + lua/mason-schemas/lsp/clangd.lua | 3 + lua/mason-schemas/lsp/deno-lsp.lua | 3 + lua/mason-schemas/lsp/elixir-ls.lua | 3 + lua/mason-schemas/lsp/elm-language-server.lua | 3 + lua/mason-schemas/lsp/fsautocomplete.lua | 3 + lua/mason-schemas/lsp/grammarly-languageserver.lua | 3 + lua/mason-schemas/lsp/haxe-language-server.lua | 3 + lua/mason-schemas/lsp/html-lsp.lua | 3 + lua/mason-schemas/lsp/intelephense.lua | 3 + lua/mason-schemas/lsp/jdtls.lua | 3 + lua/mason-schemas/lsp/json-lsp.lua | 3 + lua/mason-schemas/lsp/julia-lsp.lua | 3 + lua/mason-schemas/lsp/kotlin-language-server.lua | 3 + lua/mason-schemas/lsp/ltex-ls.lua | 3 + lua/mason-schemas/lsp/lua-language-server.lua | 3 + lua/mason-schemas/lsp/nickel-lang-lsp.lua | 3 + lua/mason-schemas/lsp/omnisharp-roslyn.lua | 3 + lua/mason-schemas/lsp/perlnavigator.lua | 3 + lua/mason-schemas/lsp/psalm.lua | 3 + lua/mason-schemas/lsp/puppet-editor-services.lua | 3 + .../lsp/purescript-language-server.lua | 3 + lua/mason-schemas/lsp/pyright.lua | 3 + lua/mason-schemas/lsp/python-lsp-server.lua | 3 + lua/mason-schemas/lsp/r-languageserver.lua | 3 + lua/mason-schemas/lsp/rescript-lsp.lua | 3 + lua/mason-schemas/lsp/rome.lua | 3 + lua/mason-schemas/lsp/rust-analyzer.lua | 3 + lua/mason-schemas/lsp/solargraph.lua | 3 + lua/mason-schemas/lsp/sorbet.lua | 3 + lua/mason-schemas/lsp/stylelint-lsp.lua | 3 + lua/mason-schemas/lsp/svelte-language-server.lua | 3 + .../lsp/tailwindcss-language-server.lua | 3 + .../lsp/typescript-language-server.lua | 3 + lua/mason-schemas/lsp/vetur-vls.lua | 3 + lua/mason-schemas/lsp/vue-language-server.lua | 3 + lua/mason-schemas/lsp/yaml-language-server.lua | 3 + lua/mason-schemas/lsp/zls.lua | 3 + lua/mason.lua | 18 - .../lsp-schemas/astro-language-server.lua | 3 - .../lsp-schemas/bash-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/clangd.lua | 3 - lua/mason/_generated/lsp-schemas/deno-lsp.lua | 3 - lua/mason/_generated/lsp-schemas/elixir-ls.lua | 3 - .../_generated/lsp-schemas/elm-language-server.lua | 3 - .../_generated/lsp-schemas/fsautocomplete.lua | 3 - .../lsp-schemas/grammarly-languageserver.lua | 3 - .../lsp-schemas/haxe-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/html-lsp.lua | 3 - lua/mason/_generated/lsp-schemas/intelephense.lua | 3 - lua/mason/_generated/lsp-schemas/jdtls.lua | 3 - lua/mason/_generated/lsp-schemas/json-lsp.lua | 3 - lua/mason/_generated/lsp-schemas/julia-lsp.lua | 3 - .../lsp-schemas/kotlin-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/ltex-ls.lua | 3 - .../_generated/lsp-schemas/lua-language-server.lua | 3 - .../_generated/lsp-schemas/nickel-lang-lsp.lua | 3 - .../_generated/lsp-schemas/omnisharp-roslyn.lua | 3 - lua/mason/_generated/lsp-schemas/perlnavigator.lua | 3 - lua/mason/_generated/lsp-schemas/psalm.lua | 3 - .../lsp-schemas/puppet-editor-services.lua | 3 - .../lsp-schemas/purescript-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/pyright.lua | 3 - .../_generated/lsp-schemas/python-lsp-server.lua | 3 - .../_generated/lsp-schemas/r-languageserver.lua | 3 - lua/mason/_generated/lsp-schemas/rescript-lsp.lua | 3 - lua/mason/_generated/lsp-schemas/rome.lua | 3 - lua/mason/_generated/lsp-schemas/rust-analyzer.lua | 3 - lua/mason/_generated/lsp-schemas/solargraph.lua | 3 - lua/mason/_generated/lsp-schemas/sorbet.lua | 3 - lua/mason/_generated/lsp-schemas/stylelint-lsp.lua | 3 - .../lsp-schemas/svelte-language-server.lua | 3 - .../lsp-schemas/tailwindcss-language-server.lua | 3 - .../lsp-schemas/typescript-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/vetur-vls.lua | 3 - .../_generated/lsp-schemas/vue-language-server.lua | 3 - .../lsp-schemas/yaml-language-server.lua | 3 - lua/mason/_generated/lsp-schemas/zls.lua | 3 - lua/mason/_generated/lspconfig_filetype_map.lua | 162 ------- lua/mason/api/command.lua | 81 ++++ lua/mason/command-api/init.lua | 81 ---- lua/mason/core/EventEmitter.lua | 64 --- lua/mason/core/async/control.lua | 75 --- lua/mason/core/async/init.lua | 245 ---------- lua/mason/core/async/uv.lua | 49 -- lua/mason/core/clients/eclipse.lua | 15 - lua/mason/core/fetch.lua | 124 ----- lua/mason/core/fs.lua | 152 ------ lua/mason/core/functional/data.lua | 30 -- lua/mason/core/functional/function.lua | 89 ---- lua/mason/core/functional/init.lua | 112 ----- lua/mason/core/functional/list.lua | 175 ------- lua/mason/core/functional/logic.lua | 63 --- lua/mason/core/functional/number.lua | 34 -- lua/mason/core/functional/relation.lua | 17 - lua/mason/core/functional/string.lua | 74 --- lua/mason/core/functional/table.lua | 45 -- lua/mason/core/functional/type.lua | 14 - lua/mason/core/installer/context.lua | 278 ----------- lua/mason/core/installer/handle.lua | 214 --------- lua/mason/core/installer/init.lua | 176 ------- lua/mason/core/installer/linker.lua | 84 ---- lua/mason/core/managers/cargo/client.lua | 14 - lua/mason/core/managers/cargo/init.lua | 140 ------ lua/mason/core/managers/composer/init.lua | 135 ------ lua/mason/core/managers/dotnet/init.lua | 65 --- lua/mason/core/managers/gem/init.lua | 159 ------- lua/mason/core/managers/git/init.lua | 76 --- lua/mason/core/managers/github/client.lua | 117 ----- lua/mason/core/managers/github/init.lua | 171 ------- lua/mason/core/managers/go/init.lua | 173 ------- lua/mason/core/managers/luarocks/init.lua | 139 ------ lua/mason/core/managers/npm/init.lua | 143 ------ lua/mason/core/managers/opam/init.lua | 69 --- lua/mason/core/managers/pip3/init.lua | 175 ------- lua/mason/core/managers/powershell/init.lua | 46 -- lua/mason/core/managers/std/init.lua | 188 -------- lua/mason/core/optional.lua | 100 ---- lua/mason/core/package/init.lua | 205 --------- lua/mason/core/package/version-check.lua | 91 ---- lua/mason/core/path.lua | 51 --- lua/mason/core/platform.lua | 159 ------- lua/mason/core/process.lua | 213 --------- lua/mason/core/receipt.lua | 180 -------- lua/mason/core/result.lua | 152 ------ lua/mason/core/spawn.lua | 112 ----- lua/mason/core/ui/display.lua | 507 --------------------- lua/mason/core/ui/init.lua | 203 --------- lua/mason/core/ui/state.lua | 24 - lua/mason/health/init.lua | 298 ------------ lua/mason/init.lua | 18 + lua/mason/log.lua | 174 ------- lua/mason/notify.lua | 13 - lua/mason/settings.lua | 2 +- lua/mason/ui/components/footer.lua | 2 +- lua/mason/ui/components/header.lua | 2 +- lua/mason/ui/components/help/dap.lua | 2 +- lua/mason/ui/components/help/init.lua | 6 +- lua/mason/ui/components/help/lsp.lua | 2 +- lua/mason/ui/components/json-schema.lua | 4 +- lua/mason/ui/components/language-filter.lua | 2 +- lua/mason/ui/components/main/init.lua | 3 +- lua/mason/ui/components/main/package_list.lua | 4 +- lua/mason/ui/components/tabs.lua | 4 +- lua/mason/ui/instance.lua | 14 +- 360 files changed, 7456 insertions(+), 7464 deletions(-) create mode 100644 lua/mason-core/EventEmitter.lua create mode 100644 lua/mason-core/async/control.lua create mode 100644 lua/mason-core/async/init.lua create mode 100644 lua/mason-core/async/uv.lua create mode 100644 lua/mason-core/clients/eclipse.lua create mode 100644 lua/mason-core/fetch.lua create mode 100644 lua/mason-core/fs.lua create mode 100644 lua/mason-core/functional/data.lua create mode 100644 lua/mason-core/functional/function.lua create mode 100644 lua/mason-core/functional/init.lua create mode 100644 lua/mason-core/functional/list.lua create mode 100644 lua/mason-core/functional/logic.lua create mode 100644 lua/mason-core/functional/number.lua create mode 100644 lua/mason-core/functional/relation.lua create mode 100644 lua/mason-core/functional/string.lua create mode 100644 lua/mason-core/functional/table.lua create mode 100644 lua/mason-core/functional/type.lua create mode 100644 lua/mason-core/health/init.lua create mode 100644 lua/mason-core/installer/context.lua create mode 100644 lua/mason-core/installer/handle.lua create mode 100644 lua/mason-core/installer/init.lua create mode 100644 lua/mason-core/installer/linker.lua create mode 100644 lua/mason-core/log.lua create mode 100644 lua/mason-core/managers/cargo/client.lua create mode 100644 lua/mason-core/managers/cargo/init.lua create mode 100644 lua/mason-core/managers/composer/init.lua create mode 100644 lua/mason-core/managers/dotnet/init.lua create mode 100644 lua/mason-core/managers/gem/init.lua create mode 100644 lua/mason-core/managers/git/init.lua create mode 100644 lua/mason-core/managers/github/client.lua create mode 100644 lua/mason-core/managers/github/init.lua create mode 100644 lua/mason-core/managers/go/init.lua create mode 100644 lua/mason-core/managers/luarocks/init.lua create mode 100644 lua/mason-core/managers/npm/init.lua create mode 100644 lua/mason-core/managers/opam/init.lua create mode 100644 lua/mason-core/managers/pip3/init.lua create mode 100644 lua/mason-core/managers/powershell/init.lua create mode 100644 lua/mason-core/managers/std/init.lua create mode 100644 lua/mason-core/notify.lua create mode 100644 lua/mason-core/optional.lua create mode 100644 lua/mason-core/package/init.lua create mode 100644 lua/mason-core/package/version-check.lua create mode 100644 lua/mason-core/path.lua create mode 100644 lua/mason-core/platform.lua create mode 100644 lua/mason-core/process.lua create mode 100644 lua/mason-core/receipt.lua create mode 100644 lua/mason-core/result.lua create mode 100644 lua/mason-core/spawn.lua create mode 100644 lua/mason-core/ui/display.lua create mode 100644 lua/mason-core/ui/init.lua create mode 100644 lua/mason-core/ui/state.lua create mode 100644 lua/mason-lspconfig/mappings/filetype.lua create mode 100644 lua/mason-lspconfig/mappings/server.lua delete mode 100644 lua/mason-lspconfig/server-mapping.lua create mode 100644 lua/mason-schemas/lsp/astro-language-server.lua create mode 100644 lua/mason-schemas/lsp/bash-language-server.lua create mode 100644 lua/mason-schemas/lsp/clangd.lua create mode 100644 lua/mason-schemas/lsp/deno-lsp.lua create mode 100644 lua/mason-schemas/lsp/elixir-ls.lua create mode 100644 lua/mason-schemas/lsp/elm-language-server.lua create mode 100644 lua/mason-schemas/lsp/fsautocomplete.lua create mode 100644 lua/mason-schemas/lsp/grammarly-languageserver.lua create mode 100644 lua/mason-schemas/lsp/haxe-language-server.lua create mode 100644 lua/mason-schemas/lsp/html-lsp.lua create mode 100644 lua/mason-schemas/lsp/intelephense.lua create mode 100644 lua/mason-schemas/lsp/jdtls.lua create mode 100644 lua/mason-schemas/lsp/json-lsp.lua create mode 100644 lua/mason-schemas/lsp/julia-lsp.lua create mode 100644 lua/mason-schemas/lsp/kotlin-language-server.lua create mode 100644 lua/mason-schemas/lsp/ltex-ls.lua create mode 100644 lua/mason-schemas/lsp/lua-language-server.lua create mode 100644 lua/mason-schemas/lsp/nickel-lang-lsp.lua create mode 100644 lua/mason-schemas/lsp/omnisharp-roslyn.lua create mode 100644 lua/mason-schemas/lsp/perlnavigator.lua create mode 100644 lua/mason-schemas/lsp/psalm.lua create mode 100644 lua/mason-schemas/lsp/puppet-editor-services.lua create mode 100644 lua/mason-schemas/lsp/purescript-language-server.lua create mode 100644 lua/mason-schemas/lsp/pyright.lua create mode 100644 lua/mason-schemas/lsp/python-lsp-server.lua create mode 100644 lua/mason-schemas/lsp/r-languageserver.lua create mode 100644 lua/mason-schemas/lsp/rescript-lsp.lua create mode 100644 lua/mason-schemas/lsp/rome.lua create mode 100644 lua/mason-schemas/lsp/rust-analyzer.lua create mode 100644 lua/mason-schemas/lsp/solargraph.lua create mode 100644 lua/mason-schemas/lsp/sorbet.lua create mode 100644 lua/mason-schemas/lsp/stylelint-lsp.lua create mode 100644 lua/mason-schemas/lsp/svelte-language-server.lua create mode 100644 lua/mason-schemas/lsp/tailwindcss-language-server.lua create mode 100644 lua/mason-schemas/lsp/typescript-language-server.lua create mode 100644 lua/mason-schemas/lsp/vetur-vls.lua create mode 100644 lua/mason-schemas/lsp/vue-language-server.lua create mode 100644 lua/mason-schemas/lsp/yaml-language-server.lua create mode 100644 lua/mason-schemas/lsp/zls.lua delete mode 100644 lua/mason.lua delete mode 100644 lua/mason/_generated/lsp-schemas/astro-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/bash-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/clangd.lua delete mode 100644 lua/mason/_generated/lsp-schemas/deno-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/elixir-ls.lua delete mode 100644 lua/mason/_generated/lsp-schemas/elm-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/fsautocomplete.lua delete mode 100644 lua/mason/_generated/lsp-schemas/grammarly-languageserver.lua delete mode 100644 lua/mason/_generated/lsp-schemas/haxe-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/html-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/intelephense.lua delete mode 100644 lua/mason/_generated/lsp-schemas/jdtls.lua delete mode 100644 lua/mason/_generated/lsp-schemas/json-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/julia-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/kotlin-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/ltex-ls.lua delete mode 100644 lua/mason/_generated/lsp-schemas/lua-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/nickel-lang-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/omnisharp-roslyn.lua delete mode 100644 lua/mason/_generated/lsp-schemas/perlnavigator.lua delete mode 100644 lua/mason/_generated/lsp-schemas/psalm.lua delete mode 100644 lua/mason/_generated/lsp-schemas/puppet-editor-services.lua delete mode 100644 lua/mason/_generated/lsp-schemas/purescript-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/pyright.lua delete mode 100644 lua/mason/_generated/lsp-schemas/python-lsp-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/r-languageserver.lua delete mode 100644 lua/mason/_generated/lsp-schemas/rescript-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/rome.lua delete mode 100644 lua/mason/_generated/lsp-schemas/rust-analyzer.lua delete mode 100644 lua/mason/_generated/lsp-schemas/solargraph.lua delete mode 100644 lua/mason/_generated/lsp-schemas/sorbet.lua delete mode 100644 lua/mason/_generated/lsp-schemas/stylelint-lsp.lua delete mode 100644 lua/mason/_generated/lsp-schemas/svelte-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/tailwindcss-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/typescript-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/vetur-vls.lua delete mode 100644 lua/mason/_generated/lsp-schemas/vue-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/yaml-language-server.lua delete mode 100644 lua/mason/_generated/lsp-schemas/zls.lua delete mode 100644 lua/mason/_generated/lspconfig_filetype_map.lua create mode 100644 lua/mason/api/command.lua delete mode 100644 lua/mason/command-api/init.lua delete mode 100644 lua/mason/core/EventEmitter.lua delete mode 100644 lua/mason/core/async/control.lua delete mode 100644 lua/mason/core/async/init.lua delete mode 100644 lua/mason/core/async/uv.lua delete mode 100644 lua/mason/core/clients/eclipse.lua delete mode 100644 lua/mason/core/fetch.lua delete mode 100644 lua/mason/core/fs.lua delete mode 100644 lua/mason/core/functional/data.lua delete mode 100644 lua/mason/core/functional/function.lua delete mode 100644 lua/mason/core/functional/init.lua delete mode 100644 lua/mason/core/functional/list.lua delete mode 100644 lua/mason/core/functional/logic.lua delete mode 100644 lua/mason/core/functional/number.lua delete mode 100644 lua/mason/core/functional/relation.lua delete mode 100644 lua/mason/core/functional/string.lua delete mode 100644 lua/mason/core/functional/table.lua delete mode 100644 lua/mason/core/functional/type.lua delete mode 100644 lua/mason/core/installer/context.lua delete mode 100644 lua/mason/core/installer/handle.lua delete mode 100644 lua/mason/core/installer/init.lua delete mode 100644 lua/mason/core/installer/linker.lua delete mode 100644 lua/mason/core/managers/cargo/client.lua delete mode 100644 lua/mason/core/managers/cargo/init.lua delete mode 100644 lua/mason/core/managers/composer/init.lua delete mode 100644 lua/mason/core/managers/dotnet/init.lua delete mode 100644 lua/mason/core/managers/gem/init.lua delete mode 100644 lua/mason/core/managers/git/init.lua delete mode 100644 lua/mason/core/managers/github/client.lua delete mode 100644 lua/mason/core/managers/github/init.lua delete mode 100644 lua/mason/core/managers/go/init.lua delete mode 100644 lua/mason/core/managers/luarocks/init.lua delete mode 100644 lua/mason/core/managers/npm/init.lua delete mode 100644 lua/mason/core/managers/opam/init.lua delete mode 100644 lua/mason/core/managers/pip3/init.lua delete mode 100644 lua/mason/core/managers/powershell/init.lua delete mode 100644 lua/mason/core/managers/std/init.lua delete mode 100644 lua/mason/core/optional.lua delete mode 100644 lua/mason/core/package/init.lua delete mode 100644 lua/mason/core/package/version-check.lua delete mode 100644 lua/mason/core/path.lua delete mode 100644 lua/mason/core/platform.lua delete mode 100644 lua/mason/core/process.lua delete mode 100644 lua/mason/core/receipt.lua delete mode 100644 lua/mason/core/result.lua delete mode 100644 lua/mason/core/spawn.lua delete mode 100644 lua/mason/core/ui/display.lua delete mode 100644 lua/mason/core/ui/init.lua delete mode 100644 lua/mason/core/ui/state.lua delete mode 100644 lua/mason/health/init.lua create mode 100644 lua/mason/init.lua delete mode 100644 lua/mason/log.lua delete mode 100644 lua/mason/notify.lua (limited to 'lua') diff --git a/lua/mason-core/EventEmitter.lua b/lua/mason-core/EventEmitter.lua new file mode 100644 index 00000000..672c1778 --- /dev/null +++ b/lua/mason-core/EventEmitter.lua @@ -0,0 +1,64 @@ +---@class EventEmitter +---@field private __event_handlers table> +---@field private __event_handlers_once table> +local EventEmitter = {} +EventEmitter.__index = EventEmitter + +---@generic T +---@param obj T +---@return T +function EventEmitter.init(obj) + obj.__event_handlers = {} + obj.__event_handlers_once = {} + return obj +end + +---@param event any +function EventEmitter:emit(event, ...) + if self.__event_handlers[event] then + for handler in pairs(self.__event_handlers[event]) do + pcall(handler, ...) + end + end + if self.__event_handlers_once[event] then + for handler in pairs(self.__event_handlers_once[event]) do + pcall(handler, ...) + self.__event_handlers_once[handler] = nil + end + end +end + +---@param event any +---@param handler fun(payload: any) +function EventEmitter:on(event, handler) + if not self.__event_handlers[event] then + self.__event_handlers[event] = {} + end + self.__event_handlers[event][handler] = handler +end + +---@param event any +---@parma handler fun(payload: any) +function EventEmitter:once(event, handler) + if not self.__event_handlers_once[event] then + self.__event_handlers_once[event] = {} + end + self.__event_handlers_once[event][handler] = handler +end + +---@param event any +---@param handler fun(payload: any) +function EventEmitter:off(event, handler) + if vim.tbl_get(self.__event_handlers, { event, handler }) then + self.__event_handlers[event][handler] = nil + return true + end + return false +end + +function EventEmitter:clear_event_handlers() + self.__event_handlers = {} + self.__event_handlers_once = {} +end + +return EventEmitter diff --git a/lua/mason-core/async/control.lua b/lua/mason-core/async/control.lua new file mode 100644 index 00000000..3252c070 --- /dev/null +++ b/lua/mason-core/async/control.lua @@ -0,0 +1,75 @@ +local a = require "mason-core.async" + +---@class Condvar +local Condvar = {} +Condvar.__index = Condvar + +function Condvar.new() + return setmetatable({ handles = {}, queue = {}, is_notifying = false }, Condvar) +end + +---@async +function Condvar:wait() + a.wait(function(resolve) + if self.is_notifying then + self.queue[resolve] = true + else + self.handles[resolve] = true + end + end) +end + +function Condvar:notify_all() + self.is_notifying = true + for handle in pairs(self.handles) do + handle() + end + self.handles = self.queue + self.queue = {} + self.is_notifying = false +end + +local Permit = {} +Permit.__index = Permit + +function Permit.new(semaphore) + return setmetatable({ semaphore = semaphore }, Permit) +end + +function Permit:forget() + local semaphore = self.semaphore + semaphore.permits = semaphore.permits + 1 + + if semaphore.permits > 0 and #semaphore.handles > 0 then + semaphore.permits = semaphore.permits - 1 + local release = table.remove(semaphore.handles, 1) + release(Permit.new(semaphore)) + end +end + +---@class Semaphore +local Semaphore = {} +Semaphore.__index = Semaphore + +---@param permits integer +function Semaphore.new(permits) + return setmetatable({ permits = permits, handles = {} }, Semaphore) +end + +---@async +function Semaphore:acquire() + if self.permits > 0 then + self.permits = self.permits - 1 + else + return a.wait(function(resolve) + table.insert(self.handles, resolve) + end) + end + + return Permit.new(self) +end + +return { + Condvar = Condvar, + Semaphore = Semaphore, +} diff --git a/lua/mason-core/async/init.lua b/lua/mason-core/async/init.lua new file mode 100644 index 00000000..c79c6e42 --- /dev/null +++ b/lua/mason-core/async/init.lua @@ -0,0 +1,245 @@ +local _ = require "mason-core.functional" +local co = coroutine + +local exports = {} + +local Promise = {} +Promise.__index = Promise + +function Promise.new(resolver) + return setmetatable({ resolver = resolver, has_resolved = false }, Promise) +end + +---@param success boolean +---@param cb fun(success: boolean, value: table) +function Promise:_wrap_resolver_cb(success, cb) + return function(...) + if self.has_resolved then + return + end + self.has_resolved = true + cb(success, { ... }) + end +end + +function Promise:__call(callback) + self.resolver(self:_wrap_resolver_cb(true, callback), self:_wrap_resolver_cb(false, callback)) +end + +local function await(resolver) + local ok, value = co.yield(Promise.new(resolver)) + if not ok then + error(value[1], 2) + end + return unpack(value) +end + +local function table_pack(...) + return { n = select("#", ...), ... } +end + +---@param async_fn fun(...) +---@param should_reject_err boolean|nil @Whether the provided async_fn takes a callback with the signature `fun(err, result)` +local function promisify(async_fn, should_reject_err) + return function(...) + local args = table_pack(...) + return await(function(resolve, reject) + if should_reject_err then + args[args.n + 1] = function(err, result) + if err then + reject(err) + else + resolve(result) + end + end + else + args[args.n + 1] = resolve + end + local ok, err = pcall(async_fn, unpack(args, 1, args.n + 1)) + if not ok then + reject(err) + end + end) + end +end + +local function new_execution_context(suspend_fn, callback, ...) + local thread = co.create(suspend_fn) + local cancelled = false + local step + step = function(...) + if cancelled then + return + end + local ok, promise_or_result = co.resume(thread, ...) + if ok then + if co.status(thread) == "suspended" then + if getmetatable(promise_or_result) == Promise then + promise_or_result(step) + else + -- yield to parent coroutine + step(coroutine.yield(promise_or_result)) + end + else + callback(true, promise_or_result) + thread = nil + end + else + callback(false, promise_or_result) + thread = nil + end + end + + step(...) + return function() + cancelled = true + thread = nil + end +end + +exports.run = function(suspend_fn, callback, ...) + return new_execution_context(suspend_fn, callback, ...) +end + +---@generic T +---@param suspend_fn T +---@return T +exports.scope = function(suspend_fn) + return function(...) + return new_execution_context(suspend_fn, function(success, err) + if not success then + error(err, 0) + end + end, ...) + end +end + +exports.run_blocking = function(suspend_fn, ...) + local resolved, ok, result + local cancel_coroutine = new_execution_context(suspend_fn, function(a, b) + resolved = true + ok = a + result = b + end, ...) + + if vim.wait(60000, function() + return resolved == true + end, 50) then + if not ok then + error(result, 2) + end + return result + else + cancel_coroutine() + error("async function failed to resolve in time.", 2) + end +end + +exports.wait = await +exports.promisify = promisify + +exports.sleep = function(ms) + await(function(resolve) + vim.defer_fn(resolve, ms) + end) +end + +exports.scheduler = function() + await(vim.schedule) +end + +---Creates a oneshot channel that can only send once. +local function oneshot_channel() + local has_sent = false + local sent_value + local saved_callback + + return { + is_closed = function() + return has_sent + end, + send = function(...) + assert(not has_sent, "Oneshot channel can only send once.") + has_sent = true + sent_value = { ... } + if saved_callback then + saved_callback(unpack(sent_value)) + end + end, + receive = function() + return await(function(resolve) + if has_sent then + resolve(unpack(sent_value)) + else + saved_callback = resolve + end + end) + end, + } +end + +---@async +---@param suspend_fns async fun()[] +---@param mode '"first"' | '"all"' +local function wait(suspend_fns, mode) + local channel = oneshot_channel() + + do + local results = {} + local thread_cancellations = {} + local count = #suspend_fns + local completed = 0 + + local function cancel() + for _, cancel_thread in ipairs(thread_cancellations) do + cancel_thread() + end + end + + for i, suspend_fn in ipairs(suspend_fns) do + thread_cancellations[i] = exports.run(suspend_fn, function(success, result) + completed = completed + 1 + if not success then + if not channel.is_closed() then + cancel() + channel.send(false, result) + results = nil + thread_cancellations = {} + end + else + results[i] = result + if mode == "first" or completed >= count then + cancel() + channel.send(true, mode == "first" and { result } or results) + results = nil + thread_cancellations = {} + end + end + end) + end + end + + local ok, results = channel.receive() + if not ok then + error(results, 2) + end + return unpack(results) +end + +---@async +---@param suspend_fns async fun()[] +function exports.wait_all(suspend_fns) + return wait(suspend_fns, "all") +end + +---@async +---@param suspend_fns async fun()[] +function exports.wait_first(suspend_fns) + return wait(suspend_fns, "first") +end + +function exports.blocking(suspend_fn) + return _.partial(exports.run_blocking, suspend_fn) +end + +return exports diff --git a/lua/mason-core/async/uv.lua b/lua/mason-core/async/uv.lua new file mode 100644 index 00000000..f3d25b04 --- /dev/null +++ b/lua/mason-core/async/uv.lua @@ -0,0 +1,49 @@ +local a = require "mason-core.async" + +---@type table +local M = setmetatable({}, { + __index = function(cache, method) + cache[method] = a.promisify(vim.loop[method], true) + return cache[method] + end, +}) + +return M + +---@alias UvMethod +---| '"fs_close"' +---| '"fs_open"' +---| '"fs_read"' +---| '"fs_unlink"' +---| '"fs_write"' +---| '"fs_mkdir"' +---| '"fs_mkdtemp"' +---| '"fs_mkstemp"' +---| '"fs_rmdir"' +---| '"fs_scandir"' +---| '"fs_stat"' +---| '"fs_fstat"' +---| '"fs_lstat"' +---| '"fs_rename"' +---| '"fs_fsync"' +---| '"fs_fdatasync"' +---| '"fs_ftruncate"' +---| '"fs_sendfile"' +---| '"fs_access"' +---| '"fs_chmod"' +---| '"fs_fchmod"' +---| '"fs_utime"' +---| '"fs_futime"' +---| '"fs_lutime"' +---| '"fs_link"' +---| '"fs_symlink"' +---| '"fs_readlink"' +---| '"fs_realpath"' +---| '"fs_chown"' +---| '"fs_fchown"' +---| '"fs_lchown"' +---| '"fs_copyfile"' +---| '"fs_opendir"' +---| '"fs_readdir"' +---| '"fs_closedir"' +---| '"fs_statfs"' diff --git a/lua/mason-core/clients/eclipse.lua b/lua/mason-core/clients/eclipse.lua new file mode 100644 index 00000000..bca31648 --- /dev/null +++ b/lua/mason-core/clients/eclipse.lua @@ -0,0 +1,15 @@ +local fetch = require "mason-core.fetch" +local M = {} + +---@param version string The version string as found in the latest.txt endpoint. +---@return string The parsed version number. +function M._parse_jdtls_version_string(version) + return vim.trim(version):gsub("^jdt%-language%-server%-", ""):gsub("%.tar%.gz$", "") +end + +---@async +function M.fetch_latest_jdtls_version() + return fetch("https://download.eclipse.org/jdtls/snapshots/latest.txt"):map(M._parse_jdtls_version_string) +end + +return M diff --git a/lua/mason-core/fetch.lua b/lua/mason-core/fetch.lua new file mode 100644 index 00000000..168d0b99 --- /dev/null +++ b/lua/mason-core/fetch.lua @@ -0,0 +1,124 @@ +local log = require "mason-core.log" +local platform = require "mason-core.platform" +local Result = require "mason-core.result" +local spawn = require "mason-core.spawn" +local powershell = require "mason-core.managers.powershell" +local _ = require "mason-core.functional" + +local USER_AGENT = "mason.nvim (+https://github.com/williamboman/mason.nvim)" + +---@alias FetchMethod +---| '"GET"' +---| '"POST"' +---| '"PUT"' +---| '"PATCH"' +---| '"DELETE"' + +---@alias FetchOpts {out_file: string, method: FetchMethod, headers: table, data: string} + +---@async +---@param url string @The url to fetch. +---@param opts FetchOpts | nil +local function fetch(url, opts) + opts = opts or {} + if not opts.headers then + opts.headers = {} + end + if not opts.method then + opts.method = "GET" + end + opts.headers["User-Agent"] = USER_AGENT + log.fmt_debug("Fetching URL %s", url) + + local platform_specific = Result.failure() + + if platform.is_win then + local header_entries = _.join( + ", ", + _.map(function(pair) + return ("%q = %q"):format(pair[1], pair[2]) + end, _.to_pairs(opts.headers)) + ) + local headers = ("@{%s}"):format(header_entries) + if opts.out_file then + platform_specific = powershell.command( + ([[iwr %s -UseBasicParsing -Method %q -Uri %q %s -OutFile %q;]]):format( + headers, + opts.method, + url, + opts.data and ("-Body %s"):format(opts.data) or "", + opts.out_file + ) + ) + else + platform_specific = powershell.command( + ([[Write-Output (iwr %s -Method %q -UseBasicParsing %s -Uri %q).Content;]]):format( + headers, + opts.method, + opts.data and ("-Body %s"):format(opts.data) or "", + url + ) + ) + end + end + + return platform_specific + :recover_catching(function() + local headers = + _.sort_by(_.identity, _.map(_.compose(_.format "--header='%s'", _.join ": "), _.to_pairs(opts.headers))) + return spawn + .wget({ + headers, + "-nv", + "-O", + opts.out_file or "-", + ("--method=%s"):format(opts.method), + opts.data and { + ("--body-data=%s"):format(opts.data) or vim.NIL, + } or vim.NIL, + url, + }) + :get_or_throw() + end) + :recover_catching(function() + local headers = _.sort_by( + _.nth(2), + _.map( + _.compose(function(header) + return { "-H", header } + end, _.join ": "), + _.to_pairs(opts.headers) + ) + ) + return spawn + .curl({ + headers, + "-fsSL", + { + "-X", + opts.method, + }, + opts.data and { "-d", "@-" } or vim.NIL, + opts.out_file and { "-o", opts.out_file } or vim.NIL, + url, + on_spawn = function(_, stdio) + local stdin = stdio[1] + if opts.data then + log.trace("Writing stdin to curl", opts.data) + stdin:write(opts.data) + end + stdin:close() + end, + }) + :get_or_throw() + end) + :map(function(result) + if opts.out_file then + return result + else + return result.stdout + end + end) +end + +return fetch diff --git a/lua/mason-core/fs.lua b/lua/mason-core/fs.lua new file mode 100644 index 00000000..a69b5de5 --- /dev/null +++ b/lua/mason-core/fs.lua @@ -0,0 +1,152 @@ +local log = require "mason-core.log" +local a = require "mason-core.async" +local Path = require "mason-core.path" +local settings = require "mason.settings" + +local function make_module(uv) + local M = {} + + ---@param path string + function M.fstat(path) + log.trace("fs: fstat", path) + local fd = uv.fs_open(path, "r", 438) + local fstat = uv.fs_fstat(fd) + uv.fs_close(fd) + return fstat + end + + ---@param path string + function M.file_exists(path) + log.trace("fs: file_exists", path) + local ok, fstat = pcall(M.fstat, path) + if not ok then + return false + end + return fstat.type == "file" + end + + ---@param path string + function M.dir_exists(path) + log.trace("fs: dir_exists", path) + local ok, fstat = pcall(M.fstat, path) + if not ok then + return false + end + return fstat.type == "directory" + end + + ---@param path string + function M.rmrf(path) + assert( + Path.is_subdirectory(settings.current.install_root_dir, path), + ( + "Refusing to rmrf %q which is outside of the allowed boundary %q. Please report this error at https://github.com/williamboman/mason.nvim/issues/new" + ):format(path, settings.current.install_root_dir) + ) + log.debug("fs: rmrf", path) + if vim.in_fast_event() then + a.scheduler() + end + if vim.fn.delete(path, "rf") ~= 0 then + log.debug "fs: rmrf failed" + error(("rmrf: Could not remove directory %q."):format(path)) + end + end + + ---@param path string + function M.unlink(path) + log.debug("fs: unlink", path) + uv.fs_unlink(path) + end + + ---@param path string + function M.mkdir(path) + log.debug("fs: mkdir", path) + uv.fs_mkdir(path, 493) -- 493(10) == 755(8) + end + + ---@param path string + function M.mkdirp(path) + log.debug("fs: mkdirp", path) + if vim.in_fast_event() then + a.scheduler() + end + if vim.fn.mkdir(path, "p") ~= 1 then + log.debug "fs: mkdirp failed" + error(("mkdirp: Could not create directory %q."):format(path)) + end + end + + ---@param path string + ---@param new_path string + function M.rename(path, new_path) + log.debug("fs: rename", path, new_path) + uv.fs_rename(path, new_path) + end + + ---@param path string + ---@param contents string + ---@param flags string|nil @Defaults to "w". + function M.write_file(path, contents, flags) + log.debug("fs: write_file", path) + local fd = uv.fs_open(path, flags or "w", 438) + uv.fs_write(fd, contents, -1) + uv.fs_close(fd) + end + + ---@param path string + ---@param contents string + function M.append_file(path, contents) + M.write_file(path, contents, "a") + end + + ---@param path string + function M.read_file(path) + log.trace("fs: read_file", path) + local fd = uv.fs_open(path, "r", 438) + local fstat = uv.fs_fstat(fd) + local contents = uv.fs_read(fd, fstat.size, 0) + uv.fs_close(fd) + return contents + end + + ---@alias ReaddirEntry {name: string, type: string} + + ---@param path string @The full path to the directory to read. + ---@return ReaddirEntry[] + function M.readdir(path) + log.trace("fs: fs_opendir", path) + local dir = assert(vim.loop.fs_opendir(path, nil, 25)) + local all_entries = {} + local exhausted = false + + repeat + local entries = uv.fs_readdir(dir) + log.trace("fs: fs_readdir", path, entries) + if entries and #entries > 0 then + for i = 1, #entries do + all_entries[#all_entries + 1] = entries[i] + end + else + log.trace("fs: fs_readdir exhausted scan", path) + exhausted = true + end + until exhausted + + uv.fs_closedir(dir) + + return all_entries + end + + function M.symlink(path, new_path) + log.trace("fs: symlink", path, new_path) + uv.fs_symlink(path, new_path) + end + + return M +end + +return { + async = make_module(require "mason-core.async.uv"), + sync = make_module(vim.loop), +} diff --git a/lua/mason-core/functional/data.lua b/lua/mason-core/functional/data.lua new file mode 100644 index 00000000..da6f1efd --- /dev/null +++ b/lua/mason-core/functional/data.lua @@ -0,0 +1,30 @@ +local _ = {} + +_.table_pack = function(...) + return { n = select("#", ...), ... } +end + +---@generic T : string +---@param values T[] +---@return table +_.enum = function(values) + local result = {} + for i = 1, #values do + local v = values[i] + result[v] = v + end + return result +end + +---@generic T +---@param list T[] +---@return table +_.set_of = function(list) + local set = {} + for i = 1, #list do + set[list[i]] = true + end + return set +end + +return _ diff --git a/lua/mason-core/functional/function.lua b/lua/mason-core/functional/function.lua new file mode 100644 index 00000000..e85081ce --- /dev/null +++ b/lua/mason-core/functional/function.lua @@ -0,0 +1,89 @@ +local data = require "mason-core.functional.data" + +local _ = {} + +---@generic T : fun(...) +---@param fn T +---@param arity integer +---@return T +_.curryN = function(fn, arity) + return function(...) + local args = data.table_pack(...) + if args.n >= arity then + return fn(unpack(args, 1, arity)) + else + return _.curryN(_.partial(fn, unpack(args, 1, args.n)), arity - args.n) + end + end +end + +_.compose = function(...) + local functions = data.table_pack(...) + assert(functions.n > 0, "compose requires at least one function") + return function(...) + local result = data.table_pack(...) + for i = functions.n, 1, -1 do + result = data.table_pack(functions[i](unpack(result, 1, result.n))) + end + return unpack(result, 1, result.n) + end +end + +---@generic T +---@param fn fun(...): T +---@return fun(...): T +_.partial = function(fn, ...) + local bound_args = data.table_pack(...) + return function(...) + local args = data.table_pack(...) + local merged_args = {} + for i = 1, bound_args.n do + merged_args[i] = bound_args[i] + end + for i = 1, args.n do + merged_args[bound_args.n + i] = args[i] + end + return fn(unpack(merged_args, 1, bound_args.n + args.n)) + end +end + +_.identity = function(a) + return a +end + +_.always = function(a) + return function() + return a + end +end + +_.T = _.always(true) +_.F = _.always(false) + +---@generic T : fun(...) +---@param fn T +---@param cache_key_generator (fun(...): string | nil)|nil +---@return T +_.memoize = function(fn, cache_key_generator) + cache_key_generator = cache_key_generator or _.identity + local cache = {} + return function(...) + local key = cache_key_generator(...) + if not cache[key] then + cache[key] = data.table_pack(fn(...)) + end + return unpack(cache[key], 1, cache[key].n) + end +end + +---@generic T +---@param fn fun(): T +---@return fun(): T +_.lazy = function(fn) + local memoized = _.memoize(fn, _.always "lazyval") + return function() + return memoized() + end +end + +return _ diff --git a/lua/mason-core/functional/init.lua b/lua/mason-core/functional/init.lua new file mode 100644 index 00000000..a7b0a369 --- /dev/null +++ b/lua/mason-core/functional/init.lua @@ -0,0 +1,112 @@ +local _ = {} + +-- data +local data = require "mason-core.functional.data" +_.table_pack = data.table_pack +_.enum = data.enum +_.set_of = data.set_of + +-- function +local fun = require "mason-core.functional.function" +_.curryN = fun.curryN +_.compose = fun.compose +_.partial = fun.partial +_.identity = fun.identity +_.always = fun.always +_.T = fun.T +_.F = fun.F +_.memoize = fun.memoize +_.lazy = fun.lazy + +-- list +local list = require "mason-core.functional.list" +_.reverse = list.reverse +_.list_not_nil = list.list_not_nil +_.list_copy = list.list_copy +_.find_first = list.find_first +_.any = list.any +_.filter = list.filter +_.map = list.map +_.filter_map = list.filter_map +_.each = list.each +_.concat = list.concat +_.append = list.append +_.prepend = list.prepend +_.zip_table = list.zip_table +_.nth = list.nth +_.head = list.head +_.length = list.length +_.flatten = list.flatten +_.sort_by = list.sort_by +_.join = list.join + +-- relation +local relation = require "mason-core.functional.relation" +_.equals = relation.equals +_.prop_eq = relation.prop_eq +_.prop_satisfies = relation.prop_satisfies + +-- logic +local logic = require "mason-core.functional.logic" +_.all_pass = logic.all_pass +_.any_pass = logic.any_pass +_.if_else = logic.if_else +_.is_not = logic.is_not +_.complement = logic.complement +_.cond = logic.cond + +-- number +local number = require "mason-core.functional.number" +_.negate = number.negate +_.gt = number.gt +_.gte = number.gte +_.lt = number.lt +_.lte = number.lte +_.inc = number.inc +_.dec = number.dec + +-- string +local string = require "mason-core.functional.string" +_.matches = string.matches +_.format = string.format +_.split = string.split +_.gsub = string.gsub +_.trim = string.trim +_.dedent = string.dedent +_.starts_with = string.starts_with + +-- table +local tbl = require "mason-core.functional.table" +_.prop = tbl.prop +_.pick = tbl.pick +_.keys = tbl.keys +_.size = tbl.size +_.to_pairs = tbl.to_pairs +_.invert = tbl.invert + +-- type +local typ = require "mason-core.functional.type" +_.is_nil = typ.is_nil +_.is = typ.is + +-- TODO do something else with these + +_.coalesce = function(...) + local args = _.table_pack(...) + for i = 1, args.n do + local variable = args[i] + if variable ~= nil then + return variable + end + end +end + +_.when = function(condition, value) + return condition and value or nil +end + +_.lazy_when = function(condition, value) + return condition and value() or nil +end + +return _ diff --git a/lua/mason-core/functional/list.lua b/lua/mason-core/functional/list.lua new file mode 100644 index 00000000..14db386e --- /dev/null +++ b/lua/mason-core/functional/list.lua @@ -0,0 +1,175 @@ +local fun = require "mason-core.functional.function" +local data = require "mason-core.functional.data" + +local _ = {} + +---@generic T +---@param list T[] +---@return T[] +_.reverse = function(list) + local result = {} + for i = #list, 1, -1 do + result[#result + 1] = list[i] + end + return result +end + +_.list_not_nil = function(...) + local result = {} + local args = data.table_pack(...) + for i = 1, args.n do + if args[i] ~= nil then + result[#result + 1] = args[i] + end + end + return result +end + +---@generic T +---@param predicate fun(item: T): boolean +---@param list T[] +---@return T | nil +_.find_first = fun.curryN(function(predicate, list) + local result + for i = 1, #list do + local entry = list[i] + if predicate(entry) then + return entry + end + end + return result +end, 2) + +---@generic T +---@param predicate fun(item: T): boolean +---@param list T[] +---@return boolean +_.any = fun.curryN(function(predicate, list) + for i = 1, #list do + if predicate(list[i]) then + return true + end + end + return false +end, 2) + +---@generic T +---@type fun(filter_fn: (fun(item: T): boolean), items: T[]): T[] +_.filter = fun.curryN(vim.tbl_filter, 2) + +---@generic T, U +---@type fun(map_fn: (fun(item: T): U), items: T[]): U[] +_.map = fun.curryN(vim.tbl_map, 2) + +_.flatten = fun.curryN(vim.tbl_flatten, 1) + +---@generic T +---@param map_fn fun(item: T): Optional +---@param list T[] +---@return any[] +_.filter_map = fun.curryN(function(map_fn, list) + local ret = {} + for i = 1, #list do + map_fn(list[i]):if_present(function(value) + ret[#ret + 1] = value + end) + end + return ret +end, 2) + +---@generic T +---@param fn fun(item: T, index: integer) +---@param list T[] +_.each = fun.curryN(function(fn, list) + for k, v in pairs(list) do + fn(v, k) + end +end, 2) + +---@generic T +---@param list T[] +---@return T[] @A shallow copy of the list. +_.list_copy = _.map(fun.identity) + +_.concat = fun.curryN(function(a, b) + if type(a) == "table" then + assert(type(b) == "table", "concat: expected table") + return vim.list_extend(_.list_copy(a), b) + elseif type(a) == "string" then + assert(type(b) == "string", "concat: expected string") + return a .. b + end +end, 2) + +---@generic T +---@param value T +---@param list T[] +---@return T[] +_.append = fun.curryN(function(value, list) + local list_copy = _.list_copy(list) + list_copy[#list_copy + 1] = value + return list_copy +end, 2) + +---@generic T +---@param value T +---@param list T[] +---@return T[] +_.prepend = fun.curryN(function(value, list) + local list_copy = _.list_copy(list) + table.insert(list_copy, 1, value) + return list_copy +end, 2) + +---@generic T +---@generic U +---@param keys T[] +---@param values U[] +---@return table +_.zip_table = fun.curryN(function(keys, values) + local res = {} + for i, key in ipairs(keys) do + res[key] = values[i] + end + return res +end, 2) + +---@generic T +---@param offset number +---@param value T[]|string +---@return T|string|nil +_.nth = fun.curryN(function(offset, value) + local index = offset < 0 and (#value + (offset + 1)) or offset + if type(value) == "string" then + return string.sub(value, index, index) + else + return value[index] + end +end, 2) + +_.head = _.nth(1) + +---@param value string|any[] +_.length = function(value) + return #value +end + +---@generic T +---@param comp fun(item: T): any +---@param list T[] +---@return T[] +_.sort_by = fun.curryN(function(comp, list) + local copied_list = _.list_copy(list) + table.sort(copied_list, function(a, b) + return comp(a) < comp(b) + end) + return copied_list +end, 2) + +---@param sep string +---@param list any[] +_.join = fun.curryN(function(sep, list) + return table.concat(list, sep) +end, 2) + +return _ diff --git a/lua/mason-core/functional/logic.lua b/lua/mason-core/functional/logic.lua new file mode 100644 index 00000000..0e0044d5 --- /dev/null +++ b/lua/mason-core/functional/logic.lua @@ -0,0 +1,63 @@ +local fun = require "mason-core.functional.function" + +local _ = {} + +---@generic T +---@param predicates (fun(item: T): boolean)[] +---@return fun(item: T): boolean +_.all_pass = fun.curryN(function(predicates, item) + for i = 1, #predicates do + if not predicates[i](item) then + return false + end + end + return true +end, 2) + +---@generic T +---@param predicates (fun(item: T): boolean)[] +---@return fun(item: T): boolean +_.any_pass = fun.curryN(function(predicates, item) + for i = 1, #predicates do + if predicates[i](item) then + return true + end + end + return false +end, 2) + +---@generic T +---@param predicate fun(item: T): boolean +---@param on_true fun(item: T): any +---@param on_false fun(item: T): any +---@param value T +_.if_else = fun.curryN(function(predicate, on_true, on_false, value) + if predicate(value) then + return on_true(value) + else + return on_false(value) + end +end, 4) + +---@param value boolean +_.is_not = function(value) + return not value +end + +---@generic T +---@param predicate fun(value: T): boolean +---@param value T +_.complement = fun.curryN(function(predicate, value) + return not predicate(value) +end, 2) + +_.cond = fun.curryN(function(predicate_transformer_pairs, value) + for _, pair in ipairs(predicate_transformer_pairs) do + local predicate, transformer = pair[1], pair[2] + if predicate(value) then + return transformer(value) + end + end +end, 2) + +return _ diff --git a/lua/mason-core/functional/number.lua b/lua/mason-core/functional/number.lua new file mode 100644 index 00000000..11e8f88a --- /dev/null +++ b/lua/mason-core/functional/number.lua @@ -0,0 +1,34 @@ +local fun = require "mason-core.functional.function" + +local _ = {} + +---@param number number +_.negate = function(number) + return -number +end + +_.gt = fun.curryN(function(number, value) + return value > number +end, 2) + +_.gte = fun.curryN(function(number, value) + return value >= number +end, 2) + +_.lt = fun.curryN(function(number, value) + return value < number +end, 2) + +_.lte = fun.curryN(function(number, value) + return value <= number +end, 2) + +_.inc = fun.curryN(function(increment, value) + return value + increment +end, 2) + +_.dec = fun.curryN(function(decrement, value) + return value - decrement +end, 2) + +return _ diff --git a/lua/mason-core/functional/relation.lua b/lua/mason-core/functional/relation.lua new file mode 100644 index 00000000..94913a13 --- /dev/null +++ b/lua/mason-core/functional/relation.lua @@ -0,0 +1,17 @@ +local fun = require "mason-core.functional.function" + +local _ = {} + +_.equals = fun.curryN(function(expected, value) + return value == expected +end, 2) + +_.prop_eq = fun.curryN(function(property, value, tbl) + return tbl[property] == value +end, 3) + +_.prop_satisfies = fun.curryN(function(predicate, property, tbl) + return predicate(tbl[property]) +end, 3) + +return _ diff --git a/lua/mason-core/functional/string.lua b/lua/mason-core/functional/string.lua new file mode 100644 index 00000000..7726c8e1 --- /dev/null +++ b/lua/mason-core/functional/string.lua @@ -0,0 +1,74 @@ +local fun = require "mason-core.functional.function" + +local _ = {} + +---@param pattern string +---@param str string +_.matches = fun.curryN(function(pattern, str) + return str:match(pattern) ~= nil +end, 2) + +---@param template string +---@param str string +_.format = fun.curryN(function(template, str) + return template:format(str) +end, 2) + +---@param sep string +---@param str string +_.split = fun.curryN(function(sep, str) + return vim.split(str, sep) +end, 2) + +---@param pattern string +---@param repl string|function|table +---@param str string +_.gsub = fun.curryN(function(pattern, repl, str) + return string.gsub(str, pattern, repl) +end, 3) + +_.trim = fun.curryN(function(str) + return vim.trim(str) +end, 1) + +---https://github.com/nvim-lua/nvim-package-specification/blob/93475e47545b579fd20b6c5ce13c4163e7956046/lua/packspec/schema.lua#L8-L37 +---@param str string +---@return string +_.dedent = fun.curryN(function(str) + local lines = {} + local indent = nil + + for line in str:gmatch "[^\n]*\n?" do + if indent == nil then + if not line:match "^%s*$" then + -- save pattern for indentation from the first non-empty line + indent, line = line:match "^(%s*)(.*)$" + indent = "^" .. indent .. "(.*)$" + table.insert(lines, line) + end + else + if line:match "^%s*$" then + -- replace empty lines with a single newline character. + -- empty lines are handled separately to allow the + -- closing "]]" to be one indentation level lower. + table.insert(lines, "\n") + else + -- strip indentation on non-empty lines + line = assert(line:match(indent), "inconsistent indentation") + table.insert(lines, line) + end + end + end + + lines = table.concat(lines) + -- trim trailing whitespace + return lines:match "^(.-)%s*$" +end, 1) + +---@param prefix string +---@str string +_.starts_with = fun.curryN(function(prefix, str) + return vim.startswith(str, prefix) +end, 2) + +return _ diff --git a/lua/mason-core/functional/table.lua b/lua/mason-core/functional/table.lua new file mode 100644 index 00000000..65d05cc8 --- /dev/null +++ b/lua/mason-core/functional/table.lua @@ -0,0 +1,45 @@ +local fun = require "mason-core.functional.function" + +local _ = {} + +---@param index any +---@param tbl table +_.prop = fun.curryN(function(index, tbl) + return tbl[index] +end, 2) + +---@param keys any[] +---@param tbl table +_.pick = fun.curryN(function(keys, tbl) + local ret = {} + for _, key in ipairs(keys) do + ret[key] = tbl[key] + end + return ret +end, 2) + +_.keys = fun.curryN(vim.tbl_keys, 1) +_.size = fun.curryN(vim.tbl_count, 1) + +---@param tbl table +---@return any[][] +_.to_pairs = fun.curryN(function(tbl) + local result = {} + for k, v in pairs(tbl) do + result[#result + 1] = { k, v } + end + return result +end, 1) + +---@generic K, V +---@param tbl table +---@return table +_.invert = fun.curryN(function(tbl) + local result = {} + for k, v in pairs(tbl) do + result[v] = k + end + return result +end, 1) + +return _ diff --git a/lua/mason-core/functional/type.lua b/lua/mason-core/functional/type.lua new file mode 100644 index 00000000..e3bf5fe7 --- /dev/null +++ b/lua/mason-core/functional/type.lua @@ -0,0 +1,14 @@ +local fun = require "mason-core.functional.function" +local rel = require "mason-core.functional.relation" + +local _ = {} + +_.is_nil = rel.equals(nil) + +---@param typ type +---@param value any +_.is = fun.curryN(function(typ, value) + return type(value) == typ +end, 2) + +return _ diff --git a/lua/mason-core/health/init.lua b/lua/mason-core/health/init.lua new file mode 100644 index 00000000..39ceac81 --- /dev/null +++ b/lua/mason-core/health/init.lua @@ -0,0 +1,298 @@ +local health = vim.health or require "health" +local a = require "mason-core.async" +local platform = require "mason-core.platform" +local github_client = require "mason-core.managers.github.client" +local _ = require "mason-core.functional" +local spawn = require "mason-core.spawn" + +local M = {} + +---@alias HealthCheckResult +---| '"success"' +---| '"version-mismatch"' +---| '"parse-error"' +---| '"not-available"' + +---@class HealthCheck +---@field public result HealthCheckResult +---@field public version string|nil +---@field public relaxed boolean|nil +---@field public reason string|nil +---@field public name string +local HealthCheck = {} +HealthCheck.__index = HealthCheck + +function HealthCheck.new(props) + local self = setmetatable(props, HealthCheck) + return self +end + +function HealthCheck:get_version() + if self.result == "success" and not self.version or self.version == "" then + -- Some checks (bourne shell for instance) don't produce any output, so we default to just "Ok" + return "Ok" + end + return self.version +end + +function HealthCheck:get_health_report_level() + return ({ + ["success"] = "report_ok", + ["parse-error"] = "report_warn", + ["version-mismatch"] = self.relaxed and "report_warn" or "report_error", + ["not-available"] = self.relaxed and "report_warn" or "report_error", + })[self.result] +end + +function HealthCheck:__tostring() + if self.result == "success" then + return ("**%s**: `%s`"):format(self.name, self:get_version()) + elseif self.result == "version-mismatch" then + return ("**%s**: unsupported version `%s`. %s"):format(self.name, self:get_version(), self.reason) + elseif self.result == "parse-error" then + return ("**%s**: failed to parse version"):format(self.name) + elseif self.result == "not-available" then + return ("**%s**: not available"):format(self.name) + end +end + +---@param callback fun(result: HealthCheck) +local function mk_healthcheck(callback) + ---@param opts {cmd:string, args:string[], name: string, use_stderr:boolean} + return function(opts) + local parse_version = + _.compose(_.head, _.split "\n", _.if_else(_.always(opts.use_stderr), _.prop "stderr", _.prop "stdout")) + + ---@async + return function() + local healthcheck_result = spawn + [opts.cmd]({ + opts.args, + on_spawn = function(_, stdio) + local stdin = stdio[1] + stdin:close() -- some processes (`sh` for example) will endlessly read from stdin, so we close it immediately + end, + }) + :map(parse_version) + :map(function(version) + if opts.version_check then + local ok, version_check = pcall(opts.version_check, version) + if ok and version_check then + return HealthCheck.new { + result = "version-mismatch", + reason = version_check, + version = version, + name = opts.name, + relaxed = opts.relaxed, + } + elseif not ok then + return HealthCheck.new { + result = "parse-error", + version = "N/A", + name = opts.name, + relaxed = opts.relaxed, + } + end + end + + return HealthCheck.new { + result = "success", + version = version, + name = opts.name, + relaxed = opts.relaxed, + } + end) + :get_or_else(HealthCheck.new { + result = "not-available", + version = nil, + name = opts.name, + relaxed = opts.relaxed, + }) + + callback(healthcheck_result) + end + end +end + +function M.check() + health.report_start "mason.nvim report" + if vim.fn.has "nvim-0.7.0" == 1 then + health.report_ok "neovim version >= 0.7.0" + else + health.report_error "neovim version < 0.7.0" + end + + local completed = 0 + + local check = mk_healthcheck(vim.schedule_wrap( + ---@param healthcheck HealthCheck + function(healthcheck) + completed = completed + 1 + health[healthcheck:get_health_report_level()](tostring(healthcheck)) + end + )) + + local checks = { + check { + cmd = "go", + args = { "version" }, + name = "Go", + relaxed = true, + version_check = function(version) + -- Parses output such as "go version go1.17.3 darwin/arm64" into major, minor, patch components + local _, _, major, minor = version:find "go(%d+)%.(%d+)" + -- Due to https://go.dev/doc/go-get-install-deprecation + if not (tonumber(major) >= 1 and tonumber(minor) >= 17) then + return "Go version must be >= 1.17." + end + end, + }, + check { + cmd = "cargo", + args = { "--version" }, + name = "cargo", + relaxed = true, + version_check = function(version) + local _, _, major, minor = version:find "(%d+)%.(%d+)%.(%d+)" + if (tonumber(major) <= 1) and (tonumber(minor) < 60) then + return "Some cargo installations require Rust >= 1.60.0." + end + end, + }, + check { + cmd = "luarocks", + args = { "--version" }, + name = "luarocks", + relaxed = true, + version_check = function(version) + local _, _, major = version:find "(%d+)%.(%d)%.(%d)" + if not (tonumber(major) >= 3) then + -- Because of usage of "--dev" flag + return "Luarocks version must be >= 3.0.0." + end + end, + }, + check { cmd = "ruby", args = { "--version" }, name = "Ruby", relaxed = true }, + check { cmd = "gem", args = { "--version" }, name = "RubyGem", relaxed = true }, + check { cmd = "composer", args = { "--version" }, name = "Composer", relaxed = true }, + check { cmd = "php", args = { "--version" }, name = "PHP", relaxed = true }, + check { + cmd = "npm", + args = { "--version" }, + name = "npm", + version_check = function(version) + -- Parses output such as "8.1.2" into major, minor, patch components + local _, _, major = version:find "(%d+)%.(%d+)%.(%d+)" + -- Based off of general observations of feature parity + if tonumber(major) < 6 then + return "npm version must be >= 6" + end + end, + }, + check { + cmd = "node", + args = { "--version" }, + name = "node", + version_check = function(version) + -- Parses output such as "v16.3.1" into major, minor, patch + local _, _, major = version:find "v(%d+)%.(%d+)%.(%d+)" + if tonumber(major) < 14 then + return "Node version must be >= 14" + end + end, + }, + check { cmd = "python3", args = { "--version" }, name = "python3", relaxed = true }, + check { cmd = "python3", args = { "-m", "pip", "--version" }, name = "pip3", relaxed = true }, + check { cmd = "javac", args = { "-version" }, name = "javac", relaxed = true }, + check { cmd = "java", args = { "-version" }, name = "java", use_stderr = true, relaxed = true }, + check { cmd = "julia", args = { "--version" }, name = "julia", relaxed = true }, + check { cmd = "wget", args = { "--version" }, name = "wget" }, + -- wget is used interchangeably with curl, but with higher priority, so we mark curl as relaxed + check { cmd = "curl", args = { "--version" }, name = "curl", relaxed = true }, + check { + cmd = "gzip", + args = { "--version" }, + name = "gzip", + use_stderr = platform.is_mac, -- Apple gzip prints version string to stderr + }, + check { cmd = "tar", args = { "--version" }, name = "tar" }, + -- when(platform.is_win, check { cmd = "powershell.exe", args = { "-Version" }, name = "PowerShell" }), -- TODO fix me + -- when(platform.is_win, check { cmd = "cmd.exe", args = { "-Version" }, name = "cmd" }) -- TODO fix me + } + + if platform.is.unix then + table.insert(checks, check { cmd = "bash", args = { "--version" }, name = "bash" }) + table.insert(checks, check { cmd = "sh", name = "sh" }) + end + + if platform.is.win then + table.insert( + checks, + check { cmd = "python", use_stderr = true, args = { "--version" }, name = "python", relaxed = true } + ) + table.insert( + checks, + check { cmd = "python", args = { "-m", "pip", "--version" }, name = "pip", relaxed = true } + ) + end + + if vim.g.python3_host_prog then + table.insert( + checks, + check { cmd = vim.g.python3_host_prog, args = { "--version" }, name = "python3_host_prog", relaxed = true } + ) + end + + if vim.env.JAVA_HOME then + table.insert( + checks, + check { + cmd = ("%s/bin/java"):format(vim.env.JAVA_HOME), + args = { "-version" }, + name = "JAVA_HOME", + use_stderr = true, + relaxed = true, + } + ) + end + + a.run_blocking(function() + for _, c in ipairs(checks) do + c() + end + + github_client + .fetch_rate_limit() + :map( + ---@param rate_limit GitHubRateLimitResponse + function(rate_limit) + if vim.in_fast_event() then + a.scheduler() + end + local remaining = rate_limit.resources.core.remaining + local used = rate_limit.resources.core.used + local limit = rate_limit.resources.core.limit + local reset = rate_limit.resources.core.reset + local diagnostics = ("Used: %d. Remaining: %d. Limit: %d. Reset: %s."):format( + used, + remaining, + limit, + vim.fn.strftime("%c", reset) + ) + if remaining <= 0 then + health.report_error(("GitHub API rate limit exceeded. %s"):format(diagnostics)) + else + health.report_ok(("GitHub API rate limit. %s"):format(diagnostics)) + end + end + ) + :on_failure(function() + if vim.in_fast_event() then + a.scheduler() + end + health.report_warn "Failed to check GitHub API rate limit status." + end) + end) +end + +return M diff --git a/lua/mason-core/installer/context.lua b/lua/mason-core/installer/context.lua new file mode 100644 index 00000000..9dfbb7f1 --- /dev/null +++ b/lua/mason-core/installer/context.lua @@ -0,0 +1,278 @@ +local spawn = require "mason-core.spawn" +local log = require "mason-core.log" +local fs = require "mason-core.fs" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local receipt = require "mason-core.receipt" +local Optional = require "mason-core.optional" +local _ = require "mason-core.functional" + +---@class ContextualSpawn +---@field cwd CwdManager +---@field handle InstallHandle +local ContextualSpawn = {} + +---@param cwd CwdManager +---@param handle InstallHandle +function ContextualSpawn.new(cwd, handle) + return setmetatable({ cwd = cwd, handle = handle }, ContextualSpawn) +end + +function ContextualSpawn.__index(self, cmd) + return function(args) + args.cwd = args.cwd or self.cwd:get() + args.stdio_sink = args.stdio_sink or self.handle.stdio.sink + local on_spawn = args.on_spawn + local captured_handle + args.on_spawn = function(handle, stdio, pid, ...) + captured_handle = handle + self.handle:push_spawninfo(handle, pid, cmd, spawn._flatten_cmd_args(args)) + if on_spawn then + on_spawn(handle, stdio, pid, ...) + end + end + local function pop_spawn_stack() + if captured_handle then + self.handle:pop_spawninfo(captured_handle) + end + end + -- We get_or_throw() here for convenience reasons. + -- Almost every time spawn is called via context we want the command to succeed. + return spawn[cmd](args):on_success(pop_spawn_stack):on_failure(pop_spawn_stack):get_or_throw() + end +end + +---@class ContextualFs +---@field private cwd CwdManager +local ContextualFs = {} +ContextualFs.__index = ContextualFs + +---@param cwd CwdManager +function ContextualFs.new(cwd) + return setmetatable({ cwd = cwd }, ContextualFs) +end + +---@async +---@param rel_path string @The relative path from the current working directory to the file to append. +---@param contents string +function ContextualFs:append_file(rel_path, contents) + return fs.async.append_file(path.concat { self.cwd:get(), rel_path }, contents) +end + +---@async +---@param rel_path string @The relative path from the current working directory to the file to write. +---@param contents string +function ContextualFs:write_file(rel_path, contents) + return fs.async.write_file(path.concat { self.cwd:get(), rel_path }, contents) +end + +---@async +---@param rel_path string @The relative path from the current working directory. +function ContextualFs:file_exists(rel_path) + return fs.async.file_exists(path.concat { self.cwd:get(), rel_path }) +end + +---@async +---@param rel_path string @The relative path from the current working directory. +function ContextualFs:dir_exists(rel_path) + return fs.async.dir_exists(path.concat { self.cwd:get(), rel_path }) +end + +---@async +---@param rel_path string @The relative path from the current working directory. +function ContextualFs:rmrf(rel_path) + return fs.async.rmrf(path.concat { self.cwd:get(), rel_path }) +end + +---@async +---@param rel_path string @The relative path from the current working directory. +function ContextualFs:unlink(rel_path) + return fs.async.unlink(path.concat { self.cwd:get(), rel_path }) +end + +---@async +---@param old_path string +---@param new_path string +function ContextualFs:rename(old_path, new_path) + return fs.async.rename(path.concat { self.cwd:get(), old_path }, path.concat { self.cwd:get(), new_path }) +end + +---@async +---@param dirpath string +function ContextualFs:mkdir(dirpath) + return fs.async.mkdir(path.concat { self.cwd:get(), dirpath }) +end + +---@class CwdManager +---@field private install_prefix string @Defines the upper boundary for which paths are allowed as cwd. +---@field private cwd string +local CwdManager = {} +CwdManager.__index = CwdManager + +function CwdManager.new(install_prefix) + assert(type(install_prefix) == "string") + return setmetatable({ + install_prefix = install_prefix, + cwd = nil, + }, CwdManager) +end + +function CwdManager:get() + assert(self.cwd ~= nil, "Tried to access cwd before it was set.") + return self.cwd +end + +---@param new_cwd string +function CwdManager:set(new_cwd) + assert(type(new_cwd) == "string") + assert( + path.is_subdirectory(self.install_prefix, new_cwd), + ("%q is not a subdirectory of %q"):format(new_cwd, self.install_prefix) + ) + self.cwd = new_cwd +end + +---@class InstallContext +---@field public receipt InstallReceiptBuilder +---@field public requested_version Optional +---@field public fs ContextualFs +---@field public spawn JobSpawn +---@field public handle InstallHandle +---@field public package Package +---@field public cwd CwdManager +---@field public stdio_sink StdioSink +local InstallContext = {} +InstallContext.__index = InstallContext + +---@class InstallContextOpts +---@field requested_version string|nil + +---@param handle InstallHandle +---@param opts InstallContextOpts +function InstallContext.new(handle, opts) + local cwd_manager = CwdManager.new(path.install_prefix()) + return setmetatable({ + cwd = cwd_manager, + spawn = ContextualSpawn.new(cwd_manager, handle), + handle = handle, + package = handle.package, -- for convenience + fs = ContextualFs.new(cwd_manager), + receipt = receipt.InstallReceiptBuilder.new(), + requested_version = Optional.of_nilable(opts.requested_version), + stdio_sink = handle.stdio.sink, + }, InstallContext) +end + +---@async +function InstallContext:promote_cwd() + local cwd = self.cwd:get() + local install_path = self.package:get_install_path() + if install_path == cwd then + log.fmt_debug("cwd %s is already promoted (at %s)", cwd, install_path) + return + end + log.fmt_debug("Promoting cwd %s to %s", cwd, install_path) + -- 1. Unlink any existing installation + self.handle.package:unlink() + -- 2. Prepare for renaming cwd to destination + if platform.is_unix then + -- Some Unix systems will raise an error when renaming a directory to a destination that does not already exist. + fs.async.mkdir(install_path) + end + -- 3. Move the cwd to the final installation directory + fs.async.rename(cwd, install_path) + -- 4. Update cwd + self.cwd:set(install_path) +end + +---@param rel_path string @The relative path from the current working directory to change cwd to. Will only restore to the initial cwd after execution of fn (if provided). +---@param fn async fun() @(optional) The function to run in the context of the given path. +function InstallContext:chdir(rel_path, fn) + local old_cwd = self.cwd:get() + self.cwd:set(path.concat { old_cwd, rel_path }) + if fn then + local ok, result = pcall(fn) + self.cwd:set(old_cwd) + if not ok then + error(result, 0) + end + return result + end +end + +---@param new_executable_rel_path string @Relative path to the executable file to create. +---@param script_rel_path string @Relative path to the Node.js script. +function InstallContext:write_node_exec_wrapper(new_executable_rel_path, script_rel_path) + return self:write_shell_exec_wrapper( + new_executable_rel_path, + ("node %q"):format(path.concat { + self.package:get_install_path(), + script_rel_path, + }) + ) +end + +---@param new_executable_rel_path string @Relative path to the executable file to create. +---@param target_executable_rel_path string +function InstallContext:write_exec_wrapper(new_executable_rel_path, target_executable_rel_path) + return self:write_shell_exec_wrapper( + new_executable_rel_path, + ("%q"):format(path.concat { + self.package:get_install_path(), + target_executable_rel_path, + }) + ) +end + +---@param new_executable_rel_path string @Relative path to the executable file to create. +---@param command string @The shell command to run. +---@return string @The created executable filename. +function InstallContext:write_shell_exec_wrapper(new_executable_rel_path, command) + return platform.when { + unix = function() + local std = require "mason-core.managers.std" + self.fs:write_file( + new_executable_rel_path, + _.dedent(([[ + #!/bin/bash + exec %s "$@" + ]]):format(command)) + ) + std.chmod("+x", { new_executable_rel_path }) + return new_executable_rel_path + end, + win = function() + local executable_file = ("%s.cmd"):format(new_executable_rel_path) + self.fs:write_file( + executable_file, + _.dedent(([[ + @ECHO off + %s %%* + ]]):format(command)) + ) + return executable_file + end, + } +end + +function InstallContext:link_bin(executable, rel_path) + self.receipt:with_link("bin", executable, rel_path) +end + +---@param patches string[] +function InstallContext:apply_patches(patches) + for _, patch in ipairs(patches) do + self.spawn.patch { + "-g", + "0", + "-f", + on_spawn = function(_, stdio) + local stdin = stdio[1] + stdin:write(patch) + stdin:close() + end, + } + end +end + +return InstallContext diff --git a/lua/mason-core/installer/handle.lua b/lua/mason-core/installer/handle.lua new file mode 100644 index 00000000..459e3704 --- /dev/null +++ b/lua/mason-core/installer/handle.lua @@ -0,0 +1,214 @@ +local a = require "mason-core.async" +local spawn = require "mason-core.spawn" +local _ = require "mason-core.functional" +local process = require "mason-core.process" +local EventEmitter = require "mason-core.EventEmitter" +local log = require "mason-core.log" +local Optional = require "mason-core.optional" +local platform = require "mason-core.platform" + +local uv = vim.loop + +---@alias InstallHandleState +--- | '"IDLE"' +--- | '"QUEUED"' +--- | '"ACTIVE"' +--- | '"CLOSED"' + +---@class InstallHandleSpawnInfo +---@field handle luv_handle +---@field pid integer +---@field cmd string +---@field args string[] +local InstallHandleSpawnInfo = {} +InstallHandleSpawnInfo.__index = InstallHandleSpawnInfo + +---@param fields InstallHandleSpawnInfo +function InstallHandleSpawnInfo.new(fields) + return setmetatable(fields, InstallHandleSpawnInfo) +end + +function InstallHandleSpawnInfo:__tostring() + return ("%s %s"):format(self.cmd, table.concat(self.args, " ")) +end + +---@class InstallHandle : EventEmitter +---@field package Package +---@field state InstallHandleState +---@field stdio { buffers: { stdout: string[], stderr: string[] }, sink: StdioSink } +---@field is_terminated boolean +---@field private spawninfo_stack InstallHandleSpawnInfo[] +local InstallHandle = setmetatable({}, { __index = EventEmitter }) +local InstallHandleMt = { __index = InstallHandle } + +---@param handle InstallHandle +local function new_sink(handle) + local stdout, stderr = {}, {} + return { + buffers = { stdout = stdout, stderr = stderr }, + sink = { + stdout = function(chunk) + stdout[#stdout + 1] = chunk + handle:emit("stdout", chunk) + end, + stderr = function(chunk) + stderr[#stderr + 1] = chunk + handle:emit("stderr", chunk) + end, + }, + } +end + +---@param pkg Package +function InstallHandle.new(pkg) + local self = EventEmitter.init(setmetatable({}, InstallHandleMt)) + self.state = "IDLE" + self.package = pkg + self.spawninfo_stack = {} + self.stdio = new_sink(self) + self.is_terminated = false + return self +end + +---@param luv_handle luv_handle +---@param pid integer +---@param cmd string +---@param args string[] +function InstallHandle:push_spawninfo(luv_handle, pid, cmd, args) + local spawninfo = InstallHandleSpawnInfo.new { + handle = luv_handle, + pid = pid, + cmd = cmd, + args = args, + } + log.fmt_trace("Pushing spawninfo stack for %s: %s (pid: %s)", self, spawninfo, pid) + self.spawninfo_stack[#self.spawninfo_stack + 1] = spawninfo + self:emit "spawninfo:change" +end + +---@param luv_handle luv_handle +function InstallHandle:pop_spawninfo(luv_handle) + for i = #self.spawninfo_stack, 1, -1 do + if self.spawninfo_stack[i].handle == luv_handle then + log.fmt_trace("Popping spawninfo stack for %s: %s", self, self.spawninfo_stack[i]) + table.remove(self.spawninfo_stack, i) + self:emit "spawninfo:change" + return true + end + end + return false +end + +---@return Optional @Optional +function InstallHandle:peek_spawninfo_stack() + return Optional.of_nilable(self.spawninfo_stack[#self.spawninfo_stack]) +end + +function InstallHandle:is_idle() + return self.state == "IDLE" +end + +function InstallHandle:is_queued() + return self.state == "QUEUED" +end + +function InstallHandle:is_active() + return self.state == "ACTIVE" +end + +function InstallHandle:is_closed() + return self.state == "CLOSED" +end + +---@param new_state InstallHandleState +function InstallHandle:set_state(new_state) + local old_state = self.state + self.state = new_state + log.fmt_trace("Changing %s state from %s to %s", self, old_state, new_state) + self:emit("state:change", new_state, old_state) +end + +---@param signal integer +function InstallHandle:kill(signal) + assert(not self:is_closed(), "Cannot kill closed handle.") + log.fmt_trace("Sending signal %s to luv handles in %s", signal, self) + for _, spawninfo in pairs(self.spawninfo_stack) do + process.kill(spawninfo.handle, signal) + end + self:emit("kill", signal) +end + +---@param pid integer +local win_taskkill = a.scope(function(pid) + spawn.taskkill { + "/f", + "/t", + "/pid", + pid, + } +end) + +function InstallHandle:terminate() + assert(not self:is_closed(), "Cannot terminate closed handle.") + if self.is_terminated then + log.fmt_trace("Handle is already terminated %s", self) + return + end + log.fmt_trace("Terminating %s", self) + -- https://github.com/libuv/libuv/issues/1133 + if platform.is.win then + for _, spawninfo in ipairs(self.spawninfo_stack) do + win_taskkill(spawninfo.pid) + end + else + self:kill(15) -- SIGTERM + end + self.is_terminated = true + self:emit "terminate" + local check = uv.new_check() + check:start(function() + for _, spawninfo in ipairs(self.spawninfo_stack) do + local luv_handle = spawninfo.handle + local ok, is_closing = pcall(luv_handle.is_closing, luv_handle) + if ok and not is_closing then + return + end + end + check:stop() + if not self:is_closed() then + self:close() + end + end) +end + +function InstallHandle:queued() + assert(self:is_idle(), "Can only queue idle handles.") + self:set_state "QUEUED" +end + +function InstallHandle:active() + assert(self:is_idle() or self:is_queued(), "Can only activate idle or queued handles.") + self:set_state "ACTIVE" +end + +function InstallHandle:close() + log.fmt_trace("Closing %s", self) + assert(not self:is_closed(), "Handle is already closed.") + for _, spawninfo in ipairs(self.spawninfo_stack) do + local luv_handle = spawninfo.handle + local ok, is_closing = pcall(luv_handle.is_closing, luv_handle) + if ok then + assert(is_closing, "There are open libuv handles.") + end + end + self.spawninfo_stack = {} + self:set_state "CLOSED" + self:emit "closed" + self:clear_event_handlers() +end + +function InstallHandleMt:__tostring() + return ("InstallHandle(package=%s, state=%s)"):format(self.package, self.state) +end + +return InstallHandle diff --git a/lua/mason-core/installer/init.lua b/lua/mason-core/installer/init.lua new file mode 100644 index 00000000..ecf4f2f0 --- /dev/null +++ b/lua/mason-core/installer/init.lua @@ -0,0 +1,176 @@ +local log = require "mason-core.log" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local fs = require "mason-core.fs" +local a = require "mason-core.async" +local Result = require "mason-core.result" +local InstallContext = require "mason-core.installer.context" +local settings = require "mason.settings" +local linker = require "mason-core.installer.linker" +local control = require "mason-core.async.control" + +local Semaphore = control.Semaphore + +local sem = Semaphore.new(settings.current.max_concurrent_installers) + +local M = {} + +---@async +local function create_prefix_dirs() + for _, p in ipairs { path.install_prefix(), path.bin_prefix(), path.package_prefix(), path.package_build_prefix() } do + if not fs.async.dir_exists(p) then + fs.async.mkdirp(p) + end + end +end + +---@async +---@param context InstallContext +local function write_receipt(context) + log.fmt_debug("Writing receipt for %s", context.package) + context.receipt + :with_name(context.package.name) + :with_schema_version("1.0") + :with_completion_time(vim.loop.gettimeofday()) + local receipt_path = path.concat { context.cwd:get(), "mason-receipt.json" } + local install_receipt = context.receipt:build() + fs.async.write_file(receipt_path, vim.json.encode(install_receipt)) +end + +local CONTEXT_REQUEST = {} + +---@return InstallContext +function M.context() + return coroutine.yield(CONTEXT_REQUEST) +end + +---@async +---@param context InstallContext +function M.prepare_installer(context) + create_prefix_dirs() + local package_build_prefix = path.package_build_prefix(context.package.name) + if fs.async.dir_exists(package_build_prefix) then + fs.async.rmrf(package_build_prefix) + end + fs.async.mkdirp(package_build_prefix) + context.cwd:set(package_build_prefix) +end + +---@async +---@param context InstallContext +---@param installer async fun(context: InstallContext) +function M.run_installer(context, installer) + local thread = coroutine.create(function(...) + -- We wrap the installer with a function to allow it to be a spy instance (in which case it's not a function, but a metatable - coroutine.create expects functions only) + return installer(...) + end) + local step + local ret_val + step = function(...) + local ok, result = coroutine.resume(thread, ...) + if not ok then + error(result, 0) + elseif result == CONTEXT_REQUEST then + step(context) + elseif coroutine.status(thread) == "suspended" then + -- yield to parent coroutine + step(coroutine.yield(result)) + else + ret_val = result + end + end + context.receipt:with_start_time(vim.loop.gettimeofday()) + M.prepare_installer(context) + step(context) + return ret_val +end + +---@async +---@param handle InstallHandle +---@param opts InstallContextOpts +function M.execute(handle, opts) + if handle:is_active() or handle:is_closed() then + log.fmt_debug("Received active or closed handle %s", handle) + return Result.failure "Invalid handle state." + end + + handle:queued() + local permit = sem:acquire() + if handle:is_closed() then + permit:forget() + log.fmt_trace("Installation was aborted %s", handle) + return Result.failure "Installation was aborted." + end + log.fmt_trace("Activating handle %s", handle) + handle:active() + + local pkg = handle.package + local context = InstallContext.new(handle, opts) + + log.fmt_info("Executing installer for %s", pkg) + return Result.run_catching(function() + -- 1. run installer + a.wait(function(resolve, reject) + local cancel_thread = a.run(M.run_installer, function(success, result) + if success then + resolve(result) + else + reject(result) + end + end, context, pkg.spec.install) + + handle:once("terminate", function() + handle:once("closed", function() + reject "Installation was aborted." + end) + cancel_thread() + end) + end) + + -- 2. promote temporary installation dir + context:promote_cwd() + + -- 3. link package + linker.link(context) + + -- 4. write receipt + write_receipt(context) + end) + :on_success(function() + permit:forget() + handle:close() + log.fmt_info("Installation succeeded for %s", pkg) + end) + :on_failure(function(failure) + permit:forget() + log.fmt_error("Installation failed for %s error=%s", pkg, failure) + context.stdio_sink.stderr(tostring(failure)) + context.stdio_sink.stderr "\n" + + -- clean up installation dir + pcall(function() + fs.async.rmrf(context.cwd:get()) + end) + + -- unlink linked executables (in the rare occassion an error occurs after linking) + linker.unlink(context.package, context.receipt.links) + + if not handle:is_closed() and not handle.is_terminated then + handle:close() + end + end) +end + +---Runs the provided async functions concurrently and returns their result, once all are resolved. +---This is really just a wrapper around a.wait_all() that makes sure to patch the coroutine context before creating the +---new async execution contexts. +---@async +---@param suspend_fns async fun(ctx: InstallContext)[] +function M.run_concurrently(suspend_fns) + local context = M.context() + return a.wait_all(_.map(function(suspend_fn) + return _.partial(M.run_installer, context, suspend_fn) + end, suspend_fns)) +end + +return M diff --git a/lua/mason-core/installer/linker.lua b/lua/mason-core/installer/linker.lua new file mode 100644 index 00000000..0419f392 --- /dev/null +++ b/lua/mason-core/installer/linker.lua @@ -0,0 +1,84 @@ +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local log = require "mason-core.log" +local fs = require "mason-core.fs" + +local M = {} + +---@param pkg Package +---@param links InstallReceiptLinks +local function unlink_bin(pkg, links) + for executable in pairs(links.bin) do + local bin_path = path.bin_prefix(executable) + fs.sync.unlink(bin_path) + end +end + +---@param pkg Package +---@param links InstallReceiptLinks +function M.unlink(pkg, links) + log.fmt_debug("Unlinking %s", pkg) + unlink_bin(pkg, links) +end + +---@param to string +local function relative_path_from_bin(to) + local _, match_end = to:find(path.install_prefix(), 1, true) + assert(match_end, "Failed to produce relative path.") + local relative_path = to:sub(match_end + 1) + return ".." .. relative_path +end + +---@async +---@param context InstallContext +local function link_bin(context) + local links = context.receipt.links.bin + local pkg = context.package + for name, rel_path in pairs(links) do + local target_abs_path = path.concat { pkg:get_install_path(), rel_path } + local target_rel_path = relative_path_from_bin(target_abs_path) + local bin_path = path.bin_prefix(name) + + assert(not fs.async.file_exists(bin_path), ("bin/%s is already linked."):format(name)) + assert(fs.async.file_exists(target_abs_path), ("Link target %q does not exist."):format(target_abs_path)) + + log.fmt_debug("Linking bin %s to %s", name, target_rel_path) + + platform.when { + unix = function() + fs.async.symlink(target_rel_path, bin_path) + end, + win = function() + -- We don't "symlink" on Windows because: + -- 1) .LNK is not commonly found in PATHEXT + -- 2) some executables can only run from their true installation location + -- 3) many utilities only consider .COM, .EXE, .CMD, .BAT files as candidates by default when resolving executables (e.g. neovim's |exepath()| and |executable()|) + fs.async.write_file( + ("%s.cmd"):format(bin_path), + _.dedent(([[ + @ECHO off + GOTO start + :find_dp0 + SET dp0=%%~dp0 + EXIT /b + :start + SETLOCAL + CALL :find_dp0 + + endLocal & goto #_undefined_# 2>NUL || title %%COMSPEC%% & "%%dp0%%\%s" %%* + ]]):format(target_rel_path)) + ) + end, + } + end +end + +---@async +---@param context InstallContext +function M.link(context) + log.fmt_debug("Linking %s", context.package) + link_bin(context) +end + +return M diff --git a/lua/mason-core/log.lua b/lua/mason-core/log.lua new file mode 100644 index 00000000..a2593a56 --- /dev/null +++ b/lua/mason-core/log.lua @@ -0,0 +1,174 @@ +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local settings = require "mason.settings" +local platform = require "mason-core.platform" + +local config = { + -- Name of the plugin. Prepended to log messages + name = "mason", + + -- Should print the output to neovim while running + -- values: 'sync','async',false + use_console = platform.is_headless, + + -- Should highlighting be used in console (using echohl) + highlights = true, + + -- Should write to a file + use_file = true, + + -- Level configuration + modes = { + { name = "trace", hl = "Comment", level = vim.log.levels.TRACE }, + { name = "debug", hl = "Comment", level = vim.log.levels.DEBUG }, + { name = "info", hl = "None", level = vim.log.levels.INFO }, + { name = "warn", hl = "WarningMsg", level = vim.log.levels.WARN }, + { name = "error", hl = "ErrorMsg", level = vim.log.levels.ERROR }, + }, + + -- Can limit the number of decimals displayed for floats + float_precision = 0.01, +} + +local log = { + outfile = path.concat { + vim.fn.stdpath "cache", -- TODO use "log" when stable + ("%s.log"):format(config.name), + }, +} + +local unpack = unpack or table.unpack + +do + local round = function(x, increment) + increment = increment or 1 + x = x / increment + return (x > 0 and math.floor(x + 0.5) or math.ceil(x - 0.5)) * increment + end + + local tbl_has_tostring = function(tbl) + local mt = getmetatable(tbl) + return mt and mt.__tostring ~= nil + end + + local make_string = function(...) + local t = {} + for i = 1, select("#", ...) do + local x = select(i, ...) + + if type(x) == "number" and config.float_precision then + x = tostring(round(x, config.float_precision)) + elseif type(x) == "table" and not tbl_has_tostring(x) then + x = vim.inspect(x) + else + x = tostring(x) + end + + t[#t + 1] = x + end + return table.concat(t, " ") + end + + local log_at_level = function(level_config, message_maker, ...) + -- Return early if we're below the current_log_level + if level_config.level < settings.current.log_level then + return + end + local nameupper = level_config.name:upper() + + local msg = message_maker(...) + local info = debug.getinfo(config.info_level or 2, "Sl") + local lineinfo = info.short_src .. ":" .. info.currentline + + -- Output to console + if config.use_console then + local log_to_console = function() + local console_string = string.format("[%-6s%s] %s: %s", nameupper, os.date "%H:%M:%S", lineinfo, msg) + + if config.highlights and level_config.hl then + vim.cmd(string.format("echohl %s", level_config.hl)) + end + + local split_console = vim.split(console_string, "\n") + for _, v in ipairs(split_console) do + local formatted_msg = string.format("[%s] %s", config.name, vim.fn.escape(v, [["\]])) + + local ok = pcall(vim.cmd, string.format([[echom "%s"]], formatted_msg)) + if not ok then + vim.api.nvim_out_write(msg .. "\n") + end + end + + if config.highlights and level_config.hl then + vim.cmd "echohl NONE" + end + end + if config.use_console == "sync" and not vim.in_fast_event() then + log_to_console() + else + vim.schedule(log_to_console) + end + end + + -- Output to log file + if config.use_file then + local fp = assert(io.open(log.outfile, "a")) + local str = string.format("[%-6s%s] %s: %s\n", nameupper, os.date(), lineinfo, msg) + fp:write(str) + fp:close() + end + end + + for __, x in ipairs(config.modes) do + -- log.info("these", "are", "separated") + log[x.name] = function(...) + return log_at_level(x, make_string, ...) + end + + -- log.fmt_info("These are %s strings", "formatted") + log[("fmt_%s"):format(x.name)] = function(...) + return log_at_level(x, function(...) + local passed = { ... } + local fmt = table.remove(passed, 1) + local inspected = {} + for _, v in ipairs(passed) do + if type(v) == "table" and tbl_has_tostring(v) then + table.insert(inspected, v) + else + table.insert(inspected, vim.inspect(v)) + end + end + return string.format(fmt, unpack(inspected)) + end, ...) + end + + -- log.lazy_info(expensive_to_calculate) + log[("lazy_%s"):format(x.name)] = function(f) + return log_at_level(x, function() + local passed = _.table_pack(f()) + local fmt = table.remove(passed, 1) + local inspected = {} + for _, v in ipairs(passed) do + if type(v) == "table" and tbl_has_tostring(v) then + table.insert(inspected, v) + else + table.insert(inspected, vim.inspect(v)) + end + end + return string.format(fmt, unpack(inspected)) + end) + end + + -- log.file_info("do not print") + log[("file_%s"):format(x.name)] = function(vals, override) + local original_console = config.use_console + config.use_console = false + config.info_level = override.info_level + log_at_level(x, make_string, unpack(vals)) + config.use_console = original_console + config.info_level = nil + end + end +end + +return log diff --git a/lua/mason-core/managers/cargo/client.lua b/lua/mason-core/managers/cargo/client.lua new file mode 100644 index 00000000..3df7550b --- /dev/null +++ b/lua/mason-core/managers/cargo/client.lua @@ -0,0 +1,14 @@ +local fetch = require "mason-core.fetch" + +local M = {} + +---@alias CrateResponse {crate: {id: string, max_stable_version: string, max_version: string, newest_version: string}} + +---@async +---@param crate string +---@return Result @of Crate +function M.fetch_crate(crate) + return fetch(("https://crates.io/api/v1/crates/%s"):format(crate)):map_catching(vim.json.decode) +end + +return M diff --git a/lua/mason-core/managers/cargo/init.lua b/lua/mason-core/managers/cargo/init.lua new file mode 100644 index 00000000..5b87667c --- /dev/null +++ b/lua/mason-core/managers/cargo/init.lua @@ -0,0 +1,140 @@ +local process = require "mason-core.process" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local spawn = require "mason-core.spawn" +local a = require "mason-core.async" +local Optional = require "mason-core.optional" +local installer = require "mason-core.installer" +local client = require "mason-core.managers.cargo.client" +local _ = require "mason-core.functional" + +local get_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity)) + +---@param crate string +local function with_receipt(crate) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.cargo(crate)) + end +end + +local M = {} + +---@async +---@param crate string The crate to install. +---@param opts {git: boolean | string, features: string|nil, bin: string[] | nil } | nil +function M.crate(crate, opts) + return function() + M.install(crate, opts).with_receipt() + end +end + +---@async +---@param crate string The crate to install. +---@param opts {git: boolean | string, features: string|nil, bin: string[] | nil } | nil +function M.install(crate, opts) + local ctx = installer.context() + opts = opts or {} + ctx.requested_version:if_present(function() + assert(not opts.git, "Providing a version when installing a git crate is not allowed.") + end) + + local final_crate = crate + + if opts.git then + final_crate = { "--git" } + if type(opts.git) == "string" then + table.insert(final_crate, opts.git) + end + table.insert(final_crate, crate) + end + + ctx.spawn.cargo { + "install", + "--root", + ".", + "--locked", + ctx.requested_version + :map(function(version) + return { "--version", version } + end) + :or_else(vim.NIL), + opts.features and { "--features", opts.features } or vim.NIL, + final_crate, + } + + if opts.bin then + _.each(function(bin) + ctx:link_bin(bin, get_bin_path(bin)) + end, opts.bin) + end + + return { + with_receipt = with_receipt(crate), + } +end + +---@param output string @The `cargo install --list` output. +---@return table @Key is the crate name, value is its version. +function M.parse_installed_crates(output) + local installed_crates = {} + for _, line in ipairs(vim.split(output, "\n")) do + local name, version = line:match "^(.+)%s+v([.%S]+)[%s:]" + if name and version then + installed_crates[name] = version + end + end + return installed_crates +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + return M.get_installed_primary_package_version(receipt, install_dir):map_catching(function(installed_version) + ---@type CrateResponse + local crate_response = client.fetch_crate(receipt.primary_source.package):get_or_throw() + if installed_version ~= crate_response.crate.max_stable_version then + return { + name = receipt.primary_source.package, + current_version = installed_version, + latest_version = crate_response.crate.max_stable_version, + } + else + error "Primary package is not outdated." + end + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + return spawn + .cargo({ + "install", + "--list", + "--root", + ".", + cwd = install_dir, + }) + :map_catching(function(result) + local installed_crates = M.parse_installed_crates(result.stdout) + if vim.in_fast_event() then + a.scheduler() -- needed because vim.fn.* call + end + local pkg = vim.fn.fnamemodify(receipt.primary_source.package, ":t") + return Optional.of_nilable(installed_crates[pkg]):or_else_throw "Failed to find cargo package version." + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { path.concat { install_dir, "bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/composer/init.lua b/lua/mason-core/managers/composer/init.lua new file mode 100644 index 00000000..96ab5f14 --- /dev/null +++ b/lua/mason-core/managers/composer/init.lua @@ -0,0 +1,135 @@ +local _ = require "mason-core.functional" +local process = require "mason-core.process" +local path = require "mason-core.path" +local Result = require "mason-core.result" +local spawn = require "mason-core.spawn" +local Optional = require "mason-core.optional" +local installer = require "mason-core.installer" +local platform = require "mason-core.platform" + +local M = {} + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "vendor", "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.bat", _.identity)) + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + + ctx.receipt:with_primary_source(ctx.receipt.composer(packages[1])) + for i = 2, #packages do + ctx.receipt:with_secondary_source(ctx.receipt.composer(packages[i])) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The composer packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + return M.require(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The composer packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.require(packages) + local ctx = installer.context() + local pkgs = _.list_copy(packages) + + if not ctx.fs:file_exists "composer.json" then + ctx.spawn.composer { "init", "--no-interaction", "--stability=stable" } + end + + ctx.requested_version:if_present(function(version) + pkgs[1] = ("%s:%s"):format(pkgs[1], version) + end) + + ctx.spawn.composer { "require", pkgs } + + if packages.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +---@async +function M.install() + local ctx = installer.context() + ctx.spawn.composer { + "install", + "--no-interaction", + "--no-dev", + "--optimize-autoloader", + "--classmap-authoritative", + } +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + if receipt.primary_source.type ~= "composer" then + return Result.failure "Receipt does not have a primary source of type composer" + end + return spawn + .composer({ + "outdated", + "--no-interaction", + "--format=json", + cwd = install_dir, + }) + :map_catching(function(result) + local outdated_packages = vim.json.decode(result.stdout) + local outdated_package = _.find_first(function(pkg) + return pkg.name == receipt.primary_source.package + end, outdated_packages.installed) + return Optional.of_nilable(outdated_package) + :map(function(pkg) + if pkg.version ~= pkg.latest then + return { + name = pkg.name, + current_version = pkg.version, + latest_version = pkg.latest, + } + end + end) + :or_else_throw "Primary package is not outdated." + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + if receipt.primary_source.type ~= "composer" then + return Result.failure "Receipt does not have a primary source of type composer" + end + return spawn + .composer({ + "info", + "--format=json", + receipt.primary_source.package, + cwd = install_dir, + }) + :map_catching(function(result) + local info = vim.json.decode(result.stdout) + return info.versions[1] + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { path.concat { install_dir, "vendor", "bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/dotnet/init.lua b/lua/mason-core/managers/dotnet/init.lua new file mode 100644 index 00000000..f89d61ca --- /dev/null +++ b/lua/mason-core/managers/dotnet/init.lua @@ -0,0 +1,64 @@ +local process = require "mason-core.process" +local installer = require "mason-core.installer" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" + +local M = {} + +local create_bin_path = _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity) + +---@param package string +local function with_receipt(package) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.dotnet(package)) + end +end + +---@async +---@param pkg string +---@param opt { bin: string[] | nil } | nil +function M.package(pkg, opt) + return function() + return M.install(pkg, opt).with_receipt() + end +end + +---@async +---@param pkg string +---@param opt { bin: string[] | nil } | nil +function M.install(pkg, opt) + local ctx = installer.context() + ctx.spawn.dotnet { + "tool", + "update", + "--tool-path", + ".", + ctx.requested_version + :map(function(version) + return { "--version", version } + end) + :or_else(vim.NIL), + pkg, + } + + if opt and opt.bin then + if opt.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, opt.bin) + end + end + + return { + with_receipt = with_receipt(pkg), + } +end + +function M.env(root_dir) + return { + PATH = process.extend_path { root_dir }, + } +end + +return M diff --git a/lua/mason-core/managers/gem/init.lua b/lua/mason-core/managers/gem/init.lua new file mode 100644 index 00000000..11019985 --- /dev/null +++ b/lua/mason-core/managers/gem/init.lua @@ -0,0 +1,159 @@ +local _ = require "mason-core.functional" +local process = require "mason-core.process" +local path = require "mason-core.path" +local Result = require "mason-core.result" +local spawn = require "mason-core.spawn" +local Optional = require "mason-core.optional" +local installer = require "mason-core.installer" +local platform = require "mason-core.platform" + +local M = {} + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.cmd", _.identity)) + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.gem(packages[1])) + for i = 2, #packages do + ctx.receipt:with_secondary_source(ctx.receipt.gem(packages[i])) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The Gem packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + return M.install(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The Gem packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.install(packages) + local ctx = installer.context() + local pkgs = _.list_copy(packages or {}) + + ctx.requested_version:if_present(function(version) + pkgs[1] = ("%s:%s"):format(pkgs[1], version) + end) + + ctx.spawn.gem { + "install", + "--no-user-install", + "--install-dir=.", + "--bindir=bin", + "--no-document", + pkgs, + } + + if packages.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +---@alias GemOutdatedPackage {name:string, current_version: string, latest_version: string} + +---Parses a string input like "package (0.1.0 < 0.2.0)" into its components +---@param outdated_gem string +---@return GemOutdatedPackage +function M.parse_outdated_gem(outdated_gem) + local package_name, version_expression = outdated_gem:match "^(.+) %((.+)%)" + if not package_name or not version_expression then + -- unparseable + return nil + end + local current_version, latest_version = unpack(vim.split(version_expression, "<")) + + ---@type GemOutdatedPackage + local outdated_package = { + name = vim.trim(package_name), + current_version = vim.trim(current_version), + latest_version = vim.trim(latest_version), + } + return outdated_package +end + +---Parses the stdout of the `gem list` command into a table +---@param output string +function M.parse_gem_list_output(output) + ---@type table + local gem_versions = {} + for _, line in ipairs(vim.split(output, "\n")) do + local gem_package, version = line:match "^(%S+) %((%S+)%)$" + if gem_package and version then + gem_versions[gem_package] = version + end + end + return gem_versions +end + +local function not_empty(s) + return s ~= nil and s ~= "" +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + if receipt.primary_source.type ~= "gem" then + return Result.failure "Receipt does not have a primary source of type gem" + end + return spawn.gem({ "outdated", cwd = install_dir, env = M.env(install_dir) }):map_catching(function(result) + ---@type string[] + local lines = vim.split(result.stdout, "\n") + local outdated_gems = vim.tbl_map(M.parse_outdated_gem, vim.tbl_filter(not_empty, lines)) + + local outdated_gem = _.find_first(function(gem) + return gem.name == receipt.primary_source.package and gem.current_version ~= gem.latest_version + end, outdated_gems) + + return Optional.of_nilable(outdated_gem) + :map(function(gem) + return { + name = receipt.primary_source.package, + current_version = assert(gem.current_version), + latest_version = assert(gem.latest_version), + } + end) + :or_else_throw "Primary package is not outdated." + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + return spawn + .gem({ + "list", + cwd = install_dir, + env = M.env(install_dir), + }) + :map_catching(function(result) + local gems = M.parse_gem_list_output(result.stdout) + return Optional.of_nilable(gems[receipt.primary_source.package]) + :or_else_throw "Failed to find gem package version." + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + GEM_HOME = install_dir, + GEM_PATH = install_dir, + PATH = process.extend_path { path.concat { install_dir, "bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/git/init.lua b/lua/mason-core/managers/git/init.lua new file mode 100644 index 00000000..432d18f4 --- /dev/null +++ b/lua/mason-core/managers/git/init.lua @@ -0,0 +1,76 @@ +local spawn = require "mason-core.spawn" +local Result = require "mason-core.result" +local installer = require "mason-core.installer" +local _ = require "mason-core.functional" + +local M = {} + +---@param repo string +local function with_receipt(repo) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.git_remote(repo)) + end +end + +---@async +---@param opts {[1]: string, recursive: boolean, version: Optional|nil} @The first item in the table is the repository to clone. +function M.clone(opts) + local ctx = installer.context() + local repo = assert(opts[1], "No git URL provided.") + ctx.spawn.git { + "clone", + "--depth", + "1", + opts.recursive and "--recursive" or vim.NIL, + repo, + ".", + } + _.coalesce(opts.version, ctx.requested_version):if_present(function(version) + ctx.spawn.git { "fetch", "--depth", "1", "origin", version } + ctx.spawn.git { "checkout", "FETCH_HEAD" } + end) + + return { + with_receipt = with_receipt(repo), + } +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_git_clone(receipt, install_dir) + if receipt.primary_source.type ~= "git" then + return Result.failure "Receipt does not have a primary source of type git" + end + return spawn.git({ "fetch", "origin", "HEAD", cwd = install_dir }):map_catching(function() + local result = spawn.git({ "rev-parse", "FETCH_HEAD", "HEAD", cwd = install_dir }):get_or_throw() + local remote_head, local_head = unpack(vim.split(result.stdout, "\n")) + if remote_head == local_head then + error("Git clone is up to date.", 2) + end + return { + name = receipt.primary_source.remote, + current_version = assert(local_head), + latest_version = assert(remote_head), + } + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_revision(receipt, install_dir) + return spawn + .git({ + "rev-parse", + "--short", + "HEAD", + cwd = install_dir, + }) + :map_catching(function(result) + return assert(vim.trim(result.stdout)) + end) +end + +return M diff --git a/lua/mason-core/managers/github/client.lua b/lua/mason-core/managers/github/client.lua new file mode 100644 index 00000000..1bcede7a --- /dev/null +++ b/lua/mason-core/managers/github/client.lua @@ -0,0 +1,117 @@ +local _ = require "mason-core.functional" +local log = require "mason-core.log" +local fetch = require "mason-core.fetch" +local spawn = require "mason-core.spawn" + +local M = {} + +---@alias GitHubReleaseAsset {url: string, id: integer, name: string, browser_download_url: string, created_at: string, updated_at: string, size: integer, download_count: integer} +---@alias GitHubRelease {tag_name: string, prerelease: boolean, draft: boolean, assets:GitHubReleaseAsset[]} +---@alias GitHubTag {name: string} + +---@param path string +---@return Result @JSON decoded response. +local function api_call(path) + return spawn + .gh({ "api", path }) + :map(_.prop "stdout") + :recover_catching(function() + return fetch(("https://api.github.com/%s"):format(path)):get_or_throw() + end) + :map_catching(vim.json.decode) +end + +---@async +---@param repo string @The GitHub repo ("username/repo"). +---@return Result @of GitHubRelease[] +function M.fetch_releases(repo) + log.fmt_trace("Fetching GitHub releases for repo=%s", repo) + local path = ("repos/%s/releases"):format(repo) + return api_call(path):map_err(function() + return ("Failed to fetch releases for GitHub repository %s."):format(repo) + end) +end + +---@async +---@param repo string @The GitHub repo ("username/repo"). +---@param tag_name string @The tag_name of the release to fetch. +function M.fetch_release(repo, tag_name) + log.fmt_trace("Fetching GitHub release for repo=%s, tag_name=%s", repo, tag_name) + local path = ("repos/%s/releases/tags/%s"):format(repo, tag_name) + return api_call(path):map_err(function() + return ("Failed to fetch release %q for GitHub repository %s."):format(tag_name, repo) + end) +end + +---@param opts {include_prerelease: boolean, tag_name_pattern: string} +function M.release_predicate(opts) + local is_not_draft = _.prop_eq("draft", false) + local is_not_prerelease = _.prop_eq("prerelease", false) + local tag_name_matches = _.prop_satisfies(_.matches(opts.tag_name_pattern), "tag_name") + + return _.all_pass { + _.if_else(_.always(opts.include_prerelease), _.T, is_not_prerelease), + _.if_else(_.always(opts.tag_name_pattern), tag_name_matches, _.T), + is_not_draft, + } +end + +---@alias FetchLatestGithubReleaseOpts {tag_name_pattern:string|nil, include_prerelease: boolean} + +---@async +---@param repo string @The GitHub repo ("username/repo"). +---@param opts FetchLatestGithubReleaseOpts|nil +---@return Result @of GitHubRelease +function M.fetch_latest_release(repo, opts) + opts = opts or { + tag_name_pattern = nil, + include_prerelease = false, + } + return M.fetch_releases(repo):map_catching( + ---@param releases GitHubRelease[] + function(releases) + local is_stable_release = M.release_predicate(opts) + ---@type GitHubRelease|nil + local latest_release = _.find_first(is_stable_release, releases) + + if not latest_release then + log.fmt_info("Failed to find latest release. repo=%s, opts=%s", repo, opts) + error "Failed to find latest release." + end + + log.fmt_debug("Resolved latest version repo=%s, tag_name=%s", repo, latest_release.tag_name) + return latest_release + end + ) +end + +---@async +---@param repo string @The GitHub repo ("username/repo"). +---@return Result @of GitHubTag[] +function M.fetch_tags(repo) + local path = ("repos/%s/tags"):format(repo) + return api_call(path):map_err(function() + return ("Failed to fetch tags for GitHub repository %s."):format(repo) + end) +end + +---@async +---@param repo string @The GitHub repo ("username/repo"). +---@return Result @Result - The latest tag name. +function M.fetch_latest_tag(repo) + -- https://github.com/williamboman/vercel-github-api-latest-tag-proxy + return fetch(("https://latest-github-tag.redwill.se/api/latest-tag?repo=%s"):format(repo)) + :map_catching(vim.json.decode) + :map(_.prop "tag") +end + +---@alias GitHubRateLimit {limit: integer, remaining: integer, reset: integer, used: integer} +---@alias GitHubRateLimitResponse {resources: { core: GitHubRateLimit }} + +---@async +--@return Result @of GitHubRateLimitResponse +function M.fetch_rate_limit() + return api_call "rate_limit" +end + +return M diff --git a/lua/mason-core/managers/github/init.lua b/lua/mason-core/managers/github/init.lua new file mode 100644 index 00000000..55f3600f --- /dev/null +++ b/lua/mason-core/managers/github/init.lua @@ -0,0 +1,171 @@ +local installer = require "mason-core.installer" +local std = require "mason-core.managers.std" +local client = require "mason-core.managers.github.client" +local platform = require "mason-core.platform" +local Result = require "mason-core.result" +local _ = require "mason-core.functional" +local settings = require "mason.settings" + +local M = {} + +---@param repo string +---@param asset_file string +---@param release string +local function with_release_file_receipt(repo, asset_file, release) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source { + type = "github_release_file", + repo = repo, + file = asset_file, + release = release, + } + end +end + +---@param repo string +---@param tag string +local function with_tag_receipt(repo, tag) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source { + type = "github_tag", + repo = repo, + tag = tag, + } + end +end + +---@async +---@param opts {repo: string, version: Optional|nil, asset_file: string|fun(release: string):string} +function M.release_file(opts) + local ctx = installer.context() + local release = _.coalesce(opts.version, ctx.requested_version):or_else_get(function() + return client + .fetch_latest_release(opts.repo) + :map(_.prop "tag_name") + :get_or_throw "Failed to fetch latest release from GitHub API. Refer to :h mason-errors-github-api for more information." + end) + ---@type string + local asset_file + if type(opts.asset_file) == "function" then + asset_file = opts.asset_file(release) + else + asset_file = opts.asset_file + end + if not asset_file then + error( + ( + "Could not find which release file to download.\nMost likely the current operating system, architecture (%s), or libc (%s) is not supported." + ):format(platform.arch, platform.get_libc()), + 0 + ) + end + local download_url = settings.current.github.download_url_template:format(opts.repo, release, asset_file) + return { + release = release, + download_url = download_url, + asset_file = asset_file, + with_receipt = with_release_file_receipt(opts.repo, download_url, release), + } +end + +---@async +---@param opts {repo: string, version: Optional|nil} +function M.tag(opts) + local ctx = installer.context() + local tag = _.coalesce(opts.version, ctx.requested_version):or_else_get(function() + return client.fetch_latest_tag(opts.repo):get_or_throw "Failed to fetch latest tag from GitHub API." + end) + + return { + tag = tag, + with_receipt = with_tag_receipt(opts.repo, tag), + } +end + +---@param filename string +---@param processor async fun(opts: table) +local function release_file_processor(filename, processor) + ---@async + ---@param opts {repo: string, asset_file: string|fun(release: string):string} + return function(opts) + local release_file_source = M.release_file(opts) + std.download_file(release_file_source.download_url, filename) + processor(opts) + return release_file_source + end +end + +M.unzip_release_file = release_file_processor("archive.zip", function() + std.unzip("archive.zip", ".") +end) + +M.untarxz_release_file = release_file_processor("archive.tar.xz", function(opts) + std.untarxz("archive.tar.xz", { strip_components = opts.strip_components }) +end) + +M.untargz_release_file = release_file_processor("archive.tar.gz", function(opts) + std.untar("archive.tar.gz", { strip_components = opts.strip_components }) +end) + +---@async +---@param opts {repo: string, out_file:string, asset_file: string|fun(release: string):string} +function M.download_release_file(opts) + local release_file_source = M.release_file(opts) + std.download_file(release_file_source.download_url, assert(opts.out_file, "out_file is required")) + return release_file_source +end + +---@async +---@param opts {repo: string, out_file:string, asset_file: string|fun(release: string):string} +function M.gunzip_release_file(opts) + local release_file_source = M.release_file(opts) + local gzipped_file = ("%s.gz"):format(assert(opts.out_file, "out_file must be specified")) + std.download_file(release_file_source.download_url, gzipped_file) + std.gunzip(gzipped_file) + return release_file_source +end + +---@async +---@param receipt InstallReceipt +function M.check_outdated_primary_package_release(receipt) + local source = receipt.primary_source + if source.type ~= "github_release" and source.type ~= "github_release_file" then + return Result.failure "Receipt does not have a primary source of type (github_release|github_release_file)." + end + return client.fetch_latest_release(source.repo, { tag_name_pattern = source.tag_name_pattern }):map_catching( + ---@param latest_release GitHubRelease + function(latest_release) + if source.release ~= latest_release.tag_name then + return { + name = source.repo, + current_version = source.release, + latest_version = latest_release.tag_name, + } + end + error "Primary package is not outdated." + end + ) +end + +---@async +---@param receipt InstallReceipt +function M.check_outdated_primary_package_tag(receipt) + local source = receipt.primary_source + if source.type ~= "github_tag" then + return Result.failure "Receipt does not have a primary source of type github_tag." + end + return client.fetch_latest_tag(source.repo):map_catching(function(latest_tag) + if source.tag ~= latest_tag then + return { + name = source.repo, + current_version = source.tag, + latest_version = latest_tag, + } + end + error "Primary package is not outdated." + end) +end + +return M diff --git a/lua/mason-core/managers/go/init.lua b/lua/mason-core/managers/go/init.lua new file mode 100644 index 00000000..dbdfdc45 --- /dev/null +++ b/lua/mason-core/managers/go/init.lua @@ -0,0 +1,171 @@ +local installer = require "mason-core.installer" +local process = require "mason-core.process" +local platform = require "mason-core.platform" +local spawn = require "mason-core.spawn" +local a = require "mason-core.async" +local Optional = require "mason-core.optional" +local _ = require "mason-core.functional" + +local M = {} + +local create_bin_path = _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity) + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.go(packages[1])) + -- Install secondary packages + for i = 2, #packages do + local pkg = packages[i] + ctx.receipt:with_secondary_source(ctx.receipt.go(pkg)) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The go packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + M.install(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The go packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.install(packages) + local ctx = installer.context() + local env = { + GOBIN = ctx.cwd:get(), + } + -- Install the head package + do + local head_package = packages[1] + local version = ctx.requested_version:or_else "latest" + ctx.spawn.go { + "install", + "-v", + ("%s@%s"):format(head_package, version), + env = env, + } + end + + -- Install secondary packages + for i = 2, #packages do + ctx.spawn.go { "install", "-v", ("%s@latest"):format(packages[i]), env = env } + end + + if packages.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +---@param output string @The output from `go version -m` command. +function M.parse_mod_version_output(output) + ---@type {path: string[], mod: string[], dep: string[], build: string[]} + local result = {} + local lines = vim.split(output, "\n") + for _, line in ipairs { unpack(lines, 2) } do + local type, id, value = unpack(vim.split(line, "%s+", { trimempty = true })) + if type and id then + result[type] = result[type] or {} + result[type][id] = value or "" + end + end + return result +end + +local trim_wildcard_suffix = _.gsub("/%.%.%.$", "") + +---@param pkg string +function M.parse_package_mod(pkg) + if _.starts_with("github.com", pkg) then + local components = _.split("/", pkg) + return trim_wildcard_suffix(_.join("/", { + components[1], -- github.com + components[2], -- owner + components[3], -- repo + })) + elseif _.starts_with("golang.org", pkg) then + local components = _.split("/", pkg) + return trim_wildcard_suffix(_.join("/", { + components[1], -- golang.org + components[2], -- x + components[3], -- owner + components[4], -- repo + })) + else + return trim_wildcard_suffix(pkg) + end +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + if vim.in_fast_event() then + a.scheduler() + end + local normalized_pkg_name = trim_wildcard_suffix(receipt.primary_source.package) + -- trims e.g. golang.org/x/tools/gopls to gopls + local executable = vim.fn.fnamemodify(normalized_pkg_name, ":t") + return spawn + .go({ + "version", + "-m", + platform.is_win and ("%s.exe"):format(executable) or executable, + cwd = install_dir, + }) + :map_catching(function(result) + local parsed_output = M.parse_mod_version_output(result.stdout) + return Optional.of_nilable(parsed_output.mod[M.parse_package_mod(receipt.primary_source.package)]) + :or_else_throw "Failed to parse mod version" + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + local normalized_pkg_name = M.parse_package_mod(receipt.primary_source.package) + return spawn + .go({ + "list", + "-json", + "-m", + ("%s@latest"):format(normalized_pkg_name), + cwd = install_dir, + }) + :map_catching(function(result) + ---@type {Path: string, Version: string} + local output = vim.json.decode(result.stdout) + return Optional.of_nilable(output.Version) + :map(function(latest_version) + local installed_version = + M.get_installed_primary_package_version(receipt, install_dir):get_or_throw() + if installed_version ~= latest_version then + return { + name = normalized_pkg_name, + current_version = assert(installed_version), + latest_version = assert(latest_version), + } + end + end) + :or_else_throw "Primary package is not outdated." + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { install_dir }, + } +end + +return M diff --git a/lua/mason-core/managers/luarocks/init.lua b/lua/mason-core/managers/luarocks/init.lua new file mode 100644 index 00000000..7959261c --- /dev/null +++ b/lua/mason-core/managers/luarocks/init.lua @@ -0,0 +1,144 @@ +local installer = require "mason-core.installer" +local _ = require "mason-core.functional" +local process = require "mason-core.process" +local path = require "mason-core.path" +local Result = require "mason-core.result" +local spawn = require "mason-core.spawn" +local Optional = require "mason-core.optional" +local platform = require "mason-core.platform" + +local M = {} + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.bat", _.identity)) + +---@param package string +local function with_receipt(package) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.luarocks(package)) + end +end + +---@param package string @The luarock package to install. +---@param opts { dev: boolean, bin : string[] | nil } | nil +function M.package(package, opts) + return function() + return M.install(package, opts).with_receipt() + end +end + +---@async +---@param pkg string @The luarock package to install. +---@param opts { dev: boolean, bin : string[] | nil } | nil +function M.install(pkg, opts) + opts = opts or {} + local ctx = installer.context() + ctx:promote_cwd() + ctx.spawn.luarocks { + "install", + "--tree", + ctx.cwd:get(), + opts.dev and "--dev" or vim.NIL, + pkg, + ctx.requested_version:or_else(vim.NIL), + } + if pkg.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, pkg.bin) + end + return { + with_receipt = with_receipt(pkg), + } +end + +---@alias InstalledLuarock {package: string, version: string, arch: string, nrepo: string, namespace: string} + +---@type fun(output: string): InstalledLuarock[] +M.parse_installed_rocks = _.compose( + _.map(_.compose( + -- https://github.com/luarocks/luarocks/blob/fbd3566a312e647cde57b5d774533731e1aa844d/src/luarocks/search.lua#L317 + _.zip_table { "package", "version", "arch", "nrepo", "namespace" }, + _.split "\t" + )), + _.split "\n" +) + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + if receipt.primary_source.type ~= "luarocks" then + return Result.failure "Receipt does not have a primary source of type luarocks" + end + local primary_package = receipt.primary_source.package + return spawn + .luarocks({ + "list", + "--tree", + install_dir, + "--porcelain", + }) + :map_catching(function(result) + local luarocks = M.parse_installed_rocks(result.stdout) + return Optional.of_nilable(_.find_first(_.prop_eq("package", primary_package), luarocks)) + :map(_.prop "version") + :or_else_throw() + end) +end + +---@alias OutdatedLuarock {name: string, installed: string, available: string, repo: string} + +---@type fun(output: string): OutdatedLuarock[] +M.parse_outdated_rocks = _.compose( + _.map(_.compose( + -- https://github.com/luarocks/luarocks/blob/fbd3566a312e647cde57b5d774533731e1aa844d/src/luarocks/cmd/list.lua#L59 + _.zip_table { "name", "installed", "available", "repo" }, + _.split "\t" + )), + _.split "\n" +) + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + if receipt.primary_source.type ~= "luarocks" then + return Result.failure "Receipt does not have a primary source of type luarocks" + end + local primary_package = receipt.primary_source.package + return spawn + .luarocks({ + "list", + "--outdated", + "--tree", + install_dir, + "--porcelain", + }) + :map_catching(function(result) + local outdated_rocks = M.parse_outdated_rocks(result.stdout) + return Optional.of_nilable(_.find_first(_.prop_eq("name", primary_package), outdated_rocks)) + :map( + ---@param outdated_rock OutdatedLuarock + function(outdated_rock) + return { + name = outdated_rock.name, + current_version = assert(outdated_rock.installed), + latest_version = assert(outdated_rock.available), + } + end + ) + :or_else_throw() + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { path.concat { install_dir, "bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/npm/init.lua b/lua/mason-core/managers/npm/init.lua new file mode 100644 index 00000000..828afd12 --- /dev/null +++ b/lua/mason-core/managers/npm/init.lua @@ -0,0 +1,143 @@ +local spawn = require "mason-core.spawn" +local Optional = require "mason-core.optional" +local installer = require "mason-core.installer" +local Result = require "mason-core.result" +local process = require "mason-core.process" +local path = require "mason-core.path" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" + +local list_copy = _.list_copy + +local M = {} + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "node_modules", ".bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.cmd", _.identity)) + +---@async +---@param ctx InstallContext +local function ensure_npm_root(ctx) + if not (ctx.fs:dir_exists "node_modules" or ctx.fs:file_exists "package.json") then + -- Create a package.json to set a boundary for where npm installs packages. + ctx.spawn.npm { "init", "--yes", "--scope=mason" } + end +end + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.npm(packages[1])) + for i = 2, #packages do + ctx.receipt:with_secondary_source(ctx.receipt.npm(packages[i])) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The npm packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + return M.install(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The npm packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.install(packages) + local ctx = installer.context() + local pkgs = list_copy(packages) + ctx.requested_version:if_present(function(version) + pkgs[1] = ("%s@%s"):format(pkgs[1], version) + end) + + -- Use global-style. The reasons for this are: + -- a) To avoid polluting the executables (aka bin-links) that npm creates. + -- b) The installation is, after all, more similar to a "global" installation. We don't really gain + -- any of the benefits of not using global style (e.g., deduping the dependency tree). + -- + -- We write to .npmrc manually instead of going through npm because managing a local .npmrc file + -- is a bit unreliable across npm versions (especially <7), so we take extra measures to avoid + -- inadvertently polluting global npm config. + ctx.fs:append_file(".npmrc", "global-style=true") + + ensure_npm_root(ctx) + ctx.spawn.npm { "install", pkgs } + + if packages.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +---@async +---@param exec_args string[] @The arguments to pass to npm exec. +function M.exec(exec_args) + local ctx = installer.context() + ctx.spawn.npm { "exec", "--yes", "--", exec_args } +end + +---@async +---@param script string @The npm script to run. +function M.run(script) + local ctx = installer.context() + ctx.spawn.npm { "run", script } +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + if receipt.primary_source.type ~= "npm" then + return Result.failure "Receipt does not have a primary source of type npm" + end + return spawn.npm({ "ls", "--json", cwd = install_dir }):map_catching(function(result) + local npm_packages = vim.json.decode(result.stdout) + return npm_packages.dependencies[receipt.primary_source.package].version + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + if receipt.primary_source.type ~= "npm" then + return Result.failure "Receipt does not have a primary source of type npm" + end + local primary_package = receipt.primary_source.package + local npm_outdated = spawn.npm { "outdated", "--json", primary_package, cwd = install_dir } + if npm_outdated:is_success() then + return Result.failure "Primary package is not outdated." + end + return npm_outdated:recover_catching(function(result) + assert(result.exit_code == 1, "Expected npm outdated to return exit code 1.") + local data = vim.json.decode(result.stdout) + + return Optional.of_nilable(data[primary_package]) + :map(function(outdated_package) + if outdated_package.current ~= outdated_package.latest then + return { + name = primary_package, + current_version = assert(outdated_package.current), + latest_version = assert(outdated_package.latest), + } + end + end) + :or_else_throw() + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { path.concat { install_dir, "node_modules", ".bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/opam/init.lua b/lua/mason-core/managers/opam/init.lua new file mode 100644 index 00000000..8b42e4e9 --- /dev/null +++ b/lua/mason-core/managers/opam/init.lua @@ -0,0 +1,69 @@ +local path = require "mason-core.path" +local process = require "mason-core.process" +local installer = require "mason-core.installer" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" + +local M = {} + +local list_copy = _.list_copy + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity)) + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.opam(packages[1])) + for i = 2, #packages do + ctx.receipt:with_secondary_source(ctx.receipt.opam(packages[i])) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The opam packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + return M.install(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The opam packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.install(packages) + local ctx = installer.context() + local pkgs = list_copy(packages) + + ctx.requested_version:if_present(function(version) + pkgs[1] = ("%s.%s"):format(pkgs[1], version) + end) + + ctx.spawn.opam { + "install", + "--destdir=.", + "--yes", + "--verbose", + pkgs, + } + + if packages.bin then + _.each(function(executable) + ctx:link_bin(executable, create_bin_path(executable)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +function M.env(root_dir) + return { + PATH = process.extend_path { path.concat { root_dir, "bin" } }, + } +end + +return M diff --git a/lua/mason-core/managers/pip3/init.lua b/lua/mason-core/managers/pip3/init.lua new file mode 100644 index 00000000..9502e89e --- /dev/null +++ b/lua/mason-core/managers/pip3/init.lua @@ -0,0 +1,175 @@ +local _ = require "mason-core.functional" +local settings = require "mason.settings" +local process = require "mason-core.process" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local Optional = require "mason-core.optional" +local installer = require "mason-core.installer" +local Result = require "mason-core.result" +local spawn = require "mason-core.spawn" + +local VENV_DIR = "venv" + +local M = {} + +local create_bin_path = _.compose(path.concat, function(executable) + return _.append(executable, { VENV_DIR, platform.is_win and "Scripts" or "bin" }) +end, _.if_else(_.always(platform.is.win), _.format "%s.exe", _.identity)) + +---@param packages string[] +local function with_receipt(packages) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.pip3(packages[1])) + for i = 2, #packages do + ctx.receipt:with_secondary_source(ctx.receipt.pip3(packages[i])) + end + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The pip packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.packages(packages) + return function() + return M.install(packages).with_receipt() + end +end + +---@async +---@param packages { [number]: string, bin: string[] | nil } @The pip packages to install. The first item in this list will be the recipient of the requested version, if set. +function M.install(packages) + local ctx = installer.context() + local pkgs = _.list_copy(packages) + + ctx.requested_version:if_present(function(version) + pkgs[1] = ("%s==%s"):format(pkgs[1], version) + end) + + local executables = platform.is_win and _.list_not_nil(vim.g.python3_host_prog, "python", "python3") + or _.list_not_nil(vim.g.python3_host_prog, "python3", "python") + + -- pip3 will hardcode the full path to venv executables, so we need to promote cwd to make sure pip uses the final destination path. + ctx:promote_cwd() + + -- Find first executable that manages to create venv + local executable = _.find_first(function(executable) + return pcall(ctx.spawn[executable], { "-m", "venv", VENV_DIR }) + end, executables) + + Optional.of_nilable(executable) + :if_present(function() + ctx.spawn.python { + "-m", + "pip", + "--disable-pip-version-check", + "install", + "-U", + settings.current.pip.install_args, + pkgs, + with_paths = { M.venv_path(ctx.cwd:get()) }, + } + end) + :or_else_throw "Unable to create python3 venv environment." + + if packages.bin then + _.each(function(bin) + ctx:link_bin(bin, create_bin_path(bin)) + end, packages.bin) + end + + return { + with_receipt = with_receipt(packages), + } +end + +---@param pkg string +---@return string +function M.normalize_package(pkg) + -- https://stackoverflow.com/a/60307740 + local s = pkg:gsub("%[.*%]", "") + return s +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.check_outdated_primary_package(receipt, install_dir) + if receipt.primary_source.type ~= "pip3" then + return Result.failure "Receipt does not have a primary source of type pip3" + end + local normalized_package = M.normalize_package(receipt.primary_source.package) + return spawn + .python({ + "-m", + "pip", + "list", + "--outdated", + "--format=json", + cwd = install_dir, + with_paths = { M.venv_path(install_dir) }, + }) + :map_catching(function(result) + ---@alias PipOutdatedPackage {name: string, version: string, latest_version: string} + ---@type PipOutdatedPackage[] + local packages = vim.json.decode(result.stdout) + + local outdated_primary_package = _.find_first(function(outdated_package) + return outdated_package.name == normalized_package + and outdated_package.version ~= outdated_package.latest_version + end, packages) + + return Optional.of_nilable(outdated_primary_package) + :map(function(pkg) + return { + name = normalized_package, + current_version = assert(pkg.version), + latest_version = assert(pkg.latest_version), + } + end) + :or_else_throw "Primary package is not outdated." + end) +end + +---@async +---@param receipt InstallReceipt +---@param install_dir string +function M.get_installed_primary_package_version(receipt, install_dir) + if receipt.primary_source.type ~= "pip3" then + return Result.failure "Receipt does not have a primary source of type pip3" + end + return spawn + .python({ + "-m", + "pip", + "list", + "--format=json", + cwd = install_dir, + with_paths = { M.venv_path(install_dir) }, + }) + :map_catching(function(result) + local pip_packages = vim.json.decode(result.stdout) + local normalized_pip_package = M.normalize_package(receipt.primary_source.package) + local pip_package = _.find_first(function(pkg) + return pkg.name == normalized_pip_package + end, pip_packages) + return Optional.of_nilable(pip_package) + :map(function(pkg) + return pkg.version + end) + :or_else_throw "Unable to find pip package." + end) +end + +---@param install_dir string +function M.env(install_dir) + return { + PATH = process.extend_path { M.venv_path(install_dir) }, + } +end + +---@param install_dir string +function M.venv_path(install_dir) + return path.concat { install_dir, VENV_DIR, platform.is_win and "Scripts" or "bin" } +end + +return M diff --git a/lua/mason-core/managers/powershell/init.lua b/lua/mason-core/managers/powershell/init.lua new file mode 100644 index 00000000..209e0fe1 --- /dev/null +++ b/lua/mason-core/managers/powershell/init.lua @@ -0,0 +1,46 @@ +local spawn = require "mason-core.spawn" +local process = require "mason-core.process" + +local M = {} + +local PWSHOPT = { + progress_preference = [[ $ProgressPreference = 'SilentlyContinue'; ]], -- https://stackoverflow.com/a/63301751 + security_protocol = [[ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ]], +} + +---@param script string +---@param opts JobSpawnOpts | nil +---@param custom_spawn JobSpawn | nil +function M.script(script, opts, custom_spawn) + opts = opts or {} + ---@type JobSpawn + local spawner = custom_spawn or spawn + return spawner.powershell(vim.tbl_extend("keep", { + "-NoProfile", + on_spawn = function(_, stdio) + local stdin = stdio[1] + stdin:write(PWSHOPT.progress_preference) + stdin:write(PWSHOPT.security_protocol) + stdin:write(script) + stdin:close() + end, + env_raw = process.graft_env(opts.env or {}, { "PSMODULEPATH" }), + }, opts)) +end + +---@param command string +---@param opts JobSpawnOpts | nil +---@param custom_spawn JobSpawn | nil +function M.command(command, opts, custom_spawn) + opts = opts or {} + ---@type JobSpawn + local spawner = custom_spawn or spawn + return spawner.powershell(vim.tbl_extend("keep", { + "-NoProfile", + "-Command", + PWSHOPT.progress_preference .. PWSHOPT.security_protocol .. command, + env_raw = process.graft_env(opts.env or {}, { "PSMODULEPATH" }), + }, opts)) +end + +return M diff --git a/lua/mason-core/managers/std/init.lua b/lua/mason-core/managers/std/init.lua new file mode 100644 index 00000000..e021a261 --- /dev/null +++ b/lua/mason-core/managers/std/init.lua @@ -0,0 +1,188 @@ +local a = require "mason-core.async" +local installer = require "mason-core.installer" +local fetch = require "mason-core.fetch" +local platform = require "mason-core.platform" +local powershell = require "mason-core.managers.powershell" +local path = require "mason-core.path" +local Result = require "mason-core.result" + +local M = {} + +local function with_system_executable_receipt(executable) + return function() + local ctx = installer.context() + ctx.receipt:with_primary_source(ctx.receipt.system(executable)) + end +end + +---@async +---@param executable string +---@param opts {help_url:string|nil} +function M.system_executable(executable, opts) + return function() + M.ensure_executable(executable, opts).with_receipt() + end +end + +---@async +---@param executable string +---@param opts {help_url:string|nil} +function M.ensure_executable(executable, opts) + local ctx = installer.context() + opts = opts or {} + if vim.in_fast_event() then + a.scheduler() + end + if vim.fn.executable(executable) ~= 1 then + ctx.stdio_sink.stderr(("%s was not found in path.\n"):format(executable)) + if opts.help_url then + ctx.stdio_sink.stderr(("See %s for installation instructions.\n"):format(opts.help_url)) + end + error("Installation failed: system executable was not found.", 0) + end + + return { + with_receipt = with_system_executable_receipt(executable), + } +end + +---@async +---@param url string +---@param out_file string +function M.download_file(url, out_file) + local ctx = installer.context() + ctx.stdio_sink.stdout(("Downloading file %q...\n"):format(url)) + fetch(url, { + out_file = path.concat { ctx.cwd:get(), out_file }, + }) + :map_err(function(err) + return ("Failed to download file %q.\n%s"):format(url, err) + end) + :get_or_throw() +end + +---@async +---@param file string +---@param dest string +function M.unzip(file, dest) + local ctx = installer.context() + platform.when { + unix = function() + ctx.spawn.unzip { "-d", dest, file } + end, + win = function() + powershell.command( + ("Microsoft.PowerShell.Archive\\Expand-Archive -Path %q -DestinationPath %q"):format(file, dest), + {}, + ctx.spawn + ) + end, + } + pcall(function() + -- make sure the .zip archive doesn't linger + ctx.fs:unlink(file) + end) +end + +---@param file string +local function win_extract(file) + local ctx = installer.context() + Result.run_catching(function() + ctx.spawn["7z"] { "x", "-y", "-r", file } + end) + :recover_catching(function() + ctx.spawn.peazip { "-ext2here", path.concat { ctx.cwd:get(), file } } -- peazip requires absolute paths + end) + :recover_catching(function() + ctx.spawn.wzunzip { file } + end) + :recover_catching(function() + ctx.spawn.winrar { "e", file } + end) + :get_or_throw(("Unable to unpack %s."):format(file)) +end + +---@async +---@param file string +---@param opts {strip_components:integer}|nil +function M.untar(file, opts) + opts = opts or {} + local ctx = installer.context() + ctx.spawn.tar { + opts.strip_components and { "--strip-components", opts.strip_components } or vim.NIL, + "--no-same-owner", + "-xvf", + file, + } + pcall(function() + ctx.fs:unlink(file) + end) +end + +---@async +---@param file string +---@param opts {strip_components:integer}|nil +function M.untarxz(file, opts) + opts = opts or {} + local ctx = installer.context() + platform.when { + unix = function() + M.untar(file, opts) + end, + win = function() + Result.run_catching(function() + win_extract(file) -- unpack .tar.xz to .tar + local uncompressed_tar = file:gsub(".xz$", "") + M.untar(uncompressed_tar, opts) + end):recover(function() + ctx.spawn.arc { + "unarchive", + opts.strip_components and { "--strip-components", opts.strip_components } or vim.NIL, + file, + } + pcall(function() + ctx.fs:unlink(file) + end) + end) + end, + } +end + +---@async +---@param file string +function M.gunzip(file) + platform.when { + unix = function() + local ctx = installer.context() + ctx.spawn.gzip { "-d", file } + end, + win = function() + win_extract(file) + end, + } +end + +---@async +---@param flags string @The chmod flag to apply. +---@param files string[] @A list of relative paths to apply the chmod on. +function M.chmod(flags, files) + if platform.is_unix then + local ctx = installer.context() + ctx.spawn.chmod { flags, files } + end +end + +---@async +---Wrapper around vim.ui.select. +---@param items table +---@params opts +function M.select(items, opts) + assert(not platform.is_headless, "Tried to prompt for user input while in headless mode.") + if vim.in_fast_event() then + a.scheduler() + end + local async_select = a.promisify(vim.ui.select) + return async_select(items, opts) +end + +return M diff --git a/lua/mason-core/notify.lua b/lua/mason-core/notify.lua new file mode 100644 index 00000000..b41c7e64 --- /dev/null +++ b/lua/mason-core/notify.lua @@ -0,0 +1,13 @@ +local TITLE = "mason.nvim" + +return function(msg, level) + local has_notify_plugin = pcall(require, "notify") + level = level or vim.log.levels.INFO + if has_notify_plugin then + vim.notify(msg, level, { + title = TITLE, + }) + else + vim.notify(("[%s] %s"):format(TITLE, msg), level) + end +end diff --git a/lua/mason-core/optional.lua b/lua/mason-core/optional.lua new file mode 100644 index 00000000..10af8ccb --- /dev/null +++ b/lua/mason-core/optional.lua @@ -0,0 +1,100 @@ +---@class Optional +---@field private _value unknown +local Optional = {} +Optional.__index = Optional + +---@param value any +function Optional.new(value) + return setmetatable({ _value = value }, Optional) +end + +local EMPTY = Optional.new(nil) + +---@param value any +function Optional.of_nilable(value) + if value == nil then + return EMPTY + else + return Optional.new(value) + end +end + +function Optional.empty() + return EMPTY +end + +---@param value any +function Optional.of(value) + return Optional.new(value) +end + +---@param mapper_fn fun(value: any): any +function Optional:map(mapper_fn) + if self:is_present() then + return Optional.of_nilable(mapper_fn(self._value)) + else + return EMPTY + end +end + +function Optional:get() + if not self:is_present() then + error("No value present.", 2) + end + return self._value +end + +---@param value any +function Optional:or_else(value) + if self:is_present() then + return self._value + else + return value + end +end + +---@param supplier fun(): any +function Optional:or_else_get(supplier) + if self:is_present() then + return self._value + else + return supplier() + end +end + +---@param supplier fun(): Optional +---@return Optional +function Optional:or_(supplier) + if self:is_present() then + return self + else + return supplier() + end +end + +---@param exception any @(optional) The exception to throw if the result is a failure. +function Optional:or_else_throw(exception) + if self:is_present() then + return self._value + else + if exception then + error(exception, 2) + else + error("No value present.", 2) + end + end +end + +---@param fn fun(value: any) +function Optional:if_present(fn) + if self:is_present() then + fn(self._value) + end + return self +end + +function Optional:is_present() + return self._value ~= nil +end + +return Optional diff --git a/lua/mason-core/package/init.lua b/lua/mason-core/package/init.lua new file mode 100644 index 00000000..631e423d --- /dev/null +++ b/lua/mason-core/package/init.lua @@ -0,0 +1,205 @@ +local registry = require "mason-registry" +local a = require "mason-core.async" +local _ = require "mason-core.functional" +local installer = require "mason-core.installer" +local InstallationHandle = require "mason-core.installer.handle" +local Optional = require "mason-core.optional" +local log = require "mason-core.log" +local EventEmitter = require "mason-core.EventEmitter" +local receipt = require "mason-core.receipt" +local fs = require "mason-core.fs" +local path = require "mason-core.path" +local linker = require "mason-core.installer.linker" + +local version_checks = require "mason-core.package.version-check" + +---@class Package : EventEmitter +---@field name string +---@field spec PackageSpec +---@field private handle InstallHandle @The currently associated handle. +local Package = setmetatable({}, { __index = EventEmitter }) + +---@param package_identifier string +---@return string, string | nil +Package.Parse = function(package_identifier) + local name, version = unpack(vim.split(package_identifier, "@")) + return name, version +end + +---@alias PackageLanguage string + +---@type table +Package.Lang = setmetatable({}, { + __index = function(s, lang) + s[lang] = lang + return s[lang] + end, +}) + +---@class PackageCategory +Package.Cat = { + Compiler = "Compiler", + Runtime = "Runtime", + DAP = "DAP", + LSP = "LSP", + Linter = "Linter", + Formatter = "Formatter", +} + +local PackageMt = { __index = Package } + +---@class PackageSpec +---@field name string +---@field desc string +---@field homepage string +---@field categories PackageCategory[] +---@field languages PackageLanguage[] +---@field install async fun(ctx: InstallContext) + +---@param spec PackageSpec +function Package.new(spec) + vim.validate { + name = { spec.name, "s" }, + desc = { spec.desc, "s" }, + homepage = { spec.homepage, "s" }, + categories = { spec.categories, "t" }, + languages = { spec.languages, "t" }, + install = { spec.install, "f" }, + } + + return EventEmitter.init(setmetatable({ + name = spec.name, -- for convenient access + spec = spec, + }, PackageMt)) +end + +function Package:new_handle() + self:get_handle():if_present(function(handle) + assert(handle:is_closed(), "Cannot create new handle because existing handle is not closed.") + end) + log.fmt_trace("Creating new handle for %s", self) + local handle = InstallationHandle.new(self) + self.handle = handle + self:emit("handle", handle) + return handle +end + +---@param opts { version: string|nil } | nil +---@return InstallHandle +function Package:install(opts) + opts = opts or {} + return self + :get_handle() + :map(function(handle) + if not handle:is_closed() then + log.fmt_debug("Handle %s already exist for package %s", handle, self) + return handle + end + end) + :or_else_get(function() + local handle = self:new_handle() + -- This function is not expected to be run in async scope, so we create + -- a new scope here and handle the result callback-style. + a.run( + installer.execute, + ---@param success boolean + ---@param result Result + function(success, result) + if not success then + log.error("Unexpected error", result) + self:emit("install:failed", handle) + return + end + result + :on_success(function() + self:emit("install:success", handle) + registry:emit("package:install:success", self, handle) + end) + :on_failure(function() + self:emit("install:failed", handle) + registry:emit("package:install:failed", self, handle) + end) + end, + handle, + { + requested_version = opts.version, + } + ) + return handle + end) +end + +function Package:uninstall() + local was_unlinked = self:unlink() + if was_unlinked then + self:emit "uninstall:success" + end + return was_unlinked +end + +function Package:unlink() + log.fmt_info("Unlinking %s", self) + local install_path = self:get_install_path() + -- 1. Unlink + self:get_receipt():map(_.prop "links"):if_present(function(links) + linker.unlink(self, links) + end) + + -- 2. Remove installation artifacts + if fs.sync.dir_exists(install_path) then + fs.sync.rmrf(install_path) + return true + end + return false +end + +function Package:is_installed() + return registry.is_installed(self.name) +end + +function Package:get_handle() + return Optional.of_nilable(self.handle) +end + +function Package:get_install_path() + return path.package_prefix(self.name) +end + +---@return Optional @Optional<@see InstallReceipt> +function Package:get_receipt() + local receipt_path = path.concat { self:get_install_path(), "mason-receipt.json" } + if fs.sync.file_exists(receipt_path) then + return Optional.of(receipt.InstallReceipt.from_json(vim.json.decode(fs.sync.read_file(receipt_path)))) + end + return Optional.empty() +end + +---@param callback fun(success: boolean, version_or_err: string) +function Package:get_installed_version(callback) + a.run(function() + local receipt = self:get_receipt():or_else_throw "Unable to get receipt." + return version_checks.get_installed_version(receipt, self:get_install_path()):get_or_throw() + end, callback) +end + +---@param callback fun(success: boolean, result_or_err: NewPackageVersion) +function Package:check_new_version(callback) + a.run(function() + local receipt = self:get_receipt():or_else_throw "Unable to get receipt." + return version_checks.get_new_version(receipt, self:get_install_path()):get_or_throw() + end, callback) +end + +function Package:get_lsp_settings_schema() + local ok, schema = pcall(require, ("mason-schemas.lsp.%s"):format(self.name)) + if not ok then + return Optional.empty() + end + return Optional.of(schema) +end + +function PackageMt.__tostring(self) + return ("Package(name=%s)"):format(self.name) +end + +return Package diff --git a/lua/mason-core/package/version-check.lua b/lua/mason-core/package/version-check.lua new file mode 100644 index 00000000..b999c280 --- /dev/null +++ b/lua/mason-core/package/version-check.lua @@ -0,0 +1,91 @@ +local Result = require "mason-core.result" +local cargo = require "mason-core.managers.cargo" +local composer = require "mason-core.managers.composer" +local eclipse = require "mason-core.clients.eclipse" +local gem = require "mason-core.managers.gem" +local git = require "mason-core.managers.git" +local github = require "mason-core.managers.github" +local go = require "mason-core.managers.go" +local luarocks = require "mason-core.managers.luarocks" +local npm = require "mason-core.managers.npm" +local pip3 = require "mason-core.managers.pip3" + +---@param field_name string +local function version_in_receipt(field_name) + ---@param receipt InstallReceipt + ---@return Result + return function(receipt) + return Result.success(receipt.primary_source[field_name]) + end +end + +---@type table +local get_installed_version_by_type = { + ["npm"] = npm.get_installed_primary_package_version, + ["pip3"] = pip3.get_installed_primary_package_version, + ["gem"] = gem.get_installed_primary_package_version, + ["cargo"] = cargo.get_installed_primary_package_version, + ["composer"] = composer.get_installed_primary_package_version, + ["git"] = git.get_installed_revision, + ["go"] = go.get_installed_primary_package_version, + ["luarocks"] = luarocks.get_installed_primary_package_version, + ["github_release_file"] = version_in_receipt "release", + ["github_release"] = version_in_receipt "release", + ["github_tag"] = version_in_receipt "tag", + ["jdtls"] = version_in_receipt "version", +} + +---@async +---@param receipt InstallReceipt +local function jdtls_check(receipt) + return eclipse.fetch_latest_jdtls_version():map_catching(function(latest_version) + if receipt.primary_source.version ~= latest_version then + return { + name = "jdtls", + current_version = receipt.primary_source.version, + latest_version = latest_version, + } + end + error "Primary package is not outdated." + end) +end + +---@class NewPackageVersion +---@field name string +---@field current_version string +---@field latest_version string + +local get_new_version_by_type = { + ["npm"] = npm.check_outdated_primary_package, + ["pip3"] = pip3.check_outdated_primary_package, + ["git"] = git.check_outdated_git_clone, + ["cargo"] = cargo.check_outdated_primary_package, + ["composer"] = composer.check_outdated_primary_package, + ["gem"] = gem.check_outdated_primary_package, + ["go"] = go.check_outdated_primary_package, + ["luarocks"] = luarocks.check_outdated_primary_package, + ["jdtls"] = jdtls_check, + ["github_release_file"] = github.check_outdated_primary_package_release, + ["github_release"] = github.check_outdated_primary_package_release, + ["github_tag"] = github.check_outdated_primary_package_tag, +} + +---@param provider_mapping table: Result +local function version_check(provider_mapping) + ---@param receipt InstallReceipt + ---@param install_dir string + return function(receipt, install_dir) + local check = provider_mapping[receipt.primary_source.type] + if not check then + return Result.failure( + ("Packages installed via %s does not yet support version check."):format(receipt.primary_source.type) + ) + end + return check(receipt, install_dir) + end +end + +return { + get_installed_version = version_check(get_installed_version_by_type), + get_new_version = version_check(get_new_version_by_type), +} diff --git a/lua/mason-core/path.lua b/lua/mason-core/path.lua new file mode 100644 index 00000000..2060c186 --- /dev/null +++ b/lua/mason-core/path.lua @@ -0,0 +1,51 @@ +local sep = (function() + ---@diagnostic disable-next-line: undefined-global + if jit then + ---@diagnostic disable-next-line: undefined-global + local os = string.lower(jit.os) + if os == "linux" or os == "osx" or os == "bsd" then + return "/" + else + return "\\" + end + else + return package.config:sub(1, 1) + end +end)() + +local M = {} + +---@param path_components string[] +---@return string +function M.concat(path_components) + return table.concat(path_components, sep) +end + +---@path root_path string +---@path path string +function M.is_subdirectory(root_path, path) + return root_path == path or path:sub(1, #root_path + 1) == root_path .. sep +end + +---@param dir string|nil +function M.install_prefix(dir) + local settings = require "mason.settings" + return M.concat { settings.current.install_root_dir, dir } +end + +---@param executable string|nil +function M.bin_prefix(executable) + return M.concat { M.install_prefix "bin", executable } +end + +---@param name string|nil +function M.package_prefix(name) + return M.concat { M.install_prefix "packages", name } +end + +---@param name string|nil +function M.package_build_prefix(name) + return M.concat { M.install_prefix ".packages", name } +end + +return M diff --git a/lua/mason-core/platform.lua b/lua/mason-core/platform.lua new file mode 100644 index 00000000..64e6ba52 --- /dev/null +++ b/lua/mason-core/platform.lua @@ -0,0 +1,159 @@ +local fun = require "mason-core.functional.function" + +local M = {} + +local uname = vim.loop.os_uname() + +---@alias Platform +---| '"win"' +---| '"unix"' +---| '"linux"' +---| '"mac"' + +local arch_aliases = { + ["x86_64"] = "x64", + ["i386"] = "x86", + ["i686"] = "x86", -- x86 compat + ["aarch64"] = "arm64", + ["aarch64_be"] = "arm64", + ["armv8b"] = "arm64", -- arm64 compat + ["armv8l"] = "arm64", -- arm64 compat +} + +M.arch = arch_aliases[uname.machine] or uname.machine + +M.is_win = vim.fn.has "win32" == 1 +M.is_unix = vim.fn.has "unix" == 1 +M.is_mac = vim.fn.has "mac" == 1 +M.is_linux = not M.is_mac and M.is_unix + +-- PATH separator +M.path_sep = M.is_win and ";" or ":" + +M.is_headless = #vim.api.nvim_list_uis() == 0 + +---@generic T +---@param platform_table table +---@return T +local function get_by_platform(platform_table) + if M.is_mac then + return platform_table.mac or platform_table.unix + elseif M.is_linux then + return platform_table.linux or platform_table.unix + elseif M.is_unix then + return platform_table.unix + elseif M.is_win then + return platform_table.win + else + return nil + end +end + +function M.when(cases) + local case = get_by_platform(cases) + if case then + return case() + else + error "Current platform is not supported." + end +end + +---@type async fun(): table +M.os_distribution = fun.lazy(function() + local Result = require "mason-core.result" + + ---Parses the provided contents of an /etc/\*-release file and identifies the Linux distribution. + ---@param contents string @The contents of a /etc/\*-release file. + ---@return table + local function parse_linux_dist(contents) + local lines = vim.split(contents, "\n") + + local entries = {} + + for i = 1, #lines do + local line = lines[i] + local index = line:find "=" + if index then + local key = line:sub(1, index - 1) + local value = line:sub(index + 1) + entries[key] = value + end + end + + if entries.ID == "ubuntu" then + -- Parses the Ubuntu OS VERSION_ID into their version components, e.g. "18.04" -> {major=18, minor=04} + local version_id = entries.VERSION_ID:gsub([["]], "") + local version_parts = vim.split(version_id, "%.") + local major = tonumber(version_parts[1]) + local minor = tonumber(version_parts[2]) + + return { + id = "ubuntu", + version_id = version_id, + version = { major = major, minor = minor }, + } + else + return { + id = "linux-generic", + } + end + end + + return M.when { + linux = function() + local spawn = require "mason-core.spawn" + return spawn + .bash({ "-c", "cat /etc/*-release" }) + :map_catching(function(result) + return parse_linux_dist(result.stdout) + end) + :recover(function() + return { id = "linux-generic" } + end) + :get_or_throw() + end, + mac = function() + return Result.success { id = "macOS" } + end, + win = function() + return Result.success { id = "windows" } + end, + } +end) + +---@type async fun() Result @of String +M.get_homebrew_prefix = fun.lazy(function() + assert(M.is_mac, "Can only locate Homebrew installation on Mac systems.") + local spawn = require "mason-core.spawn" + return spawn + .brew({ "--prefix" }) + :map_catching(function(result) + return vim.trim(result.stdout) + end) + :map_err(function() + return "Failed to locate Homebrew installation." + end) +end) + +-- @return string @The libc found on the system, musl or glibc (glibc if ldd is not found) +M.get_libc = fun.lazy(function() + local _, _, libc_exit_code = os.execute "ldd --version 2>&1 | grep -q musl" + if libc_exit_code == 0 then + return "musl" + else + return "glibc" + end +end) + +---@type table +M.is = setmetatable({}, { + __index = function(_, key) + local platform, arch = unpack(vim.split(key, "_", { plain = true })) + if arch and M.arch ~= arch then + return false + end + return M["is_" .. platform] == true + end, +}) + +return M diff --git a/lua/mason-core/process.lua b/lua/mason-core/process.lua new file mode 100644 index 00000000..fd4eb94f --- /dev/null +++ b/lua/mason-core/process.lua @@ -0,0 +1,213 @@ +local log = require "mason-core.log" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local uv = vim.loop + +---@alias luv_pipe any +---@alias luv_handle any + +---@class StdioSink +---@field stdout fun(chunk: string) +---@field stderr fun(chunk: string) + +local M = {} + +---@param pipe luv_pipe +---@param sink fun(chunk: string) +local function connect_sink(pipe, sink) + ---@param err string | nil + ---@param data string | nil + return function(err, data) + if err then + log.error("Unexpected error when reading pipe.", err) + end + if data ~= nil then + sink(data) + else + pipe:read_stop() + pipe:close() + end + end +end + +-- We gather the root env immediately, primarily because of E5560. +-- Also, there's no particular reason we need to refresh the environment (yet). +local initial_environ = vim.fn.environ() + +---@param new_paths string[] @A list of paths to prepend the existing PATH with. +function M.extend_path(new_paths) + local new_path_str = table.concat(new_paths, platform.path_sep) + return ("%s%s%s"):format(new_path_str, platform.path_sep, initial_environ.PATH or "") +end + +---Merges the provided env param with the user's full environent. Provided env has precedence. +---@param env table +---@param excluded_var_names string[]|nil +function M.graft_env(env, excluded_var_names) + local excluded_var_names_set = excluded_var_names and _.set_of(excluded_var_names) or {} + local merged_env = {} + for key, val in pairs(initial_environ) do + if not excluded_var_names_set[key] and env[key] == nil then + merged_env[#merged_env + 1] = key .. "=" .. val + end + end + for key, val in pairs(env) do + if not excluded_var_names_set[key] then + merged_env[#merged_env + 1] = key .. "=" .. val + end + end + return merged_env +end + +---@param env_list string[] +local function sanitize_env_list(env_list) + local sanitized_list = {} + for __, env in ipairs(env_list) do + local safe_envs = { + "GO111MODULE", + "GOBIN", + "GOPATH", + "PATH", + "GEM_HOME", + "GEM_PATH", + } + local is_safe_env = _.any(function(safe_env) + return env:find(safe_env .. "=") == 1 + end, safe_envs) + if is_safe_env then + sanitized_list[#sanitized_list + 1] = env + else + local idx = env:find "=" + sanitized_list[#sanitized_list + 1] = env:sub(1, idx) .. "" + end + end + return sanitized_list +end + +---@alias JobSpawnCallback fun(success: boolean, exit_code: integer, signal: integer) + +---@class JobSpawnOpts +---@field env string[] @List of "key=value" string. +---@field args string[] +---@field cwd string +---@field stdio_sink StdioSink + +---@param cmd string @The command/executable. +---@param opts JobSpawnOpts +---@param callback JobSpawnCallback +---@return luv_handle,luv_pipe[],integer @Returns the job handle and the stdio array on success, otherwise returns nil. +function M.spawn(cmd, opts, callback) + local stdin = uv.new_pipe(false) + local stdout = uv.new_pipe(false) + local stderr = uv.new_pipe(false) + + local stdio = { stdin, stdout, stderr } + + local spawn_opts = { + env = opts.env, + stdio = stdio, + args = opts.args, + cwd = opts.cwd, + detached = false, + hide = true, + } + + log.lazy_debug(function() + local sanitized_env = opts.env and sanitize_env_list(opts.env) or nil + return "Spawning cmd=%s, spawn_opts=%s", + cmd, + { + args = opts.args, + cwd = opts.cwd, + env = sanitized_env, + } + end) + + local handle, pid_or_err + handle, pid_or_err = uv.spawn(cmd, spawn_opts, function(exit_code, signal) + local successful = exit_code == 0 and signal == 0 + handle:close() + if not stdin:is_closing() then + stdin:close() + end + + -- ensure all pipes are closed, for I am a qualified plumber + local check = uv.new_check() + check:start(function() + for i = 1, #stdio do + local pipe = stdio[i] + if not pipe:is_closing() then + return + end + end + check:stop() + callback(successful, exit_code, signal) + end) + + log.fmt_debug("Job pid=%s exited with exit_code=%s, signal=%s", pid_or_err, exit_code, signal) + end) + + if handle == nil then + log.fmt_error("Failed to spawn process. cmd=%s, err=%s", cmd, pid_or_err) + if type(pid_or_err) == "string" and pid_or_err:find "ENOENT" == 1 then + opts.stdio_sink.stderr(("Could not find executable %q in path.\n"):format(cmd)) + else + opts.stdio_sink.stderr(("Failed to spawn process cmd=%s err=%s\n"):format(cmd, pid_or_err)) + end + callback(false) + return nil, nil + end + + log.debug("Spawned with pid", pid_or_err) + + stdout:read_start(connect_sink(stdout, opts.stdio_sink.stdout)) + stderr:read_start(connect_sink(stderr, opts.stdio_sink.stderr)) + + return handle, stdio, pid_or_err +end + +function M.empty_sink() + local function noop() end + return { + stdout = noop, + stderr = noop, + } +end + +function M.simple_sink() + return { + stdout = vim.schedule_wrap(vim.api.nvim_out_write), + stderr = vim.schedule_wrap(vim.api.nvim_err_write), + } +end + +function M.in_memory_sink() + local stdout, stderr = {}, {} + return { + buffers = { stdout = stdout, stderr = stderr }, + sink = { + stdout = function(chunk) + stdout[#stdout + 1] = chunk + end, + stderr = function(chunk) + stderr[#stderr + 1] = chunk + end, + }, + } +end + +---@param luv_handle luv_handle +---@param signal integer +function M.kill(luv_handle, signal) + assert(type(signal) == "number", "signal is not a number") + assert(signal > 0 and signal < 32, "signal must be between 1-31") + log.fmt_trace("Sending signal %s to handle %s", signal, luv_handle) + local ok, is_active = pcall(uv.is_active, luv_handle) + if not ok or not is_active then + log.fmt_trace("Tried to send signal %s to inactive uv handle.", signal) + return + end + uv.process_kill(luv_handle, signal) +end + +return M diff --git a/lua/mason-core/receipt.lua b/lua/mason-core/receipt.lua new file mode 100644 index 00000000..76cd7449 --- /dev/null +++ b/lua/mason-core/receipt.lua @@ -0,0 +1,180 @@ +local M = {} + +---@alias InstallReceiptSchemaVersion +---| '"1.0"' + +---@alias InstallReceiptSourceType +---| '"npm"' +---| '"pip3"' +---| '"gem"' +---| '"go"' +---| '"cargo"' +---| '"opam"' +---| '"dotnet"' +---| '"r_package"' +---| '"unmanaged"' +---| '"system"' +---| '"jdtls"' +---| '"git"' +---| '"github_tag"' +---| '"github_release"' +---| '"github_release_file"' + +---@alias InstallReceiptSource {type: InstallReceiptSourceType} + +---@class InstallReceiptLinks +---@field bin table + +---@class InstallReceiptBuilder +---@field private secondary_sources InstallReceiptSource[] +---@field private links InstallReceiptLinks +---@field private epoch_time number +local InstallReceiptBuilder = {} +InstallReceiptBuilder.__index = InstallReceiptBuilder + +function InstallReceiptBuilder.new() + return setmetatable({ + secondary_sources = {}, + links = { + bin = vim.empty_dict(), + }, + }, InstallReceiptBuilder) +end + +---@param name string +function InstallReceiptBuilder:with_name(name) + self.name = name + return self +end + +---@param version InstallReceiptSchemaVersion +function InstallReceiptBuilder:with_schema_version(version) + self.schema_version = version + return self +end + +---@param source InstallReceiptSource +function InstallReceiptBuilder:with_primary_source(source) + self.primary_source = source + return self +end + +---@param source InstallReceiptSource +function InstallReceiptBuilder:with_secondary_source(source) + table.insert(self.secondary_sources, source) + return self +end + +---@param typ '"bin"' +---@param name string +---@param rel_path string +function InstallReceiptBuilder:with_link(typ, name, rel_path) + assert(not self.links[typ][name], ("%s/%s has already been linked."):format(typ, name)) + self.links[typ][name] = rel_path + return self +end + +---@param seconds integer +---@param microseconds integer +local function to_ms(seconds, microseconds) + return (seconds * 1000) + math.floor(microseconds / 1000) +end + +---vim.loop.gettimeofday() +---@param seconds integer +---@param microseconds integer +function InstallReceiptBuilder:with_completion_time(seconds, microseconds) + self.completion_time = to_ms(seconds, microseconds) + return self +end + +---vim.loop.gettimeofday() +---@param seconds integer +---@param microseconds integer +function InstallReceiptBuilder:with_start_time(seconds, microseconds) + self.start_time = to_ms(seconds, microseconds) + return self +end + +function InstallReceiptBuilder:build() + assert(self.name, "name is required") + assert(self.schema_version, "schema_version is required") + assert(self.start_time, "start_time is required") + assert(self.completion_time, "completion_time is required") + assert(self.primary_source, "primary_source is required") + return { + name = self.name, + schema_version = self.schema_version, + metrics = { + start_time = self.start_time, + completion_time = self.completion_time, + }, + primary_source = self.primary_source, + secondary_sources = self.secondary_sources, + links = self.links, + } +end + +---@param type InstallReceiptSourceType +local function package_source(type) + ---@param pkg string + return function(pkg) + return { type = type, package = pkg } + end +end + +InstallReceiptBuilder.npm = package_source "npm" +InstallReceiptBuilder.pip3 = package_source "pip3" +InstallReceiptBuilder.gem = package_source "gem" +InstallReceiptBuilder.go = package_source "go" +InstallReceiptBuilder.dotnet = package_source "dotnet" +InstallReceiptBuilder.cargo = package_source "cargo" +InstallReceiptBuilder.composer = package_source "composer" +InstallReceiptBuilder.r_package = package_source "r_package" +InstallReceiptBuilder.opam = package_source "opam" +InstallReceiptBuilder.luarocks = package_source "luarocks" + +InstallReceiptBuilder.unmanaged = { type = "unmanaged" } + +---@param repo string +---@param release string +function InstallReceiptBuilder.github_release(repo, release) + return { + type = "github_release", + repo = repo, + release = release, + } +end + +---@param dependency string +function InstallReceiptBuilder.system(dependency) + return { type = "system", dependency = dependency } +end + +---@param remote_url string +function InstallReceiptBuilder.git_remote(remote_url) + return { type = "git", remote = remote_url } +end + +---@class InstallReceipt +---@field public name string +---@field public schema_version InstallReceiptSchemaVersion +---@field public metrics {start_time:integer, completion_time:integer} +---@field public primary_source InstallReceiptSource +---@field public secondary_sources InstallReceiptSource[] +---@field public links InstallReceiptLinks +local InstallReceipt = {} +InstallReceipt.__index = InstallReceipt + +function InstallReceipt.new(props) + return setmetatable(props, InstallReceipt) +end + +function InstallReceipt.from_json(json) + return InstallReceipt.new(json) +end + +M.InstallReceiptBuilder = InstallReceiptBuilder +M.InstallReceipt = InstallReceipt + +return M diff --git a/lua/mason-core/result.lua b/lua/mason-core/result.lua new file mode 100644 index 00000000..132e2758 --- /dev/null +++ b/lua/mason-core/result.lua @@ -0,0 +1,152 @@ +---@class Failure +---@field error any +local Failure = {} +Failure.__index = Failure + +function Failure.new(error) + return setmetatable({ error = error }, Failure) +end + +---@class Result +---@field value any +local Result = {} +Result.__index = Result + +function Result.new(value) + return setmetatable({ + value = value, + }, Result) +end + +function Result.success(value) + return Result.new(value) +end + +function Result.failure(error) + return Result.new(Failure.new(error)) +end + +function Result:get_or_nil() + if self:is_success() then + return self.value + end +end + +function Result:get_or_else(value) + if self:is_success() then + return self.value + else + return value + end +end + +---@param exception any @(optional) The exception to throw if the result is a failure. +function Result:get_or_throw(exception) + if self:is_success() then + return self.value + else + if exception ~= nil then + error(exception, 2) + else + error(self.value.error, 2) + end + end +end + +function Result:err_or_nil() + if self:is_failure() then + return self.value.error + end +end + +function Result:is_failure() + return getmetatable(self.value) == Failure +end + +function Result:is_success() + return getmetatable(self.value) ~= Failure +end + +---@param mapper_fn fun(value: any): any +function Result:map(mapper_fn) + if self:is_success() then + return Result.success(mapper_fn(self.value)) + else + return self + end +end + +---@param mapper_fn fun(value: any): any +function Result:map_err(mapper_fn) + if self:is_failure() then + return Result.failure(mapper_fn(self.value.error)) + else + return self + end +end + +---@param mapper_fn fun(value: any): any +function Result:map_catching(mapper_fn) + if self:is_success() then + local ok, result = pcall(mapper_fn, self.value) + if ok then + return Result.success(result) + else + return Result.failure(result) + end + else + return self + end +end + +---@param recover_fn fun(value: any): any +function Result:recover(recover_fn) + if self:is_failure() then + return Result.success(recover_fn(self:err_or_nil())) + else + return self + end +end + +---@param recover_fn fun(value: any): any +function Result:recover_catching(recover_fn) + if self:is_failure() then + local ok, value = pcall(recover_fn, self:err_or_nil()) + if ok then + return Result.success(value) + else + return Result.failure(value) + end + else + return self + end +end + +---@param fn fun(value: any): any +function Result:on_failure(fn) + if self:is_failure() then + fn(self.value.error) + end + return self +end + +---@param fn fun(value: any): any +function Result:on_success(fn) + if self:is_success() then + fn(self.value) + end + return self +end + +---@param fn fun(): any +---@return Result +function Result.run_catching(fn) + local ok, result = pcall(fn) + if ok then + return Result.success(result) + else + return Result.failure(result) + end +end + +return Result diff --git a/lua/mason-core/spawn.lua b/lua/mason-core/spawn.lua new file mode 100644 index 00000000..6b783492 --- /dev/null +++ b/lua/mason-core/spawn.lua @@ -0,0 +1,112 @@ +local a = require "mason-core.async" +local _ = require "mason-core.functional" +local Result = require "mason-core.result" +local process = require "mason-core.process" +local platform = require "mason-core.platform" +local log = require "mason-core.log" + +---@alias JobSpawn table +---@type JobSpawn +local spawn = { + _aliases = { + npm = platform.is_win and "npm.cmd" or "npm", + gem = platform.is_win and "gem.cmd" or "gem", + composer = platform.is_win and "composer.bat" or "composer", + gradlew = platform.is_win and "gradlew.bat" or "gradlew", + -- for hererocks installations + luarocks = (platform.is_win and vim.fn.executable "luarocks.bat" == 1) and "luarocks.bat" or "luarocks", + rebar3 = platform.is_win and "rebar3.cmd" or "rebar3", + }, + _flatten_cmd_args = _.compose(_.filter(_.complement(_.equals(vim.NIL))), _.flatten), +} + +local function Failure(err, cmd) + return Result.failure(setmetatable(err, { + __tostring = function() + return ("spawn: %s failed with exit code %s and signal %s. %s"):format( + cmd, + err.exit_code or "-", + err.signal or "-", + err.stderr or "" + ) + end, + })) +end + +local is_executable = _.memoize(function(cmd) + if vim.in_fast_event() then + a.scheduler() + end + return vim.fn.executable(cmd) == 1 +end, _.identity) + +---@class SpawnArgs +---@field with_paths string[] @Optional. Paths to add to the PATH environment variable. +---@field env table @Optional. Example { SOME_ENV = "value", SOME_OTHER_ENV = "some_value" } +---@field env_raw string[] @Optional. Example: { "SOME_ENV=value", "SOME_OTHER_ENV=some_value" } +---@field stdio_sink StdioSink @Optional. If provided, will be used to write to stdout and stderr. +---@field cwd string @Optional +---@field on_spawn fun(handle: luv_handle, stdio: luv_pipe[]) @Optional. Will be called when the process successfully spawns. +---@field check_executable boolean @Optional. Whether to check if the provided command is executable (defaults to true). + +setmetatable(spawn, { + ---@param normalized_cmd string + __index = function(self, normalized_cmd) + ---@param args SpawnArgs + return function(args) + local cmd_args = self._flatten_cmd_args(args) + local env = args.env + + if args.with_paths then + env = env or {} + env.PATH = process.extend_path(args.with_paths) + end + + ---@type JobSpawnOpts + local spawn_args = { + stdio_sink = args.stdio_sink, + cwd = args.cwd, + env = env and process.graft_env(env) or args.env_raw, + args = cmd_args, + } + + local stdio + if not spawn_args.stdio_sink then + stdio = process.in_memory_sink() + spawn_args.stdio_sink = stdio.sink + end + + local cmd = self._aliases[normalized_cmd] or normalized_cmd + + if (env and env.PATH) == nil and args.check_executable ~= false and not is_executable(cmd) then + log.fmt_debug("%s is not executable", cmd) + return Failure({ + stderr = ("%s is not executable"):format(cmd), + }, cmd) + end + + local _, exit_code, signal = a.wait(function(resolve) + local handle, stdio, pid = process.spawn(cmd, spawn_args, resolve) + if args.on_spawn and handle and stdio and pid then + args.on_spawn(handle, stdio, pid) + end + end) + + if exit_code == 0 and signal == 0 then + return Result.success { + stdout = stdio and table.concat(stdio.buffers.stdout, "") or nil, + stderr = stdio and table.concat(stdio.buffers.stderr, "") or nil, + } + else + return Failure({ + exit_code = exit_code, + signal = signal, + stdout = stdio and table.concat(stdio.buffers.stdout, "") or nil, + stderr = stdio and table.concat(stdio.buffers.stderr, "") or nil, + }, cmd) + end + end + end, +}) + +return spawn diff --git a/lua/mason-core/ui/display.lua b/lua/mason-core/ui/display.lua new file mode 100644 index 00000000..47368079 --- /dev/null +++ b/lua/mason-core/ui/display.lua @@ -0,0 +1,507 @@ +local log = require "mason-core.log" +local state = require "mason-core.ui.state" + +local M = {} + +---@generic T +---@param debounced_fn fun(arg1: T) +---@return fun(arg1: T) +local function debounced(debounced_fn) + local queued = false + local last_arg = nil + return function(a) + last_arg = a + if queued then + return + end + queued = true + vim.schedule(function() + debounced_fn(last_arg) + queued = false + last_arg = nil + end) + end +end + +---@param line string +---@param render_context RenderContext +local function get_styles(line, render_context) + local indentation = 0 + + for i = 1, #render_context.applied_block_styles do + local styles = render_context.applied_block_styles[i] + for j = 1, #styles do + local style = styles[j] + if style == "INDENT" then + indentation = indentation + 2 + elseif style == "CENTERED" then + local padding = math.floor((render_context.viewport_context.win_width - #line) / 2) + indentation = math.max(0, padding) -- CENTERED overrides any already applied indentation + end + end + end + + return { + indentation = indentation, + } +end + +---@param viewport_context ViewportContext +---@param node INode +---@param _render_context RenderContext|nil +---@param _output RenderOutput|nil +local function render_node(viewport_context, node, _render_context, _output) + ---@class RenderContext + ---@field viewport_context ViewportContext + ---@field applied_block_styles CascadingStyle[] + local render_context = _render_context + or { + viewport_context = viewport_context, + applied_block_styles = {}, + } + ---@class RenderHighlight + ---@field hl_group string + ---@field line number + ---@field col_start number + ---@field col_end number + + ---@class RenderKeybind + ---@field line number + ---@field key string + ---@field effect string + ---@field payload any + + ---@class RenderDiagnostic + ---@field line number + ---@field diagnostic {message: string, severity: integer, source: string|nil} + + ---@class RenderOutput + ---@field lines string[] @The buffer lines. + ---@field virt_texts string[][] @List of (text, highlight) tuples. + ---@field highlights RenderHighlight[] + ---@field keybinds RenderKeybind[] + ---@field diagnostics RenderDiagnostic[] + ---@field sticky_cursors { line_map: table, id_map: table } + local output = _output + or { + lines = {}, + virt_texts = {}, + highlights = {}, + keybinds = {}, + diagnostics = {}, + sticky_cursors = { line_map = {}, id_map = {} }, + } + + if node.type == "VIRTUAL_TEXT" then + output.virt_texts[#output.virt_texts + 1] = { + line = #output.lines - 1, + content = node.virt_text, + } + elseif node.type == "HL_TEXT" then + for i = 1, #node.lines do + local line = node.lines[i] + local line_highlights = {} + local full_line = "" + for j = 1, #line do + local span = line[j] + local content, hl_group = span[1], span[2] + local col_start = #full_line + full_line = full_line .. content + if hl_group ~= "" then + line_highlights[#line_highlights + 1] = { + hl_group = hl_group, + line = #output.lines, + col_start = col_start, + col_end = col_start + #content, + } + end + end + + local active_styles = get_styles(full_line, render_context) + + -- apply indentation + full_line = (" "):rep(active_styles.indentation) .. full_line + for j = 1, #line_highlights do + local highlight = line_highlights[j] + highlight.col_start = highlight.col_start + active_styles.indentation + highlight.col_end = highlight.col_end + active_styles.indentation + output.highlights[#output.highlights + 1] = highlight + end + + output.lines[#output.lines + 1] = full_line + end + elseif node.type == "NODE" or node.type == "CASCADING_STYLE" then + if node.type == "CASCADING_STYLE" then + render_context.applied_block_styles[#render_context.applied_block_styles + 1] = node.styles + end + for i = 1, #node.children do + render_node(viewport_context, node.children[i], render_context, output) + end + if node.type == "CASCADING_STYLE" then + render_context.applied_block_styles[#render_context.applied_block_styles] = nil + end + elseif node.type == "KEYBIND_HANDLER" then + output.keybinds[#output.keybinds + 1] = { + line = node.is_global and -1 or #output.lines, + key = node.key, + effect = node.effect, + payload = node.payload, + } + elseif node.type == "DIAGNOSTICS" then + output.diagnostics[#output.diagnostics + 1] = { + line = #output.lines, + message = node.diagnostic.message, + severity = node.diagnostic.severity, + source = node.diagnostic.source, + } + elseif node.type == "STICKY_CURSOR" then + output.sticky_cursors.id_map[node.id] = #output.lines + output.sticky_cursors.line_map[#output.lines] = node.id + end + + return output +end + +-- exported for tests +M._render_node = render_node + +---@alias WindowOpts {effects: table, highlight_groups: table, border: string|table} + +---@param opts WindowOpenOpts +---@param sizes_only boolean @Whether to only return properties that control the window size. +local function create_popup_window_opts(opts, sizes_only) + local win_height = vim.o.lines - vim.o.cmdheight - 2 -- Add margin for status and buffer line + local win_width = vim.o.columns + local height = math.floor(win_height * 0.9) + local width = math.floor(win_width * 0.8) + local popup_layout = { + height = height, + width = width, + row = math.floor((win_height - height) / 2), + col = math.floor((win_width - width) / 2), + relative = "editor", + style = "minimal", + zindex = 50, + } + + if not sizes_only then + popup_layout.border = opts.border + end + + return popup_layout +end + +---@param name string @Human readable identifier. +---@param filetype string +function M.new_view_only_win(name, filetype) + local namespace = vim.api.nvim_create_namespace(("installer_%s"):format(name)) + local bufnr, renderer, mutate_state, get_state, unsubscribe, win_id, window_mgmt_augroup, autoclose_augroup, registered_keymaps, registered_keybinds, registered_effect_handlers + local has_initiated = false + ---@type WindowOpts + local window_opts = {} + + local function delete_win_buf() + -- We queue the win_buf to be deleted in a schedule call, otherwise when used with folke/which-key (and + -- set timeoutlen=0) we run into a weird segfault. + -- It should probably be unnecessary once https://github.com/neovim/neovim/issues/15548 is resolved + vim.schedule(function() + if win_id and vim.api.nvim_win_is_valid(win_id) then + log.trace "Deleting window" + vim.api.nvim_win_close(win_id, true) + end + if bufnr and vim.api.nvim_buf_is_valid(bufnr) then + log.trace "Deleting buffer" + vim.api.nvim_buf_delete(bufnr, { force = true }) + end + end) + end + + ---@param line number + ---@param key string + local function call_effect_handler(line, key) + local line_keybinds = registered_keybinds[line] + if line_keybinds then + local keybind = line_keybinds[key] + if keybind then + local effect_handler = registered_effect_handlers[keybind.effect] + if effect_handler then + log.fmt_trace("Calling handler for effect %s on line %d for key %s", keybind.effect, line, key) + effect_handler { payload = keybind.payload } + return true + end + end + end + return false + end + + local function dispatch_effect(key) + local line = vim.api.nvim_win_get_cursor(0)[1] + log.fmt_trace("Dispatching effect on line %d, key %s, bufnr %s", line, key, bufnr) + call_effect_handler(line, key) -- line keybinds + call_effect_handler(-1, key) -- global keybinds + end + + local output + local draw = function(view) + local win_valid = win_id ~= nil and vim.api.nvim_win_is_valid(win_id) + local buf_valid = bufnr ~= nil and vim.api.nvim_buf_is_valid(bufnr) + log.fmt_trace("got bufnr=%s", bufnr) + log.fmt_trace("got win_id=%s", win_id) + + if not win_valid or not buf_valid then + -- the window has been closed or the buffer is somehow no longer valid + unsubscribe(true) + log.trace("Buffer or window is no longer valid", win_id, bufnr) + return + end + + local win_width = vim.api.nvim_win_get_width(win_id) + ---@class ViewportContext + local viewport_context = { + win_width = win_width, + } + local cursor_pos_pre_render = vim.api.nvim_win_get_cursor(win_id) + local sticky_cursor + if output then + sticky_cursor = output.sticky_cursors.line_map[cursor_pos_pre_render[1]] + end + + output = render_node(viewport_context, view) + local lines, virt_texts, highlights, keybinds, diagnostics = + output.lines, output.virt_texts, output.highlights, output.keybinds, output.diagnostics + + -- set line contents + vim.api.nvim_buf_clear_namespace(bufnr, namespace, 0, -1) + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines) + vim.api.nvim_buf_set_option(bufnr, "modifiable", false) + + -- restore sticky cursor position + if sticky_cursor then + local new_sticky_cursor_line = output.sticky_cursors.id_map[sticky_cursor] + if new_sticky_cursor_line and new_sticky_cursor_line ~= cursor_pos_pre_render then + vim.api.nvim_win_set_cursor(win_id, { new_sticky_cursor_line, cursor_pos_pre_render[2] }) + end + end + + -- set virtual texts + for i = 1, #virt_texts do + local virt_text = virt_texts[i] + vim.api.nvim_buf_set_extmark(bufnr, namespace, virt_text.line, 0, { + virt_text = virt_text.content, + }) + end + + -- set diagnostics + vim.diagnostic.set( + namespace, + bufnr, + vim.tbl_map(function(diagnostic) + return { + lnum = diagnostic.line - 1, + col = 0, + message = diagnostic.message, + severity = diagnostic.severity, + source = diagnostic.source, + } + end, diagnostics), + { + signs = false, + } + ) + + -- set highlights + for i = 1, #highlights do + local highlight = highlights[i] + vim.api.nvim_buf_add_highlight( + bufnr, + namespace, + highlight.hl_group, + highlight.line, + highlight.col_start, + highlight.col_end + ) + end + + -- set keybinds + registered_keybinds = {} + for i = 1, #keybinds do + local keybind = keybinds[i] + if not registered_keybinds[keybind.line] then + registered_keybinds[keybind.line] = {} + end + registered_keybinds[keybind.line][keybind.key] = keybind + if not registered_keymaps[keybind.key] then + registered_keymaps[keybind.key] = true + vim.keymap.set("n", keybind.key, function() + dispatch_effect(keybind.key) + end, { + buffer = bufnr, + nowait = true, + silent = true, + }) + end + end + end + + ---@param opts WindowOpenOpts + local function open(opts) + bufnr = vim.api.nvim_create_buf(false, true) + win_id = vim.api.nvim_open_win(bufnr, true, create_popup_window_opts(opts, false)) + + registered_effect_handlers = window_opts.effects + registered_keybinds = {} + registered_keymaps = {} + + local buf_opts = { + modifiable = false, + swapfile = false, + textwidth = 0, + buftype = "nofile", + bufhidden = "wipe", + buflisted = false, + filetype = filetype, + undolevels = -1, + } + + local win_opts = { + number = false, + relativenumber = false, + wrap = false, + spell = false, + foldenable = false, + signcolumn = "no", + colorcolumn = "", + cursorline = true, + } + + -- window options + for key, value in pairs(win_opts) do + vim.api.nvim_win_set_option(win_id, key, value) + end + + -- buffer options + for key, value in pairs(buf_opts) do + vim.api.nvim_buf_set_option(bufnr, key, value) + end + + vim.cmd [[ syntax clear ]] + + window_mgmt_augroup = vim.api.nvim_create_augroup("MasonWindowMgmt", {}) + autoclose_augroup = vim.api.nvim_create_augroup("MasonWindow", {}) + + vim.api.nvim_create_autocmd({ "VimResized" }, { + group = window_mgmt_augroup, + buffer = bufnr, + callback = function() + if vim.api.nvim_win_is_valid(win_id) then + draw(renderer(get_state())) + vim.api.nvim_win_set_config(win_id, create_popup_window_opts(window_opts, true)) + end + end, + }) + + vim.api.nvim_create_autocmd({ "BufHidden", "BufUnload" }, { + group = autoclose_augroup, + buffer = bufnr, + callback = function() + -- Schedule is done because otherwise the window wont actually close in some cases (for example if + -- you're loading another buffer into it) + vim.schedule(function() + if vim.api.nvim_win_is_valid(win_id) then + vim.api.nvim_win_close(win_id, true) + end + end) + end, + }) + + local win_enter_aucmd + win_enter_aucmd = vim.api.nvim_create_autocmd({ "WinEnter" }, { + group = autoclose_augroup, + pattern = "*", + callback = function() + local buftype = vim.api.nvim_buf_get_option(0, "buftype") + -- This allows us to keep the floating window open for things like diagnostic popups, UI inputs รก la dressing.nvim, etc. + if buftype ~= "prompt" and buftype ~= "nofile" then + delete_win_buf() + vim.api.nvim_del_autocmd(win_enter_aucmd) + end + end, + }) + + return win_id + end + + return { + ---@param _renderer fun(state: table): table + view = function(_renderer) + renderer = _renderer + end, + ---@param _effects table + effects = function(_effects) + window_opts.effects = _effects + end, + ---@generic T : table + ---@param initial_state T + ---@return fun(mutate_fn: fun(current_state: T)), fun(): T + state = function(initial_state) + mutate_state, get_state, unsubscribe = state.create_state_container( + initial_state, + debounced(function(new_state) + draw(renderer(new_state)) + end) + ) + + -- we don't need to subscribe to state changes until the window is actually opened + unsubscribe(true) + + return mutate_state, get_state + end, + ---@param opts WindowOpts + init = function(opts) + assert(renderer ~= nil, "No view function has been registered. Call .view() before .init().") + assert(unsubscribe ~= nil, "No state has been registered. Call .state() before .init().") + window_opts = opts + if opts.highlight_groups then + for hl_name, args in pairs(opts.highlight_groups) do + vim.api.nvim_set_hl(0, hl_name, args) + end + end + has_initiated = true + end, + ---@alias WindowOpenOpts { border: string | table } + ---@type fun(opts: WindowOpenOpts) + open = vim.schedule_wrap(function(opts) + log.trace "Opening window" + assert(has_initiated, "Display has not been initiated, cannot open.") + if win_id and vim.api.nvim_win_is_valid(win_id) then + -- window is already open + return + end + unsubscribe(false) + open(opts) + draw(renderer(get_state())) + end), + ---@type fun() + close = vim.schedule_wrap(function() + assert(has_initiated, "Display has not been initiated, cannot close.") + unsubscribe(true) + log.fmt_trace("Closing window win_id=%s, bufnr=%s", win_id, bufnr) + delete_win_buf() + vim.api.nvim_del_augroup_by_id(window_mgmt_augroup) + vim.api.nvim_del_augroup_by_id(autoclose_augroup) + end), + ---@param pos number[] @(row, col) tuple + set_cursor = function(pos) + assert(win_id ~= nil, "Window has not been opened, cannot set cursor.") + return vim.api.nvim_win_set_cursor(win_id, pos) + end, + ---@return number[] @(row, col) tuple + get_cursor = function() + assert(win_id ~= nil, "Window has not been opened, cannot get cursor.") + return vim.api.nvim_win_get_cursor(win_id) + end, + } +end + +return M diff --git a/lua/mason-core/ui/init.lua b/lua/mason-core/ui/init.lua new file mode 100644 index 00000000..0b288b20 --- /dev/null +++ b/lua/mason-core/ui/init.lua @@ -0,0 +1,203 @@ +local _ = require "mason-core.functional" +local M = {} + +---@alias NodeType +---| '"NODE"' +---| '"CASCADING_STYLE"' +---| '"VIRTUAL_TEXT"' +---| '"DIAGNOSTICS"' +---| '"HL_TEXT"' +---| '"KEYBIND_HANDLER"' +---| '"STICKY_CURSOR"' + +---@alias INode Node | HlTextNode | CascadingStyleNode | VirtualTextNode | KeybindHandlerNode | DiagnosticsNode | StickyCursorNode + +---@param children INode[] +function M.Node(children) + ---@class Node + local node = { + type = "NODE", + children = children, + } + return node +end + +---@param lines_with_span_tuples string[][]|string[] +function M.HlTextNode(lines_with_span_tuples) + if type(lines_with_span_tuples[1]) == "string" then + -- this enables a convenience API for just rendering a single line (with just a single span) + lines_with_span_tuples = { { lines_with_span_tuples } } + end + ---@class HlTextNode + local node = { + type = "HL_TEXT", + lines = lines_with_span_tuples, + } + return node +end + +local create_unhighlighted_lines = _.map(function(line) + return { { line, "" } } +end) + +---@param lines string[] +function M.Text(lines) + return M.HlTextNode(create_unhighlighted_lines(lines)) +end + +---@alias CascadingStyle +---| '"INDENT"' +---| '"CENTERED"' + +---@param styles CascadingStyle[] +---@param children INode[] +function M.CascadingStyleNode(styles, children) + ---@class CascadingStyleNode + local node = { + type = "CASCADING_STYLE", + styles = styles, + children = children, + } + return node +end + +---@param virt_text string[][] @List of (text, highlight) tuples. +function M.VirtualTextNode(virt_text) + ---@class VirtualTextNode + local node = { + type = "VIRTUAL_TEXT", + virt_text = virt_text, + } + return node +end + +---@param diagnostic {message: string, severity: integer, source: string|nil} +function M.DiagnosticsNode(diagnostic) + ---@class DiagnosticsNode + local node = { + type = "DIAGNOSTICS", + diagnostic = diagnostic, + } + return node +end + +---@param condition boolean +---@param node INode | fun(): INode +---@param default_val any +function M.When(condition, node, default_val) + if condition then + if type(node) == "function" then + return node() + else + return node + end + end + return default_val or M.Node {} +end + +---@param key string @The keymap to register to. Example: "". +---@param effect string @The effect to call when keymap is triggered by the user. +---@param payload any @The payload to pass to the effect handler when triggered. +---@param is_global boolean|nil @Whether to register the keybind to apply on all lines in the buffer. +function M.Keybind(key, effect, payload, is_global) + ---@class KeybindHandlerNode + local node = { + type = "KEYBIND_HANDLER", + key = key, + effect = effect, + payload = payload, + is_global = is_global or false, + } + return node +end + +function M.EmptyLine() + return M.Text { "" } +end + +---@param rows string[][][] @A list of rows to include in the table. Each row consists of an array of (text, highlight) tuples (aka spans). +function M.Table(rows) + local col_maxwidth = {} + for i = 1, #rows do + local row = rows[i] + for j = 1, #row do + local col = row[j] + local content = col[1] + col_maxwidth[j] = math.max(vim.api.nvim_strwidth(content), col_maxwidth[j] or 0) + end + end + + for i = 1, #rows do + local row = rows[i] + for j = 1, #row do + local col = row[j] + local content = col[1] + col[1] = content .. string.rep(" ", col_maxwidth[j] - vim.api.nvim_strwidth(content) + 1) -- +1 for default minimum padding + end + end + + return M.HlTextNode(rows) +end + +---@param opts { id: string } +function M.StickyCursor(opts) + ---@class StickyCursorNode + local node = { + type = "STICKY_CURSOR", + id = opts.id, + } + return node +end + +---Makes it possible to create stateful animations by progressing from the start of a range to the end. +---This is done in "ticks", in accordance with the provided options. +---@param opts {range: integer[], delay_ms: integer, start_delay_ms: integer, iteration_delay_ms: integer} +function M.animation(opts) + local animation_fn = opts[1] + local start_tick, end_tick = opts.range[1], opts.range[2] + local is_animating = false + + local function start_animation() + if is_animating then + return + end + local tick, start + + tick = function(current_tick) + animation_fn(current_tick) + if current_tick < end_tick then + vim.defer_fn(function() + tick(current_tick + 1) + end, opts.delay_ms) + else + is_animating = false + if opts.iteration_delay_ms then + start(opts.iteration_delay_ms) + end + end + end + + start = function(delay_ms) + is_animating = true + if delay_ms then + vim.defer_fn(function() + tick(start_tick) + end, delay_ms) + else + tick(start_tick) + end + end + + start(opts.start_delay_ms) + + local function cancel() + is_animating = false + end + + return cancel + end + + return start_animation +end + +return M diff --git a/lua/mason-core/ui/state.lua b/lua/mason-core/ui/state.lua new file mode 100644 index 00000000..9d7bcdda --- /dev/null +++ b/lua/mason-core/ui/state.lua @@ -0,0 +1,24 @@ +local M = {} + +---@generic T : table +---@param initial_state T +---@param subscriber fun(state: T) +function M.create_state_container(initial_state, subscriber) + -- we do deepcopy to make sure instances of state containers doesn't mutate the initial state + local state = vim.deepcopy(initial_state) + local has_unsubscribed = false + + ---@param mutate_fn fun(current_state: table) + return function(mutate_fn) + mutate_fn(state) + if not has_unsubscribed then + subscriber(state) + end + end, function() + return state + end, function(val) + has_unsubscribed = val + end +end + +return M diff --git a/lua/mason-lspconfig/init.lua b/lua/mason-lspconfig/init.lua index bb1e407f..67f4cd16 100644 --- a/lua/mason-lspconfig/init.lua +++ b/lua/mason-lspconfig/init.lua @@ -1,10 +1,10 @@ -local log = require "mason.log" -local Package = require "mason.core.package" -local Optional = require "mason.core.optional" -local _ = require "mason.core.functional" +local log = require "mason-core.log" +local Package = require "mason-core.package" +local Optional = require "mason-core.optional" +local _ = require "mason-core.functional" local settings = require "mason-lspconfig.settings" -local server_mapping = require "mason-lspconfig.server-mapping" -local path = require "mason.core.path" +local server_mapping = require "mason-lspconfig.mappings.server" +local path = require "mason-core.path" local registry = require "mason-registry" local M = {} diff --git a/lua/mason-lspconfig/mappings/filetype.lua b/lua/mason-lspconfig/mappings/filetype.lua new file mode 100644 index 00000000..577bfe86 --- /dev/null +++ b/lua/mason-lspconfig/mappings/filetype.lua @@ -0,0 +1,162 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return { + OpenFOAM = { "foam_ls" }, + apexcode = { "apex_ls" }, + arduino = { "arduino_language_server" }, + asm = { "asm_lsp" }, + aspnetcorerazor = { "tailwindcss" }, + astro = { "astro", "tailwindcss" }, + ["astro-markdown"] = { "tailwindcss" }, + awk = { "awk_ls" }, + bean = { "beancount" }, + beancount = { "beancount" }, + bib = { "ltex", "texlab" }, + bicep = { "bicep" }, + blade = { "tailwindcss" }, + bsl = { "bsl_ls" }, + c = { "ccls", "clangd" }, + clar = { "clarity_lsp" }, + clarity = { "clarity_lsp" }, + clojure = { "clojure_lsp" }, + cmake = { "cmake" }, + cpp = { "ccls", "clangd" }, + crystal = { "crystalline", "scry" }, + cs = { "csharp_ls", "omnisharp" }, + css = { "cssls", "emmet_ls", "stylelint_lsp", "tailwindcss" }, + cucumber = { "cucumber_language_server" }, + cuda = { "clangd" }, + d = { "serve_d" }, + dhall = { "dhall_lsp_server" }, + ["django-html"] = { "tailwindcss" }, + dockerfile = { "dockerls" }, + dot = { "dotls" }, + dune = { "ocamllsp" }, + edge = { "tailwindcss" }, + edn = { "clojure_lsp" }, + eelixir = { "elixirls", "tailwindcss" }, + ejs = { "tailwindcss" }, + elixir = { "elixirls" }, + elm = { "elmls" }, + erb = { "tailwindcss" }, + erlang = { "erlangls" }, + eruby = { "tailwindcss" }, + flux = { "flux_lsp" }, + foam = { "foam_ls" }, + fortran = { "fortls" }, + fsharp = { "fsautocomplete" }, + genie = { "vala_ls" }, + gitcommit = { "ltex" }, + go = { "golangci_lint_ls", "gopls" }, + gohtml = { "tailwindcss" }, + gomod = { "golangci_lint_ls", "gopls" }, + gotmpl = { "gopls" }, + graphql = { "graphql" }, + groovy = { "groovyls" }, + haml = { "tailwindcss" }, + handlebars = { "ember", "tailwindcss" }, + haskell = { "hls" }, + haxe = { "haxe_language_server" }, + hbs = { "tailwindcss" }, + heex = { "elixirls", "tailwindcss" }, + hoon = { "hoon_ls" }, + html = { "angularls", "emmet_ls", "html", "tailwindcss" }, + ["html-eex"] = { "tailwindcss" }, + htmldjango = { "tailwindcss" }, + jade = { "tailwindcss" }, + java = { "jdtls" }, + javascript = { "cssmodules_ls", "denols", "ember", "eslint", "quick_lint_js", "rome", "stylelint_lsp", "tailwindcss", "tsserver" }, + ["javascript.jsx"] = { "denols", "eslint", "tsserver" }, + javascriptreact = { "cssmodules_ls", "denols", "eslint", "graphql", "rome", "stylelint_lsp", "tailwindcss", "tsserver" }, + json = { "jsonls", "rome" }, + jsonc = { "jsonls" }, + jsonnet = { "jsonnet_ls" }, + julia = { "julials" }, + kotlin = { "kotlin_language_server" }, + leaf = { "tailwindcss" }, + less = { "cssls", "stylelint_lsp", "tailwindcss" }, + lhaskell = { "hls" }, + libsonnet = { "jsonnet_ls" }, + liquid = { "tailwindcss", "theme_check" }, + llw = { "lelwel_ls" }, + lua = { "sumneko_lua" }, + markdown = { "grammarly", "ltex", "marksman", "prosemd_lsp", "remark_ls", "tailwindcss", "zk" }, + mdx = { "tailwindcss" }, + ["metamath-zero"] = { "mm0_ls" }, + mustache = { "tailwindcss" }, + mysql = { "sqlls", "sqls" }, + ncl = { "nickel_ls" }, + nickel = { "nickel_ls" }, + nim = { "nimls" }, + nix = { "rnix" }, + njk = { "tailwindcss" }, + nunjucks = { "tailwindcss" }, + objc = { "ccls", "clangd" }, + objcpp = { "ccls", "clangd" }, + ocaml = { "ocamllsp" }, + ["ocaml.interface"] = { "ocamllsp" }, + ["ocaml.menhir"] = { "ocamllsp" }, + ["ocaml.ocamllex"] = { "ocamllsp" }, + opencl = { "opencl_ls" }, + org = { "ltex" }, + os = { "bsl_ls" }, + perl = { "perlnavigator" }, + php = { "intelephense", "phpactor", "psalm", "tailwindcss" }, + plaintex = { "ltex" }, + postcss = { "tailwindcss" }, + prisma = { "prismals" }, + ps1 = { "powershell_es" }, + puppet = { "puppet" }, + purescript = { "purescriptls" }, + python = { "jedi_language_server", "pylsp", "pyright", "sourcery" }, + ql = { "codeqlls" }, + r = { "r_language_server" }, + razor = { "tailwindcss" }, + reason = { "ocamllsp", "reason_ls", "tailwindcss" }, + rescript = { "rescriptls", "tailwindcss" }, + rmd = { "r_language_server" }, + rnoweb = { "ltex" }, + robot = { "robotframework_ls" }, + rst = { "esbonio", "ltex" }, + ruby = { "solargraph", "sorbet" }, + rust = { "rust_analyzer" }, + sass = { "tailwindcss" }, + scss = { "cssls", "stylelint_lsp", "tailwindcss" }, + sh = { "bashls" }, + slim = { "tailwindcss" }, + slint = { "slint_lsp" }, + sls = { "salt_ls" }, + solidity = { "solang", "solc" }, + sql = { "sqlls", "sqls" }, + stylus = { "tailwindcss" }, + sugarss = { "stylelint_lsp", "tailwindcss" }, + svelte = { "svelte", "tailwindcss" }, + svg = { "lemminx" }, + systemverilog = { "svlangserver", "svls", "verible" }, + teal = { "teal_ls" }, + terraform = { "terraformls", "tflint" }, + tex = { "ltex", "texlab" }, + toml = { "taplo" }, + twig = { "tailwindcss" }, + typescript = { "angularls", "cssmodules_ls", "denols", "ember", "eslint", "rome", "stylelint_lsp", "tailwindcss", "tsserver" }, + ["typescript.tsx"] = { "angularls", "denols", "eslint", "rome", "tsserver" }, + typescriptreact = { "angularls", "cssmodules_ls", "denols", "eslint", "graphql", "rome", "stylelint_lsp", "tailwindcss", "tsserver" }, + vala = { "vala_ls" }, + vb = { "omnisharp" }, + verilog = { "svlangserver", "svls", "verible" }, + vim = { "vimls" }, + visualforce = { "visualforce_ls" }, + vlang = { "vls" }, + vmasm = { "asm_lsp" }, + vue = { "eslint", "stylelint_lsp", "tailwindcss", "volar", "vuels" }, + wxss = { "stylelint_lsp" }, + xml = { "lemminx" }, + xsd = { "lemminx" }, + xsl = { "lemminx" }, + xslt = { "lemminx" }, + yaml = { "yamlls" }, + ["yaml.ansible"] = { "ansiblels" }, + ["yaml.docker-compose"] = { "yamlls" }, + zig = { "zls" }, + zir = { "zls" } +} \ No newline at end of file diff --git a/lua/mason-lspconfig/mappings/server.lua b/lua/mason-lspconfig/mappings/server.lua new file mode 100644 index 00000000..9d784c9b --- /dev/null +++ b/lua/mason-lspconfig/mappings/server.lua @@ -0,0 +1,130 @@ +local _ = require "mason-core.functional" + +local M = {} + +---Maps lspconfig server config name to its corresponding package name. +-- TODO go through these.. fun times +M.lspconfig_to_package = { + ["angularls"] = "angular-language-server", + ["ansiblels"] = "ansible-language-server", + ["apex_ls"] = "apex-language-server", + ["arduino_language_server"] = "arduino-language-server", + ["asm_lsp"] = "asm-lsp", + ["astro"] = "astro-language-server", + ["awk_ls"] = "awk-language-server", + ["bashls"] = "bash-language-server", + ["beancount"] = "beancount-language-server", + ["bicep"] = "bicep-lsp", + ["bsl_ls"] = "bsl-language-server", + ["ccls"] = "ccls", + ["clangd"] = "clangd", + ["clarity_lsp"] = "clarity-lsp", + ["clojure_lsp"] = "clojure-lsp", + ["cmake"] = "cmake-language-server", + ["codeqlls"] = "codeql", + ["crystalline"] = "crystalline", + ["csharp_ls"] = "csharp-language-server", + ["cssls"] = "css-lsp", + ["cssmodules_ls"] = "cucumber-language-server", + ["cucumber_language_server"] = "cucumber-language-server", + ["denols"] = "deno-lsp", + ["dhall_lsp_server"] = "dhall-lsp", + ["diagnosticls"] = "diagnostic-languageserver", + ["dockerls"] = "dockerfile-language-server", + ["dotls"] = "dot-language-server", + ["efm"] = "efm", + ["elixirls"] = "elixir-ls", + ["elmls"] = "elm-language-server", + ["ember"] = "ember-language-server", + ["emmet_ls"] = "emmet-ls", + ["erlangls"] = "erlang-ls", + ["esbonio"] = "esbonio", + ["eslint"] = "eslint-lsp", + ["flux_lsp"] = "flux-lsp", + ["foam_ls"] = "foam-language-server", + ["fortls"] = "fortls", + ["fsautocomplete"] = "fsautocomplete", + ["golangci_lint_ls"] = "golangci-lint-langserver", + ["gopls"] = "gopls", + ["grammarly"] = "grammarly-languageserver", + ["graphql"] = "graphql-language-service-cli", + ["groovyls"] = "groovy-language-server", + ["haxe_language_server"] = "haxe-language-server", + ["hls"] = "haskell-language-server", + ["hoon_ls"] = "hoon-language-server", + ["html"] = "html-lsp", + ["intelephense"] = "intelephense", + ["jdtls"] = "jdtls", + ["jedi_language_server"] = "jedi-language-server", + ["jsonls"] = "json-lsp", + ["jsonnet_ls"] = "jsonnet-language-server", + ["julials"] = "julia-lsp", + ["kotlin_language_server"] = "kotlin-language-server", + ["lelwel_ls"] = "lelwel", + ["lemminx"] = "lemminx", + ["ltex"] = "ltex-ls", + ["marksman"] = "marksman", + ["mm0_ls"] = "metamath-zero-lsp", + ["nickel_ls"] = "nickel-lang-lsp", + ["nimls"] = "nimlsp", + ["ocamllsp"] = "ocaml-lsp", + ["omnisharp"] = "omnisharp-roslyn", + ["opencl_ls"] = "opencl-language-server", + ["perlnavigator"] = "perlnavigator", + ["phpactor"] = "phpactor", + ["powershell_es"] = "powershell-editor-services", + ["prismals"] = "prisma-language-server", + ["prosemd_lsp"] = "prosemd-lsp", + ["psalm"] = "psalm", + ["puppet"] = "puppet-editor-services", + ["purescriptls"] = "purescript-language-server", + ["pylsp"] = "python-lsp-server", + ["pyright"] = "pyright", + ["quick_lint_js"] = "quick-lint-js", + ["r_language_server"] = "r-languageserver", + ["reason_ls"] = "reason-language-server", + ["remark_ls"] = "remark-language-server", + ["rescriptls"] = "rescript-lsp", + ["rnix"] = "rnix-lsp", + ["robotframework_ls"] = "robotframework-lsp", + ["rome"] = "rome", + ["rust_analyzer"] = "rust-analyzer", + ["salt_ls"] = "salt-lsp", + ["scry"] = "scry", + ["serve_d"] = "serve-d", + ["slint_lsp"] = "slint-lsp", + ["solang"] = "solang", + ["solargraph"] = "solargraph", + ["solc"] = "solidity", + ["sorbet"] = "sorbet", + ["sourcery"] = "sourcery", + ["sqlls"] = "sqlls", + ["sqls"] = "sqls", + ["stylelint_lsp"] = "stylelint-lsp", + ["sumneko_lua"] = "lua-language-server", + ["svelte"] = "svelte-language-server", + ["svlangserver"] = "svlangserver", + ["svls"] = "svls", + ["tailwindcss"] = "tailwindcss-language-server", + ["taplo"] = "taplo", + ["teal_ls"] = "teal-language-server", + ["terraformls"] = "terraform-ls", + ["texlab"] = "texlab", + ["tflint"] = "tflint", + ["theme_check"] = "shopify-theme-check", + ["tsserver"] = "typescript-language-server", + ["vala_ls"] = "vala-language-server", + ["verible"] = "verible", + ["vimls"] = "vim-language-server", + ["visualforce_ls"] = "visualforce-language-server", + ["vls"] = "vls", + ["volar"] = "vue-language-server", + ["vuels"] = "vetur-vls", + ["yamlls"] = "yaml-language-server", + ["zk"] = "zk", + ["zls"] = "zls", +} + +M.package_to_lspconfig = _.invert(M.lspconfig_to_package) + +return M diff --git a/lua/mason-lspconfig/server-mapping.lua b/lua/mason-lspconfig/server-mapping.lua deleted file mode 100644 index 89290c1c..00000000 --- a/lua/mason-lspconfig/server-mapping.lua +++ /dev/null @@ -1,130 +0,0 @@ -local _ = require "mason.core.functional" - -local M = {} - ----Maps lspconfig server config name to its corresponding package name. --- TODO go through these.. fun times -M.lspconfig_to_package = { - ["angularls"] = "angular-language-server", - ["ansiblels"] = "ansible-language-server", - ["apex_ls"] = "apex-language-server", - ["arduino_language_server"] = "arduino-language-server", - ["asm_lsp"] = "asm-lsp", - ["astro"] = "astro-language-server", - ["awk_ls"] = "awk-language-server", - ["bashls"] = "bash-language-server", - ["beancount"] = "beancount-language-server", - ["bicep"] = "bicep-lsp", - ["bsl_ls"] = "bsl-language-server", - ["ccls"] = "ccls", - ["clangd"] = "clangd", - ["clarity_lsp"] = "clarity-lsp", - ["clojure_lsp"] = "clojure-lsp", - ["cmake"] = "cmake-language-server", - ["codeqlls"] = "codeql", - ["crystalline"] = "crystalline", - ["csharp_ls"] = "csharp-language-server", - ["cssls"] = "css-lsp", - ["cssmodules_ls"] = "cucumber-language-server", - ["cucumber_language_server"] = "cucumber-language-server", - ["denols"] = "deno-lsp", - ["dhall_lsp_server"] = "dhall-lsp", - ["diagnosticls"] = "diagnostic-languageserver", - ["dockerls"] = "dockerfile-language-server", - ["dotls"] = "dot-language-server", - ["efm"] = "efm", - ["elixirls"] = "elixir-ls", - ["elmls"] = "elm-language-server", - ["ember"] = "ember-language-server", - ["emmet_ls"] = "emmet-ls", - ["erlangls"] = "erlang-ls", - ["esbonio"] = "esbonio", - ["eslint"] = "eslint-lsp", - ["flux_lsp"] = "flux-lsp", - ["foam_ls"] = "foam-language-server", - ["fortls"] = "fortls", - ["fsautocomplete"] = "fsautocomplete", - ["golangci_lint_ls"] = "golangci-lint-langserver", - ["gopls"] = "gopls", - ["grammarly"] = "grammarly-languageserver", - ["graphql"] = "graphql-language-service-cli", - ["groovyls"] = "groovy-language-server", - ["haxe_language_server"] = "haxe-language-server", - ["hls"] = "haskell-language-server", - ["hoon_ls"] = "hoon-language-server", - ["html"] = "html-lsp", - ["intelephense"] = "intelephense", - ["jdtls"] = "jdtls", - ["jedi_language_server"] = "jedi-language-server", - ["jsonls"] = "json-lsp", - ["jsonnet_ls"] = "jsonnet-language-server", - ["julials"] = "julia-lsp", - ["kotlin_language_server"] = "kotlin-language-server", - ["lelwel_ls"] = "lelwel", - ["lemminx"] = "lemminx", - ["ltex"] = "ltex-ls", - ["marksman"] = "marksman", - ["mm0_ls"] = "metamath-zero-lsp", - ["nickel_ls"] = "nickel-lang-lsp", - ["nimls"] = "nimlsp", - ["ocamllsp"] = "ocaml-lsp", - ["omnisharp"] = "omnisharp-roslyn", - ["opencl_ls"] = "opencl-language-server", - ["perlnavigator"] = "perlnavigator", - ["phpactor"] = "phpactor", - ["powershell_es"] = "powershell-editor-services", - ["prismals"] = "prisma-language-server", - ["prosemd_lsp"] = "prosemd-lsp", - ["psalm"] = "psalm", - ["puppet"] = "puppet-editor-services", - ["purescriptls"] = "purescript-language-server", - ["pylsp"] = "python-lsp-server", - ["pyright"] = "pyright", - ["quick_lint_js"] = "quick-lint-js", - ["r_language_server"] = "r-languageserver", - ["reason_ls"] = "reason-language-server", - ["remark_ls"] = "remark-language-server", - ["rescriptls"] = "rescript-lsp", - ["rnix"] = "rnix-lsp", - ["robotframework_ls"] = "robotframework-lsp", - ["rome"] = "rome", - ["rust_analyzer"] = "rust-analyzer", - ["salt_ls"] = "salt-lsp", - ["scry"] = "scry", - ["serve_d"] = "serve-d", - ["slint_lsp"] = "slint-lsp", - ["solang"] = "solang", - ["solargraph"] = "solargraph", - ["solc"] = "solidity", - ["sorbet"] = "sorbet", - ["sourcery"] = "sourcery", - ["sqlls"] = "sqlls", - ["sqls"] = "sqls", - ["stylelint_lsp"] = "stylelint-lsp", - ["sumneko_lua"] = "lua-language-server", - ["svelte"] = "svelte-language-server", - ["svlangserver"] = "svlangserver", - ["svls"] = "svls", - ["tailwindcss"] = "tailwindcss-language-server", - ["taplo"] = "taplo", - ["teal_ls"] = "teal-language-server", - ["terraformls"] = "terraform-ls", - ["texlab"] = "texlab", - ["tflint"] = "tflint", - ["theme_check"] = "shopify-theme-check", - ["tsserver"] = "typescript-language-server", - ["vala_ls"] = "vala-language-server", - ["verible"] = "verible", - ["vimls"] = "vim-language-server", - ["visualforce_ls"] = "visualforce-language-server", - ["vls"] = "vls", - ["volar"] = "vue-language-server", - ["vuels"] = "vetur-vls", - ["yamlls"] = "yaml-language-server", - ["zk"] = "zk", - ["zls"] = "zls", -} - -M.package_to_lspconfig = _.invert(M.lspconfig_to_package) - -return M diff --git a/lua/mason-lspconfig/server_configurations/angularls/init.lua b/lua/mason-lspconfig/server_configurations/angularls/init.lua index c9076c4e..de655a40 100644 --- a/lua/mason-lspconfig/server_configurations/angularls/init.lua +++ b/lua/mason-lspconfig/server_configurations/angularls/init.lua @@ -1,7 +1,7 @@ -local platform = require "mason.core.platform" -local npm = require "mason.core.managers.npm" -local _ = require "mason.core.functional" -local path = require "mason.core.path" +local platform = require "mason-core.platform" +local npm = require "mason-core.managers.npm" +local _ = require "mason-core.functional" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/apex_ls/init.lua b/lua/mason-lspconfig/server_configurations/apex_ls/init.lua index 3067a080..6251dc73 100644 --- a/lua/mason-lspconfig/server_configurations/apex_ls/init.lua +++ b/lua/mason-lspconfig/server_configurations/apex_ls/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/bicep/init.lua b/lua/mason-lspconfig/server_configurations/bicep/init.lua index 93bac594..ba5e4a6a 100644 --- a/lua/mason-lspconfig/server_configurations/bicep/init.lua +++ b/lua/mason-lspconfig/server_configurations/bicep/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/bsl_ls/init.lua b/lua/mason-lspconfig/server_configurations/bsl_ls/init.lua index 51c3b328..d8971320 100644 --- a/lua/mason-lspconfig/server_configurations/bsl_ls/init.lua +++ b/lua/mason-lspconfig/server_configurations/bsl_ls/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/elixirls/init.lua b/lua/mason-lspconfig/server_configurations/elixirls/init.lua index 08bf6315..afad677b 100644 --- a/lua/mason-lspconfig/server_configurations/elixirls/init.lua +++ b/lua/mason-lspconfig/server_configurations/elixirls/init.lua @@ -1,5 +1,5 @@ -local path = require "mason.core.path" -local platform = require "mason.core.platform" +local path = require "mason-core.path" +local platform = require "mason-core.platform" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/groovyls/init.lua b/lua/mason-lspconfig/server_configurations/groovyls/init.lua index c917fcf2..a4cb61cb 100644 --- a/lua/mason-lspconfig/server_configurations/groovyls/init.lua +++ b/lua/mason-lspconfig/server_configurations/groovyls/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/haxe_language_server/init.lua b/lua/mason-lspconfig/server_configurations/haxe_language_server/init.lua index 4f8fb070..ed1cd4bc 100644 --- a/lua/mason-lspconfig/server_configurations/haxe_language_server/init.lua +++ b/lua/mason-lspconfig/server_configurations/haxe_language_server/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/jdtls/init.lua b/lua/mason-lspconfig/server_configurations/jdtls/init.lua index 28b69d30..bd334133 100644 --- a/lua/mason-lspconfig/server_configurations/jdtls/init.lua +++ b/lua/mason-lspconfig/server_configurations/jdtls/init.lua @@ -1,6 +1,6 @@ -local path = require "mason.core.path" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" +local path = require "mason-core.path" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/julials/init.lua b/lua/mason-lspconfig/server_configurations/julials/init.lua index afa89662..6166e35d 100644 --- a/lua/mason-lspconfig/server_configurations/julials/init.lua +++ b/lua/mason-lspconfig/server_configurations/julials/init.lua @@ -1,7 +1,7 @@ -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local fs = require "mason.core.fs" -local _ = require "mason.core.functional" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local fs = require "mason-core.fs" +local _ = require "mason-core.functional" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/omnisharp/init.lua b/lua/mason-lspconfig/server_configurations/omnisharp/init.lua index 5ff2b9fc..cb925b3f 100644 --- a/lua/mason-lspconfig/server_configurations/omnisharp/init.lua +++ b/lua/mason-lspconfig/server_configurations/omnisharp/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string ---@param use_mono boolean diff --git a/lua/mason-lspconfig/server_configurations/perlnavigator/init.lua b/lua/mason-lspconfig/server_configurations/perlnavigator/init.lua index bf59e06d..5f21d32c 100644 --- a/lua/mason-lspconfig/server_configurations/perlnavigator/init.lua +++ b/lua/mason-lspconfig/server_configurations/perlnavigator/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/pylsp/init.lua b/lua/mason-lspconfig/server_configurations/pylsp/init.lua index 26da1dfd..9626fdca 100644 --- a/lua/mason-lspconfig/server_configurations/pylsp/init.lua +++ b/lua/mason-lspconfig/server_configurations/pylsp/init.lua @@ -1,9 +1,9 @@ -local a = require "mason.core.async" -local _ = require "mason.core.functional" -local pip3 = require "mason.core.managers.pip3" -local process = require "mason.core.process" -local notify = require "mason.notify" -local spawn = require "mason.core.spawn" +local a = require "mason-core.async" +local _ = require "mason-core.functional" +local pip3 = require "mason-core.managers.pip3" +local process = require "mason-core.process" +local notify = require "mason-core.notify" +local spawn = require "mason-core.spawn" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/r_language_server/init.lua b/lua/mason-lspconfig/server_configurations/r_language_server/init.lua index b4659995..3f7f413e 100644 --- a/lua/mason-lspconfig/server_configurations/r_language_server/init.lua +++ b/lua/mason-lspconfig/server_configurations/r_language_server/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/rescriptls/init.lua b/lua/mason-lspconfig/server_configurations/rescriptls/init.lua index 557af1cd..4a605bbf 100644 --- a/lua/mason-lspconfig/server_configurations/rescriptls/init.lua +++ b/lua/mason-lspconfig/server_configurations/rescriptls/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/solang/init.lua b/lua/mason-lspconfig/server_configurations/solang/init.lua index ab756afd..2d8dcf79 100644 --- a/lua/mason-lspconfig/server_configurations/solang/init.lua +++ b/lua/mason-lspconfig/server_configurations/solang/init.lua @@ -1,5 +1,5 @@ -local path = require "mason.core.path" -local process = require "mason.core.process" +local path = require "mason-core.path" +local process = require "mason-core.process" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/visualforce_ls/init.lua b/lua/mason-lspconfig/server_configurations/visualforce_ls/init.lua index b6209385..33485da3 100644 --- a/lua/mason-lspconfig/server_configurations/visualforce_ls/init.lua +++ b/lua/mason-lspconfig/server_configurations/visualforce_ls/init.lua @@ -1,4 +1,4 @@ -local path = require "mason.core.path" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-lspconfig/server_configurations/volar/init.lua b/lua/mason-lspconfig/server_configurations/volar/init.lua index 80b9841a..9c128141 100644 --- a/lua/mason-lspconfig/server_configurations/volar/init.lua +++ b/lua/mason-lspconfig/server_configurations/volar/init.lua @@ -1,6 +1,6 @@ -local npm = require "mason.core.managers.npm" -local fs = require "mason.core.fs" -local path = require "mason.core.path" +local npm = require "mason-core.managers.npm" +local fs = require "mason-core.fs" +local path = require "mason-core.path" ---@param install_dir string return function(install_dir) diff --git a/lua/mason-registry/angular-language-server/init.lua b/lua/mason-registry/angular-language-server/init.lua index 6a7e42fc..3c1aefec 100644 --- a/lua/mason-registry/angular-language-server/init.lua +++ b/lua/mason-registry/angular-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "angular-language-server", diff --git a/lua/mason-registry/ansible-language-server/init.lua b/lua/mason-registry/ansible-language-server/init.lua index d1749e71..abb6e1df 100644 --- a/lua/mason-registry/ansible-language-server/init.lua +++ b/lua/mason-registry/ansible-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "ansible-language-server", diff --git a/lua/mason-registry/apex-language-server/init.lua b/lua/mason-registry/apex-language-server/init.lua index 0dad40e6..3c690e7e 100644 --- a/lua/mason-registry/apex-language-server/init.lua +++ b/lua/mason-registry/apex-language-server/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local github_client = require "mason.core.managers.github.client" -local Optional = require "mason.core.optional" -local path = require "mason.core.path" -local _ = require "mason.core.functional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local github_client = require "mason-core.managers.github.client" +local Optional = require "mason-core.optional" +local path = require "mason-core.path" +local _ = require "mason-core.functional" local JAR_FILE = "apex-jorje-lsp.jar" return Pkg.new { diff --git a/lua/mason-registry/arduino-language-server/init.lua b/lua/mason-registry/arduino-language-server/init.lua index 7801ae79..0eaec1d9 100644 --- a/lua/mason-registry/arduino-language-server/init.lua +++ b/lua/mason-registry/arduino-language-server/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/asm-lsp/init.lua b/lua/mason-registry/asm-lsp/init.lua index f28afba9..9b2cc6fd 100644 --- a/lua/mason-registry/asm-lsp/init.lua +++ b/lua/mason-registry/asm-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "asm-lsp", diff --git a/lua/mason-registry/astro-language-server/init.lua b/lua/mason-registry/astro-language-server/init.lua index 03a4cb79..b5045111 100644 --- a/lua/mason-registry/astro-language-server/init.lua +++ b/lua/mason-registry/astro-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "astro-language-server", diff --git a/lua/mason-registry/awk-language-server/init.lua b/lua/mason-registry/awk-language-server/init.lua index 39f9cc54..9b725cfa 100644 --- a/lua/mason-registry/awk-language-server/init.lua +++ b/lua/mason-registry/awk-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "awk-language-server", diff --git a/lua/mason-registry/bash-language-server/init.lua b/lua/mason-registry/bash-language-server/init.lua index eb5fb68d..26e16b7f 100644 --- a/lua/mason-registry/bash-language-server/init.lua +++ b/lua/mason-registry/bash-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "bash-language-server", diff --git a/lua/mason-registry/beancount-language-server/init.lua b/lua/mason-registry/beancount-language-server/init.lua index 579f5777..9c545ff0 100644 --- a/lua/mason-registry/beancount-language-server/init.lua +++ b/lua/mason-registry/beancount-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "beancount-language-server", diff --git a/lua/mason-registry/bicep-lsp/init.lua b/lua/mason-registry/bicep-lsp/init.lua index 0e1eff44..d7acf134 100644 --- a/lua/mason-registry/bicep-lsp/init.lua +++ b/lua/mason-registry/bicep-lsp/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local path = require "mason-core.path" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" return Pkg.new { name = "bicep-lsp", diff --git a/lua/mason-registry/bsl-language-server/init.lua b/lua/mason-registry/bsl-language-server/init.lua index be28e06b..e9575e9b 100644 --- a/lua/mason-registry/bsl-language-server/init.lua +++ b/lua/mason-registry/bsl-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" return Pkg.new { name = "bsl-language-server", diff --git a/lua/mason-registry/ccls/common.lua b/lua/mason-registry/ccls/common.lua index 728943a9..7393a0b5 100644 --- a/lua/mason-registry/ccls/common.lua +++ b/lua/mason-registry/ccls/common.lua @@ -1,9 +1,9 @@ -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local installer = require "mason.core.installer" -local git = require "mason.core.managers.git" -local github = require "mason.core.managers.github" -local Optional = require "mason.core.optional" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local installer = require "mason-core.installer" +local git = require "mason-core.managers.git" +local github = require "mason-core.managers.github" +local Optional = require "mason-core.optional" ---@async ---@param opts {llvm_dir: string} diff --git a/lua/mason-registry/ccls/init.lua b/lua/mason-registry/ccls/init.lua index 7f38c956..cacbebb5 100644 --- a/lua/mason-registry/ccls/init.lua +++ b/lua/mason-registry/ccls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" return Pkg.new { name = "ccls", diff --git a/lua/mason-registry/ccls/linux.lua b/lua/mason-registry/ccls/linux.lua index b2cb31af..fa735266 100644 --- a/lua/mason-registry/ccls/linux.lua +++ b/lua/mason-registry/ccls/linux.lua @@ -1,10 +1,10 @@ -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local installer = require "mason.core.installer" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" -local Result = require "mason.core.result" -local Optional = require "mason.core.optional" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local installer = require "mason-core.installer" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" +local Result = require "mason-core.result" +local Optional = require "mason-core.optional" local ccls_installer = require "mason-registry.ccls.common" diff --git a/lua/mason-registry/ccls/mac.lua b/lua/mason-registry/ccls/mac.lua index 53b26f93..bd2efe0a 100644 --- a/lua/mason-registry/ccls/mac.lua +++ b/lua/mason-registry/ccls/mac.lua @@ -1,7 +1,7 @@ -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local installer = require "mason.core.installer" -local fs = require "mason.core.fs" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local installer = require "mason-core.installer" +local fs = require "mason-core.fs" local ccls_installer = require "mason-registry.ccls.common" diff --git a/lua/mason-registry/chrome-debug-adapter/init.lua b/lua/mason-registry/chrome-debug-adapter/init.lua index 29085399..611045c9 100644 --- a/lua/mason-registry/chrome-debug-adapter/init.lua +++ b/lua/mason-registry/chrome-debug-adapter/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local git = require "mason.core.managers.git" -local _ = require "mason.core.functional" -local path = require "mason.core.path" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local git = require "mason-core.managers.git" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local Optional = require "mason-core.optional" return Pkg.new { name = "chrome-debug-adapter", diff --git a/lua/mason-registry/clangd/init.lua b/lua/mason-registry/clangd/init.lua index 6f5657b1..335b7ab8 100644 --- a/lua/mason-registry/clangd/init.lua +++ b/lua/mason-registry/clangd/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/clarity-lsp/init.lua b/lua/mason-registry/clarity-lsp/init.lua index 3c2b6da8..d919ad85 100644 --- a/lua/mason-registry/clarity-lsp/init.lua +++ b/lua/mason-registry/clarity-lsp/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/clojure-lsp/init.lua b/lua/mason-registry/clojure-lsp/init.lua index 78e8461e..6d2257a2 100644 --- a/lua/mason-registry/clojure-lsp/init.lua +++ b/lua/mason-registry/clojure-lsp/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/cmake-language-server/init.lua b/lua/mason-registry/cmake-language-server/init.lua index 9c5089ad..40290488 100644 --- a/lua/mason-registry/cmake-language-server/init.lua +++ b/lua/mason-registry/cmake-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "cmake-language-server", diff --git a/lua/mason-registry/codelldb/init.lua b/lua/mason-registry/codelldb/init.lua index ee12f761..563ad2bd 100644 --- a/lua/mason-registry/codelldb/init.lua +++ b/lua/mason-registry/codelldb/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local path = require "mason-core.path" return Pkg.new { name = "codelldb", diff --git a/lua/mason-registry/codeql/init.lua b/lua/mason-registry/codeql/init.lua index 849c355d..e3af164c 100644 --- a/lua/mason-registry/codeql/init.lua +++ b/lua/mason-registry/codeql/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/cpptools/init.lua b/lua/mason-registry/cpptools/init.lua index 1ef5ffa2..86b6ecd6 100644 --- a/lua/mason-registry/cpptools/init.lua +++ b/lua/mason-registry/cpptools/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local path = require "mason-core.path" return Pkg.new { name = "cpptools", diff --git a/lua/mason-registry/crystalline/init.lua b/lua/mason-registry/crystalline/init.lua index 22d426fc..10966976 100644 --- a/lua/mason-registry/crystalline/init.lua +++ b/lua/mason-registry/crystalline/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/csharp-language-server/init.lua b/lua/mason-registry/csharp-language-server/init.lua index 1147cf28..34093a9f 100644 --- a/lua/mason-registry/csharp-language-server/init.lua +++ b/lua/mason-registry/csharp-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local dotnet = require "mason.core.managers.dotnet" +local Pkg = require "mason-core.package" +local dotnet = require "mason-core.managers.dotnet" return Pkg.new { name = "csharp-language-server", diff --git a/lua/mason-registry/css-lsp/init.lua b/lua/mason-registry/css-lsp/init.lua index c1562aec..be94b476 100644 --- a/lua/mason-registry/css-lsp/init.lua +++ b/lua/mason-registry/css-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "css-lsp", diff --git a/lua/mason-registry/cssmodules-language-server/init.lua b/lua/mason-registry/cssmodules-language-server/init.lua index 098a167f..30e86696 100644 --- a/lua/mason-registry/cssmodules-language-server/init.lua +++ b/lua/mason-registry/cssmodules-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "cssmodules-language-server", diff --git a/lua/mason-registry/cucumber-language-server/init.lua b/lua/mason-registry/cucumber-language-server/init.lua index 7e6cd44c..8e4c8434 100644 --- a/lua/mason-registry/cucumber-language-server/init.lua +++ b/lua/mason-registry/cucumber-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "cucumber-language-server", diff --git a/lua/mason-registry/debugpy/init.lua b/lua/mason-registry/debugpy/init.lua index 79e71825..fefe7bfc 100644 --- a/lua/mason-registry/debugpy/init.lua +++ b/lua/mason-registry/debugpy/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "debugpy", diff --git a/lua/mason-registry/delve/init.lua b/lua/mason-registry/delve/init.lua index eb6c9e59..a0e3e121 100644 --- a/lua/mason-registry/delve/init.lua +++ b/lua/mason-registry/delve/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "delve", diff --git a/lua/mason-registry/deno/init.lua b/lua/mason-registry/deno/init.lua index 1ec24302..657602e1 100644 --- a/lua/mason-registry/deno/init.lua +++ b/lua/mason-registry/deno/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/dhall-lsp/init.lua b/lua/mason-registry/dhall-lsp/init.lua index 85f7ac23..469a9231 100644 --- a/lua/mason-registry/dhall-lsp/init.lua +++ b/lua/mason-registry/dhall-lsp/init.lua @@ -1,10 +1,10 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local std = require "mason.core.managers.std" -local github_client = require "mason.core.managers.github.client" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local std = require "mason-core.managers.std" +local github_client = require "mason-core.managers.github.client" +local Optional = require "mason-core.optional" return Pkg.new { name = "dhall-lsp", diff --git a/lua/mason-registry/diagnostic-languageserver/init.lua b/lua/mason-registry/diagnostic-languageserver/init.lua index af69a0a4..f05775bc 100644 --- a/lua/mason-registry/diagnostic-languageserver/init.lua +++ b/lua/mason-registry/diagnostic-languageserver/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "diagnostic-languageserver", diff --git a/lua/mason-registry/dockerfile-language-server/init.lua b/lua/mason-registry/dockerfile-language-server/init.lua index b81b6197..71eada1d 100644 --- a/lua/mason-registry/dockerfile-language-server/init.lua +++ b/lua/mason-registry/dockerfile-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "dockerfile-language-server", diff --git a/lua/mason-registry/dot-language-server/init.lua b/lua/mason-registry/dot-language-server/init.lua index 32520c85..6d51d3d8 100644 --- a/lua/mason-registry/dot-language-server/init.lua +++ b/lua/mason-registry/dot-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "dot-language-server", diff --git a/lua/mason-registry/efm/init.lua b/lua/mason-registry/efm/init.lua index b91e375e..30891f79 100644 --- a/lua/mason-registry/efm/init.lua +++ b/lua/mason-registry/efm/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "efm", diff --git a/lua/mason-registry/elixir-ls/init.lua b/lua/mason-registry/elixir-ls/init.lua index 8e164fed..a5d0a8d4 100644 --- a/lua/mason-registry/elixir-ls/init.lua +++ b/lua/mason-registry/elixir-ls/init.lua @@ -1,6 +1,5 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" return Pkg.new { name = "elixir-ls", @@ -9,8 +8,7 @@ return Pkg.new { languages = { Pkg.Lang.Elixir }, categories = { Pkg.Cat.LSP, Pkg.Cat.DAP }, ---@async - ---@param ctx InstallContext - install = function(ctx) + install = function() github .unzip_release_file({ repo = "elixir-lsp/elixir-ls", diff --git a/lua/mason-registry/elm-format/init.lua b/lua/mason-registry/elm-format/init.lua index e162ffdc..00028b35 100644 --- a/lua/mason-registry/elm-format/init.lua +++ b/lua/mason-registry/elm-format/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "elm-format", diff --git a/lua/mason-registry/elm-language-server/init.lua b/lua/mason-registry/elm-language-server/init.lua index 847bed49..279a0649 100644 --- a/lua/mason-registry/elm-language-server/init.lua +++ b/lua/mason-registry/elm-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "elm-language-server", diff --git a/lua/mason-registry/ember-language-server/init.lua b/lua/mason-registry/ember-language-server/init.lua index 62bd701b..b22b2292 100644 --- a/lua/mason-registry/ember-language-server/init.lua +++ b/lua/mason-registry/ember-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "ember-language-server", diff --git a/lua/mason-registry/emmet-ls/init.lua b/lua/mason-registry/emmet-ls/init.lua index 6f9e3058..dbc766ee 100644 --- a/lua/mason-registry/emmet-ls/init.lua +++ b/lua/mason-registry/emmet-ls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "emmet-ls", diff --git a/lua/mason-registry/erlang-ls/init.lua b/lua/mason-registry/erlang-ls/init.lua index a6a22e0f..6d3bbb72 100644 --- a/lua/mason-registry/erlang-ls/init.lua +++ b/lua/mason-registry/erlang-ls/init.lua @@ -1,10 +1,10 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local std = require "mason.core.managers.std" -local git = require "mason.core.managers.git" -local github = require "mason.core.managers.github" -local Optional = require "mason.core.optional" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local std = require "mason-core.managers.std" +local git = require "mason-core.managers.git" +local github = require "mason-core.managers.github" +local Optional = require "mason-core.optional" +local path = require "mason-core.path" local rebar3 = platform.is_win and "rebar3.cmd" or "rebar3" diff --git a/lua/mason-registry/esbonio/init.lua b/lua/mason-registry/esbonio/init.lua index 278f100a..9b607180 100644 --- a/lua/mason-registry/esbonio/init.lua +++ b/lua/mason-registry/esbonio/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "esbonio", diff --git a/lua/mason-registry/eslint-lsp/init.lua b/lua/mason-registry/eslint-lsp/init.lua index b1d22e84..d849c051 100644 --- a/lua/mason-registry/eslint-lsp/init.lua +++ b/lua/mason-registry/eslint-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "eslint-lsp", diff --git a/lua/mason-registry/firefox-debug-adapter/init.lua b/lua/mason-registry/firefox-debug-adapter/init.lua index 20345dff..13dcf7f7 100644 --- a/lua/mason-registry/firefox-debug-adapter/init.lua +++ b/lua/mason-registry/firefox-debug-adapter/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local git = require "mason.core.managers.git" -local _ = require "mason.core.functional" -local path = require "mason.core.path" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local git = require "mason-core.managers.git" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local Optional = require "mason-core.optional" return Pkg.new { name = "firefox-debug-adapter", diff --git a/lua/mason-registry/flux-lsp/init.lua b/lua/mason-registry/flux-lsp/init.lua index fb757b47..2568f951 100644 --- a/lua/mason-registry/flux-lsp/init.lua +++ b/lua/mason-registry/flux-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "flux-lsp", diff --git a/lua/mason-registry/foam-language-server/init.lua b/lua/mason-registry/foam-language-server/init.lua index 6ff1b44c..e1b0c95b 100644 --- a/lua/mason-registry/foam-language-server/init.lua +++ b/lua/mason-registry/foam-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "foam-language-server", diff --git a/lua/mason-registry/fortls/init.lua b/lua/mason-registry/fortls/init.lua index befd8cd3..5d9f605c 100644 --- a/lua/mason-registry/fortls/init.lua +++ b/lua/mason-registry/fortls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "fortls", diff --git a/lua/mason-registry/fsautocomplete/init.lua b/lua/mason-registry/fsautocomplete/init.lua index 824aef7a..52e456a7 100644 --- a/lua/mason-registry/fsautocomplete/init.lua +++ b/lua/mason-registry/fsautocomplete/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local dotnet = require "mason.core.managers.dotnet" +local Pkg = require "mason-core.package" +local dotnet = require "mason-core.managers.dotnet" return Pkg.new { name = "fsautocomplete", diff --git a/lua/mason-registry/go-debug-adapter/init.lua b/lua/mason-registry/go-debug-adapter/init.lua index 762506f8..23e0f360 100644 --- a/lua/mason-registry/go-debug-adapter/init.lua +++ b/lua/mason-registry/go-debug-adapter/init.lua @@ -1,8 +1,7 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" -local path = require "mason.core.path" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" +local path = require "mason-core.path" return Pkg.new { name = "go-debug-adapter", diff --git a/lua/mason-registry/golangci-lint-langserver/init.lua b/lua/mason-registry/golangci-lint-langserver/init.lua index 94445679..6a6c396d 100644 --- a/lua/mason-registry/golangci-lint-langserver/init.lua +++ b/lua/mason-registry/golangci-lint-langserver/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "golangci-lint-langserver", diff --git a/lua/mason-registry/golangci-lint/init.lua b/lua/mason-registry/golangci-lint/init.lua index 2948858d..ac589ea1 100644 --- a/lua/mason-registry/golangci-lint/init.lua +++ b/lua/mason-registry/golangci-lint/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "golangci-lint", diff --git a/lua/mason-registry/gomodifytags/init.lua b/lua/mason-registry/gomodifytags/init.lua index 534123bc..1e5e226e 100644 --- a/lua/mason-registry/gomodifytags/init.lua +++ b/lua/mason-registry/gomodifytags/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "gomodifytags", diff --git a/lua/mason-registry/gopls/init.lua b/lua/mason-registry/gopls/init.lua index 39c4c74e..a6bdf069 100644 --- a/lua/mason-registry/gopls/init.lua +++ b/lua/mason-registry/gopls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "gopls", diff --git a/lua/mason-registry/gotests/init.lua b/lua/mason-registry/gotests/init.lua index 465fec65..a2547464 100644 --- a/lua/mason-registry/gotests/init.lua +++ b/lua/mason-registry/gotests/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "gotests", diff --git a/lua/mason-registry/grammarly-languageserver/init.lua b/lua/mason-registry/grammarly-languageserver/init.lua index 2135a330..b0a9a739 100644 --- a/lua/mason-registry/grammarly-languageserver/init.lua +++ b/lua/mason-registry/grammarly-languageserver/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "grammarly-languageserver", diff --git a/lua/mason-registry/graphql-language-service-cli/init.lua b/lua/mason-registry/graphql-language-service-cli/init.lua index d01fec0c..0bf6f1e6 100644 --- a/lua/mason-registry/graphql-language-service-cli/init.lua +++ b/lua/mason-registry/graphql-language-service-cli/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "graphql-language-service-cli", diff --git a/lua/mason-registry/groovy-language-server/init.lua b/lua/mason-registry/groovy-language-server/init.lua index d6dc84d2..96dbf22a 100644 --- a/lua/mason-registry/groovy-language-server/init.lua +++ b/lua/mason-registry/groovy-language-server/init.lua @@ -1,6 +1,6 @@ -local Pkg = require "mason.core.package" -local std = require "mason.core.managers.std" -local git = require "mason.core.managers.git" +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local git = require "mason-core.managers.git" return Pkg.new { name = "groovy-language-server", diff --git a/lua/mason-registry/haskell-language-server/init.lua b/lua/mason-registry/haskell-language-server/init.lua index 7282386a..31262945 100644 --- a/lua/mason-registry/haskell-language-server/init.lua +++ b/lua/mason-registry/haskell-language-server/init.lua @@ -1,10 +1,10 @@ -local a = require "mason.core.async" -local _ = require "mason.core.functional" -local Pkg = require "mason.core.package" -local std = require "mason.core.managers.std" -local github_client = require "mason.core.managers.github.client" -local path = require "mason.core.path" -local platform = require "mason.core.platform" +local a = require "mason-core.async" +local _ = require "mason-core.functional" +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local github_client = require "mason-core.managers.github.client" +local path = require "mason-core.path" +local platform = require "mason-core.platform" return Pkg.new { name = "haskell-language-server", diff --git a/lua/mason-registry/haxe-language-server/init.lua b/lua/mason-registry/haxe-language-server/init.lua index 22f6b5be..a7afb263 100644 --- a/lua/mason-registry/haxe-language-server/init.lua +++ b/lua/mason-registry/haxe-language-server/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local std = require "mason.core.managers.std" -local git = require "mason.core.managers.git" -local npm = require "mason.core.managers.npm" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local git = require "mason-core.managers.git" +local npm = require "mason-core.managers.npm" +local path = require "mason-core.path" return Pkg.new { name = "haxe-language-server", diff --git a/lua/mason-registry/hoon-language-server/init.lua b/lua/mason-registry/hoon-language-server/init.lua index c9fbbcbc..5d5ee234 100644 --- a/lua/mason-registry/hoon-language-server/init.lua +++ b/lua/mason-registry/hoon-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "hoon-language-server", diff --git a/lua/mason-registry/html-lsp/init.lua b/lua/mason-registry/html-lsp/init.lua index 40e41bdb..ff8de04d 100644 --- a/lua/mason-registry/html-lsp/init.lua +++ b/lua/mason-registry/html-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "html-lsp", diff --git a/lua/mason-registry/impl/init.lua b/lua/mason-registry/impl/init.lua index a3c68588..5969132f 100644 --- a/lua/mason-registry/impl/init.lua +++ b/lua/mason-registry/impl/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "impl", diff --git a/lua/mason-registry/init.lua b/lua/mason-registry/init.lua index 1c87735e..97509d68 100644 --- a/lua/mason-registry/init.lua +++ b/lua/mason-registry/init.lua @@ -1,9 +1,9 @@ -local log = require "mason.log" -local fs = require "mason.core.fs" -local _ = require "mason.core.functional" -local Optional = require "mason.core.optional" -local path = require "mason.core.path" -local EventEmitter = require "mason.core.EventEmitter" +local log = require "mason-core.log" +local fs = require "mason-core.fs" +local _ = require "mason-core.functional" +local Optional = require "mason-core.optional" +local path = require "mason-core.path" +local EventEmitter = require "mason-core.EventEmitter" local index = require "mason-registry.index" diff --git a/lua/mason-registry/intelephense/init.lua b/lua/mason-registry/intelephense/init.lua index 4f0fc2fc..fd8cd7c1 100644 --- a/lua/mason-registry/intelephense/init.lua +++ b/lua/mason-registry/intelephense/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "intelephense", diff --git a/lua/mason-registry/jdtls/init.lua b/lua/mason-registry/jdtls/init.lua index e3bf7e65..19e4440b 100644 --- a/lua/mason-registry/jdtls/init.lua +++ b/lua/mason-registry/jdtls/init.lua @@ -1,10 +1,7 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local installer = require "mason.core.installer" -local eclipse = require "mason.core.clients.eclipse" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local installer = require "mason-core.installer" +local eclipse = require "mason-core.clients.eclipse" +local std = require "mason-core.managers.std" ---@async local function download_jdtls() diff --git a/lua/mason-registry/jedi-language-server/init.lua b/lua/mason-registry/jedi-language-server/init.lua index 7c7d2e25..b19eb3c3 100644 --- a/lua/mason-registry/jedi-language-server/init.lua +++ b/lua/mason-registry/jedi-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "jedi-language-server", diff --git a/lua/mason-registry/json-lsp/init.lua b/lua/mason-registry/json-lsp/init.lua index c6be908b..a1141103 100644 --- a/lua/mason-registry/json-lsp/init.lua +++ b/lua/mason-registry/json-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "json-lsp", diff --git a/lua/mason-registry/jsonnet-language-server/init.lua b/lua/mason-registry/jsonnet-language-server/init.lua index 04c2516a..a337957e 100644 --- a/lua/mason-registry/jsonnet-language-server/init.lua +++ b/lua/mason-registry/jsonnet-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "jsonnet-language-server", diff --git a/lua/mason-registry/julia-lsp/init.lua b/lua/mason-registry/julia-lsp/init.lua index e8aaee6a..14318009 100644 --- a/lua/mason-registry/julia-lsp/init.lua +++ b/lua/mason-registry/julia-lsp/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local path = require "mason-core.path" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" local server_script = [[ using LanguageServer, SymbolServer, Pkg diff --git a/lua/mason-registry/kotlin-language-server/init.lua b/lua/mason-registry/kotlin-language-server/init.lua index eb04b990..77c6cb6d 100644 --- a/lua/mason-registry/kotlin-language-server/init.lua +++ b/lua/mason-registry/kotlin-language-server/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" +local path = require "mason-core.path" return Pkg.new { name = "kotlin-language-server", diff --git a/lua/mason-registry/ktlint/init.lua b/lua/mason-registry/ktlint/init.lua index 0bcdf236..ef346dc0 100644 --- a/lua/mason-registry/ktlint/init.lua +++ b/lua/mason-registry/ktlint/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" -local path = require "mason.core.path" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" +local path = require "mason-core.path" +local platform = require "mason-core.platform" return Pkg.new { name = "ktlint", diff --git a/lua/mason-registry/lelwel/init.lua b/lua/mason-registry/lelwel/init.lua index 6bb326e1..f6b416e5 100644 --- a/lua/mason-registry/lelwel/init.lua +++ b/lua/mason-registry/lelwel/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "lelwel", diff --git a/lua/mason-registry/lemminx/init.lua b/lua/mason-registry/lemminx/init.lua index be094e14..62b6bec8 100644 --- a/lua/mason-registry/lemminx/init.lua +++ b/lua/mason-registry/lemminx/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/lemmy-help/init.lua b/lua/mason-registry/lemmy-help/init.lua index 1cd04e61..30aac337 100644 --- a/lua/mason-registry/lemmy-help/init.lua +++ b/lua/mason-registry/lemmy-help/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "lemmy-help", diff --git a/lua/mason-registry/ltex-ls/init.lua b/lua/mason-registry/ltex-ls/init.lua index ba5e2bbc..77c4455c 100644 --- a/lua/mason-registry/ltex-ls/init.lua +++ b/lua/mason-registry/ltex-ls/init.lua @@ -1,10 +1,10 @@ -local Pkg = require "mason.core.package" -local a = require "mason.core.async" -local installer = require "mason.core.installer" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local a = require "mason-core.async" +local installer = require "mason-core.installer" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/lua-language-server/init.lua b/lua/mason-registry/lua-language-server/init.lua index cb23e344..eb66cd24 100644 --- a/lua/mason-registry/lua-language-server/init.lua +++ b/lua/mason-registry/lua-language-server/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/marksman/init.lua b/lua/mason-registry/marksman/init.lua index f4efbe71..7d2404dc 100644 --- a/lua/mason-registry/marksman/init.lua +++ b/lua/mason-registry/marksman/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/metamath-zero-lsp/init.lua b/lua/mason-registry/metamath-zero-lsp/init.lua index 97272fbb..e5fc28b1 100644 --- a/lua/mason-registry/metamath-zero-lsp/init.lua +++ b/lua/mason-registry/metamath-zero-lsp/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local git = require "mason.core.managers.git" -local platform = require "mason.core.platform" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local git = require "mason-core.managers.git" +local platform = require "mason-core.platform" +local path = require "mason-core.path" return Pkg.new { name = "metamath-zero-lsp", diff --git a/lua/mason-registry/mockdebug/init.lua b/lua/mason-registry/mockdebug/init.lua index 9898b2df..f0bfb34b 100644 --- a/lua/mason-registry/mockdebug/init.lua +++ b/lua/mason-registry/mockdebug/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local git = require "mason.core.managers.git" -local _ = require "mason.core.functional" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local git = require "mason-core.managers.git" +local _ = require "mason-core.functional" +local Optional = require "mason-core.optional" return Pkg.new { name = "mockdebug", diff --git a/lua/mason-registry/netcoredbg/init.lua b/lua/mason-registry/netcoredbg/init.lua index 81255ec2..8806d5f0 100644 --- a/lua/mason-registry/netcoredbg/init.lua +++ b/lua/mason-registry/netcoredbg/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" -local path = require "mason.core.path" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local platform = require "mason-core.platform" return Pkg.new { name = "netcoredbg", diff --git a/lua/mason-registry/nickel-lang-lsp/init.lua b/lua/mason-registry/nickel-lang-lsp/init.lua index 104162ba..4adb1d13 100644 --- a/lua/mason-registry/nickel-lang-lsp/init.lua +++ b/lua/mason-registry/nickel-lang-lsp/init.lua @@ -1,7 +1,5 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local cargo = require "mason.core.managers.cargo" -local git = require "mason.core.managers.git" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "nickel-lang-lsp", diff --git a/lua/mason-registry/nimlsp/init.lua b/lua/mason-registry/nimlsp/init.lua index 75dd0752..ceb759af 100644 --- a/lua/mason-registry/nimlsp/init.lua +++ b/lua/mason-registry/nimlsp/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local git = require "mason.core.managers.git" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local git = require "mason-core.managers.git" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" +local Optional = require "mason-core.optional" return Pkg.new { name = "nimlsp", diff --git a/lua/mason-registry/node-debug2-adapter/init.lua b/lua/mason-registry/node-debug2-adapter/init.lua index 44b96c2d..76b24a6d 100644 --- a/lua/mason-registry/node-debug2-adapter/init.lua +++ b/lua/mason-registry/node-debug2-adapter/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local git = require "mason.core.managers.git" -local _ = require "mason.core.functional" -local path = require "mason.core.path" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local git = require "mason-core.managers.git" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local Optional = require "mason-core.optional" return Pkg.new { name = "node-debug2-adapter", diff --git a/lua/mason-registry/ocaml-lsp/init.lua b/lua/mason-registry/ocaml-lsp/init.lua index b13f0f38..b1d02807 100644 --- a/lua/mason-registry/ocaml-lsp/init.lua +++ b/lua/mason-registry/ocaml-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local opam = require "mason.core.managers.opam" +local Pkg = require "mason-core.package" +local opam = require "mason-core.managers.opam" return Pkg.new { name = "ocaml-lsp", diff --git a/lua/mason-registry/omnisharp-roslyn/init.lua b/lua/mason-registry/omnisharp-roslyn/init.lua index 95a91fe5..1f349eac 100644 --- a/lua/mason-registry/omnisharp-roslyn/init.lua +++ b/lua/mason-registry/omnisharp-roslyn/init.lua @@ -1,8 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/opencl-language-server/init.lua b/lua/mason-registry/opencl-language-server/init.lua index 7bb41a91..665a5c55 100644 --- a/lua/mason-registry/opencl-language-server/init.lua +++ b/lua/mason-registry/opencl-language-server/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/perlnavigator/init.lua b/lua/mason-registry/perlnavigator/init.lua index 5825406f..f2b284b4 100644 --- a/lua/mason-registry/perlnavigator/init.lua +++ b/lua/mason-registry/perlnavigator/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "perlnavigator", diff --git a/lua/mason-registry/php-debug-adapter/init.lua b/lua/mason-registry/php-debug-adapter/init.lua index cdd11074..d4350c91 100644 --- a/lua/mason-registry/php-debug-adapter/init.lua +++ b/lua/mason-registry/php-debug-adapter/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local _ = require "mason.core.functional" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local _ = require "mason-core.functional" +local path = require "mason-core.path" return Pkg.new { name = "php-debug-adapter", diff --git a/lua/mason-registry/phpactor/init.lua b/lua/mason-registry/phpactor/init.lua index b01eed50..a5061b78 100644 --- a/lua/mason-registry/phpactor/init.lua +++ b/lua/mason-registry/phpactor/init.lua @@ -1,10 +1,10 @@ -local Pkg = require "mason.core.package" -local composer = require "mason.core.managers.composer" -local git = require "mason.core.managers.git" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" -local Optional = require "mason.core.optional" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local composer = require "mason-core.managers.composer" +local git = require "mason-core.managers.git" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" +local Optional = require "mason-core.optional" +local path = require "mason-core.path" return Pkg.new { name = "phpactor", diff --git a/lua/mason-registry/powershell-editor-services/init.lua b/lua/mason-registry/powershell-editor-services/init.lua index 706077dc..ab52478d 100644 --- a/lua/mason-registry/powershell-editor-services/init.lua +++ b/lua/mason-registry/powershell-editor-services/init.lua @@ -1,6 +1,6 @@ -local Pkg = require "mason.core.package" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" return Pkg.new { name = "powershell-editor-services", diff --git a/lua/mason-registry/prisma-language-server/init.lua b/lua/mason-registry/prisma-language-server/init.lua index 0ca4ac61..57395a09 100644 --- a/lua/mason-registry/prisma-language-server/init.lua +++ b/lua/mason-registry/prisma-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "prisma-language-server", diff --git a/lua/mason-registry/prosemd-lsp/init.lua b/lua/mason-registry/prosemd-lsp/init.lua index 4ffd9e06..33f28aba 100644 --- a/lua/mason-registry/prosemd-lsp/init.lua +++ b/lua/mason-registry/prosemd-lsp/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/psalm/init.lua b/lua/mason-registry/psalm/init.lua index fd9a9c6d..7a994a56 100644 --- a/lua/mason-registry/psalm/init.lua +++ b/lua/mason-registry/psalm/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local composer = require "mason.core.managers.composer" +local Pkg = require "mason-core.package" +local composer = require "mason-core.managers.composer" return Pkg.new { name = "psalm", diff --git a/lua/mason-registry/puppet-editor-services/init.lua b/lua/mason-registry/puppet-editor-services/init.lua index c9d8db55..d38c2359 100644 --- a/lua/mason-registry/puppet-editor-services/init.lua +++ b/lua/mason-registry/puppet-editor-services/init.lua @@ -1,6 +1,6 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" return Pkg.new { name = "puppet-editor-services", diff --git a/lua/mason-registry/purescript-language-server/init.lua b/lua/mason-registry/purescript-language-server/init.lua index 86a4de25..282f3b22 100644 --- a/lua/mason-registry/purescript-language-server/init.lua +++ b/lua/mason-registry/purescript-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "purescript-language-server", diff --git a/lua/mason-registry/pyright/init.lua b/lua/mason-registry/pyright/init.lua index b03bbd5a..82957fa0 100644 --- a/lua/mason-registry/pyright/init.lua +++ b/lua/mason-registry/pyright/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "pyright", diff --git a/lua/mason-registry/python-lsp-server/init.lua b/lua/mason-registry/python-lsp-server/init.lua index 2ba0e8d6..8fb212a4 100644 --- a/lua/mason-registry/python-lsp-server/init.lua +++ b/lua/mason-registry/python-lsp-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "python-lsp-server", diff --git a/lua/mason-registry/quick-lint-js/init.lua b/lua/mason-registry/quick-lint-js/init.lua index 8719a835..f421e378 100644 --- a/lua/mason-registry/quick-lint-js/init.lua +++ b/lua/mason-registry/quick-lint-js/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/r-languageserver/init.lua b/lua/mason-registry/r-languageserver/init.lua index 508c6c72..bb6d816f 100644 --- a/lua/mason-registry/r-languageserver/init.lua +++ b/lua/mason-registry/r-languageserver/init.lua @@ -1,4 +1,4 @@ -local Pkg = require "mason.core.package" +local Pkg = require "mason-core.package" ---@param install_dir string local function create_install_script(install_dir) diff --git a/lua/mason-registry/reason-language-server/init.lua b/lua/mason-registry/reason-language-server/init.lua index ef9fd2f6..20aab910 100644 --- a/lua/mason-registry/reason-language-server/init.lua +++ b/lua/mason-registry/reason-language-server/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/remark-language-server/init.lua b/lua/mason-registry/remark-language-server/init.lua index 24d7d8f7..e891b370 100644 --- a/lua/mason-registry/remark-language-server/init.lua +++ b/lua/mason-registry/remark-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "remark-language-server", diff --git a/lua/mason-registry/rescript-lsp/init.lua b/lua/mason-registry/rescript-lsp/init.lua index 8cf39adb..482b0b87 100644 --- a/lua/mason-registry/rescript-lsp/init.lua +++ b/lua/mason-registry/rescript-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" return Pkg.new { name = "rescript-lsp", diff --git a/lua/mason-registry/rnix-lsp/init.lua b/lua/mason-registry/rnix-lsp/init.lua index d97e9bef..75576ed6 100644 --- a/lua/mason-registry/rnix-lsp/init.lua +++ b/lua/mason-registry/rnix-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "rnix-lsp", diff --git a/lua/mason-registry/robotframework-lsp/init.lua b/lua/mason-registry/robotframework-lsp/init.lua index 13f2f2b9..4458e3b3 100644 --- a/lua/mason-registry/robotframework-lsp/init.lua +++ b/lua/mason-registry/robotframework-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "robotframework-lsp", diff --git a/lua/mason-registry/rome/init.lua b/lua/mason-registry/rome/init.lua index d0f1b59d..9e2747af 100644 --- a/lua/mason-registry/rome/init.lua +++ b/lua/mason-registry/rome/init.lua @@ -1,6 +1,6 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" +local Optional = require "mason-core.optional" return Pkg.new { name = "rome", diff --git a/lua/mason-registry/rust-analyzer/init.lua b/lua/mason-registry/rust-analyzer/init.lua index 8aa3b23f..9d055053 100644 --- a/lua/mason-registry/rust-analyzer/init.lua +++ b/lua/mason-registry/rust-analyzer/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/salt-lsp/init.lua b/lua/mason-registry/salt-lsp/init.lua index 3bb7d09c..91f79be5 100644 --- a/lua/mason-registry/salt-lsp/init.lua +++ b/lua/mason-registry/salt-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "salt-lsp", diff --git a/lua/mason-registry/serve-d/init.lua b/lua/mason-registry/serve-d/init.lua index fc57719b..77734960 100644 --- a/lua/mason-registry/serve-d/init.lua +++ b/lua/mason-registry/serve-d/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/shellcheck/init.lua b/lua/mason-registry/shellcheck/init.lua index 634e42f1..4d6ef2bc 100644 --- a/lua/mason-registry/shellcheck/init.lua +++ b/lua/mason-registry/shellcheck/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" return Pkg.new { name = "shellcheck", diff --git a/lua/mason-registry/shopify-theme-check/init.lua b/lua/mason-registry/shopify-theme-check/init.lua index df945530..bba774f8 100644 --- a/lua/mason-registry/shopify-theme-check/init.lua +++ b/lua/mason-registry/shopify-theme-check/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local gem = require "mason.core.managers.gem" +local Pkg = require "mason-core.package" +local gem = require "mason-core.managers.gem" return Pkg.new { name = "shopify-theme-check", diff --git a/lua/mason-registry/slint-lsp/init.lua b/lua/mason-registry/slint-lsp/init.lua index 93973e4b..50e26725 100644 --- a/lua/mason-registry/slint-lsp/init.lua +++ b/lua/mason-registry/slint-lsp/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" return Pkg.new { name = "slint-lsp", diff --git a/lua/mason-registry/solang/init.lua b/lua/mason-registry/solang/init.lua index bcfc54f3..5663981d 100644 --- a/lua/mason-registry/solang/init.lua +++ b/lua/mason-registry/solang/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local installer = require "mason.core.installer" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local installer = require "mason-core.installer" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/solargraph/init.lua b/lua/mason-registry/solargraph/init.lua index 88bf3c19..e69f84cd 100644 --- a/lua/mason-registry/solargraph/init.lua +++ b/lua/mason-registry/solargraph/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local gem = require "mason.core.managers.gem" +local Pkg = require "mason-core.package" +local gem = require "mason-core.managers.gem" return Pkg.new { name = "solargraph", diff --git a/lua/mason-registry/solidity/init.lua b/lua/mason-registry/solidity/init.lua index b6c04188..9340684c 100644 --- a/lua/mason-registry/solidity/init.lua +++ b/lua/mason-registry/solidity/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/sorbet/init.lua b/lua/mason-registry/sorbet/init.lua index d013bb82..4b111542 100644 --- a/lua/mason-registry/sorbet/init.lua +++ b/lua/mason-registry/sorbet/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local gem = require "mason.core.managers.gem" +local Pkg = require "mason-core.package" +local gem = require "mason-core.managers.gem" return Pkg.new { name = "sorbet", diff --git a/lua/mason-registry/sourcery/init.lua b/lua/mason-registry/sourcery/init.lua index c0085044..7f8ca16d 100644 --- a/lua/mason-registry/sourcery/init.lua +++ b/lua/mason-registry/sourcery/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local pip3 = require "mason.core.managers.pip3" +local Pkg = require "mason-core.package" +local pip3 = require "mason-core.managers.pip3" return Pkg.new { name = "sourcery", diff --git a/lua/mason-registry/sqlls/init.lua b/lua/mason-registry/sqlls/init.lua index f954bce8..7d719838 100644 --- a/lua/mason-registry/sqlls/init.lua +++ b/lua/mason-registry/sqlls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "sqlls", diff --git a/lua/mason-registry/sqls/init.lua b/lua/mason-registry/sqls/init.lua index e22ab013..eb3215ea 100644 --- a/lua/mason-registry/sqls/init.lua +++ b/lua/mason-registry/sqls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local go = require "mason.core.managers.go" +local Pkg = require "mason-core.package" +local go = require "mason-core.managers.go" return Pkg.new { name = "sqls", diff --git a/lua/mason-registry/stylelint-lsp/init.lua b/lua/mason-registry/stylelint-lsp/init.lua index 95420625..999ab033 100644 --- a/lua/mason-registry/stylelint-lsp/init.lua +++ b/lua/mason-registry/stylelint-lsp/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "stylelint-lsp", diff --git a/lua/mason-registry/stylua/init.lua b/lua/mason-registry/stylua/init.lua index 227b637c..55d7abfc 100644 --- a/lua/mason-registry/stylua/init.lua +++ b/lua/mason-registry/stylua/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "stylua", diff --git a/lua/mason-registry/svelte-language-server/init.lua b/lua/mason-registry/svelte-language-server/init.lua index 763c1b36..ff495bda 100644 --- a/lua/mason-registry/svelte-language-server/init.lua +++ b/lua/mason-registry/svelte-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "svelte-language-server", diff --git a/lua/mason-registry/svlangserver/init.lua b/lua/mason-registry/svlangserver/init.lua index 2ed6888c..b6a23af3 100644 --- a/lua/mason-registry/svlangserver/init.lua +++ b/lua/mason-registry/svlangserver/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "svlangserver", diff --git a/lua/mason-registry/svls/init.lua b/lua/mason-registry/svls/init.lua index f7b8088c..12e6b297 100644 --- a/lua/mason-registry/svls/init.lua +++ b/lua/mason-registry/svls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "svls", diff --git a/lua/mason-registry/tailwindcss-language-server/init.lua b/lua/mason-registry/tailwindcss-language-server/init.lua index d074ba84..9bde697a 100644 --- a/lua/mason-registry/tailwindcss-language-server/init.lua +++ b/lua/mason-registry/tailwindcss-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "tailwindcss-language-server", diff --git a/lua/mason-registry/taplo/init.lua b/lua/mason-registry/taplo/init.lua index 4909aec5..bd006eb0 100644 --- a/lua/mason-registry/taplo/init.lua +++ b/lua/mason-registry/taplo/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" return Pkg.new { name = "taplo", diff --git a/lua/mason-registry/teal-language-server/init.lua b/lua/mason-registry/teal-language-server/init.lua index 3911869f..fcbdf9c4 100644 --- a/lua/mason-registry/teal-language-server/init.lua +++ b/lua/mason-registry/teal-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local luarocks = require "mason.core.managers.luarocks" +local Pkg = require "mason-core.package" +local luarocks = require "mason-core.managers.luarocks" return Pkg.new { name = "teal-language-server", diff --git a/lua/mason-registry/terraform-ls/init.lua b/lua/mason-registry/terraform-ls/init.lua index 9588b094..b5ed3f72 100644 --- a/lua/mason-registry/terraform-ls/init.lua +++ b/lua/mason-registry/terraform-ls/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/texlab/init.lua b/lua/mason-registry/texlab/init.lua index c777a5f6..9a31abbb 100644 --- a/lua/mason-registry/texlab/init.lua +++ b/lua/mason-registry/texlab/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/tflint/init.lua b/lua/mason-registry/tflint/init.lua index cc910da1..a886edc4 100644 --- a/lua/mason-registry/tflint/init.lua +++ b/lua/mason-registry/tflint/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/typescript-language-server/init.lua b/lua/mason-registry/typescript-language-server/init.lua index f6bf3faa..d978c4e1 100644 --- a/lua/mason-registry/typescript-language-server/init.lua +++ b/lua/mason-registry/typescript-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "typescript-language-server", diff --git a/lua/mason-registry/vala-language-server/init.lua b/lua/mason-registry/vala-language-server/init.lua index 65ea9e61..ebb098a6 100644 --- a/lua/mason-registry/vala-language-server/init.lua +++ b/lua/mason-registry/vala-language-server/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local std = require "mason.core.managers.std" -local github = require "mason.core.managers.github" -local platform = require "mason.core.platform" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local std = require "mason-core.managers.std" +local github = require "mason-core.managers.github" +local platform = require "mason-core.platform" +local path = require "mason-core.path" return Pkg.new { name = "vala-language-server", diff --git a/lua/mason-registry/verible/init.lua b/lua/mason-registry/verible/init.lua index a681c4f7..3303b709 100644 --- a/lua/mason-registry/verible/init.lua +++ b/lua/mason-registry/verible/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local path = require "mason.core.path" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local path = require "mason-core.path" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/vetur-vls/init.lua b/lua/mason-registry/vetur-vls/init.lua index 07503fad..5bb0deff 100644 --- a/lua/mason-registry/vetur-vls/init.lua +++ b/lua/mason-registry/vetur-vls/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "vetur-vls", diff --git a/lua/mason-registry/vim-language-server/init.lua b/lua/mason-registry/vim-language-server/init.lua index 7e555644..e24e2f3b 100644 --- a/lua/mason-registry/vim-language-server/init.lua +++ b/lua/mason-registry/vim-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "vim-language-server", diff --git a/lua/mason-registry/visualforce-language-server/init.lua b/lua/mason-registry/visualforce-language-server/init.lua index 0bc422b9..b5e2d283 100644 --- a/lua/mason-registry/visualforce-language-server/init.lua +++ b/lua/mason-registry/visualforce-language-server/init.lua @@ -1,8 +1,8 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local github_client = require "mason.core.managers.github.client" -local Optional = require "mason.core.optional" -local _ = require "mason.core.functional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local github_client = require "mason-core.managers.github.client" +local Optional = require "mason-core.optional" +local _ = require "mason-core.functional" return Pkg.new { name = "visualforce-language-server", diff --git a/lua/mason-registry/vls/init.lua b/lua/mason-registry/vls/init.lua index 110605ab..18d8edd2 100644 --- a/lua/mason-registry/vls/init.lua +++ b/lua/mason-registry/vls/init.lua @@ -1,10 +1,10 @@ -local Pkg = require "mason.core.package" -local github = require "mason.core.managers.github" -local github_client = require "mason.core.managers.github.client" -local std = require "mason.core.managers.std" -local _ = require "mason.core.functional" -local platform = require "mason.core.platform" -local Optional = require "mason.core.optional" +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local github_client = require "mason-core.managers.github.client" +local std = require "mason-core.managers.std" +local _ = require "mason-core.functional" +local platform = require "mason-core.platform" +local Optional = require "mason-core.optional" return Pkg.new { name = "vls", diff --git a/lua/mason-registry/vue-language-server/init.lua b/lua/mason-registry/vue-language-server/init.lua index 3c3b181a..a9405a41 100644 --- a/lua/mason-registry/vue-language-server/init.lua +++ b/lua/mason-registry/vue-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "vue-language-server", diff --git a/lua/mason-registry/wgsl-analyzer/init.lua b/lua/mason-registry/wgsl-analyzer/init.lua index 68dc25ad..965d4a01 100644 --- a/lua/mason-registry/wgsl-analyzer/init.lua +++ b/lua/mason-registry/wgsl-analyzer/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local cargo = require "mason.core.managers.cargo" +local Pkg = require "mason-core.package" +local cargo = require "mason-core.managers.cargo" local github_url = "https://github.com/wgsl-analyzer/wgsl-analyzer" diff --git a/lua/mason-registry/yaml-language-server/init.lua b/lua/mason-registry/yaml-language-server/init.lua index 4bf15a76..67010889 100644 --- a/lua/mason-registry/yaml-language-server/init.lua +++ b/lua/mason-registry/yaml-language-server/init.lua @@ -1,5 +1,5 @@ -local Pkg = require "mason.core.package" -local npm = require "mason.core.managers.npm" +local Pkg = require "mason-core.package" +local npm = require "mason-core.managers.npm" return Pkg.new { name = "yaml-language-server", diff --git a/lua/mason-registry/zk/init.lua b/lua/mason-registry/zk/init.lua index 4250f2c4..8934c597 100644 --- a/lua/mason-registry/zk/init.lua +++ b/lua/mason-registry/zk/init.lua @@ -1,7 +1,7 @@ -local Pkg = require "mason.core.package" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" +local Pkg = require "mason-core.package" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-registry/zls/init.lua b/lua/mason-registry/zls/init.lua index beef3948..93b9f399 100644 --- a/lua/mason-registry/zls/init.lua +++ b/lua/mason-registry/zls/init.lua @@ -1,9 +1,9 @@ -local Pkg = require "mason.core.package" -local path = require "mason.core.path" -local platform = require "mason.core.platform" -local _ = require "mason.core.functional" -local github = require "mason.core.managers.github" -local std = require "mason.core.managers.std" +local Pkg = require "mason-core.package" +local path = require "mason-core.path" +local platform = require "mason-core.platform" +local _ = require "mason-core.functional" +local github = require "mason-core.managers.github" +local std = require "mason-core.managers.std" local coalesce, when = _.coalesce, _.when diff --git a/lua/mason-schemas/lsp/astro-language-server.lua b/lua/mason-schemas/lsp/astro-language-server.lua new file mode 100644 index 00000000..9a97d138 --- /dev/null +++ b/lua/mason-schemas/lsp/astro-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["astro.css.completions.emmet"] = {default = true,description = "Enable Emmet completions for CSS",title = "CSS: Emmet Completions",type = "boolean"},["astro.css.completions.enabled"] = {default = true,description = "Enable completions for CSS",title = "CSS: Completions",type = "boolean"},["astro.css.documentColors.enabled"] = {default = true,description = "Enable color picker for CSS",title = "CSS: Document Colors",type = "boolean"},["astro.css.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for CSS",title = "CSS: Symbols in Outline",type = "boolean"},["astro.css.enabled"] = {default = true,description = "Enable CSS features",title = "CSS",type = "boolean"},["astro.css.hover.enabled"] = {default = true,description = "Enable hover info for CSS",title = "CSS: Hover Info",type = "boolean"},["astro.format.indentFrontmatter"] = {default = false,description = "Indent the formatter by one level of indentation",title = "Formatting: Indent frontmatter",type = "boolean"},["astro.format.newLineAfterFrontmatter"] = {default = true,description = "Add a line return between the frontmatter and the template",title = "Formatting: Add line return after the frontmatter",type = "boolean"},["astro.html.completions.emmet"] = {default = true,description = "Enable Emmet completions for HTML",title = "HTML: Emmet Completions",type = "boolean"},["astro.html.completions.enabled"] = {default = true,description = "Enable completions for HTML",title = "HTML: Completions",type = "boolean"},["astro.html.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for CSS",title = "HTML: Symbols in Outline",type = "boolean"},["astro.html.enabled"] = {default = true,description = "Enable HTML features",title = "HTML",type = "boolean"},["astro.html.hover.enabled"] = {default = true,description = "Enable hover info for HTML",title = "HTML: Hover Info",type = "boolean"},["astro.html.tagComplete.enabled"] = {default = true,description = "Enable tag completion for HTML",title = "HTML: Tag Completion",type = "boolean"},["astro.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["astro.typescript.allowArbitraryAttributes"] = {default = false,description = "Enable the usage of non-standard HTML attributes, such as the ones added by AlpineJS or petite-vue",title = "TypeScript: Allow arbitrary attributes on HTML elements",type = "boolean"},["astro.typescript.codeActions.enabled"] = {default = true,description = "Enable code actions for TypeScript",title = "TypeScript: Code Actions",type = "boolean"},["astro.typescript.completions.enabled"] = {default = true,description = "Enable completions for TypeScript",title = "TypeScript: Completions",type = "boolean"},["astro.typescript.definitions.enabled"] = {default = true,description = "Enable go to definition for TypeScript",title = "TypeScript: Go to Definition",type = "boolean"},["astro.typescript.diagnostics.enabled"] = {default = true,description = "Enable diagnostic messages for TypeScript",title = "TypeScript: Diagnostics",type = "boolean"},["astro.typescript.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for TypeScript",title = "TypeScript: Symbols in Outline",type = "boolean"},["astro.typescript.enabled"] = {default = true,description = "Enable TypeScript features",title = "TypeScript",type = "boolean"},["astro.typescript.hover.enabled"] = {default = true,description = "Enable hover info for TypeScript",title = "TypeScript: Hover Info",type = "boolean"},["astro.typescript.rename.enabled"] = {default = true,description = "Enable rename functionality for JS/TS variables inside Astro files",title = "TypeScript: Rename",type = "boolean"},["astro.typescript.semanticTokens.enabled"] = {default = true,description = "Enable semantic tokens (used for semantic highlighting) for TypeScript.",title = "TypeScript: Semantic Tokens",type = "boolean"},["astro.typescript.signatureHelp.enabled"] = {default = true,description = "Enable signature help (parameter hints) for TypeScript",title = "TypeScript: Signature Help",type = "boolean"}},title = "Astro configuration",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/bash-language-server.lua b/lua/mason-schemas/lsp/bash-language-server.lua new file mode 100644 index 00000000..293d2dcd --- /dev/null +++ b/lua/mason-schemas/lsp/bash-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["bashIde.explainshellEndpoint"] = {default = "",description = "Configure explainshell server in order to get hover documentation on flags and options.",type = "string"},["bashIde.globPattern"] = {default = "**/*@(.sh|.inc|.bash|.command)",description = "Glob pattern for finding and parsing shell script files.",type = "string"},["bashIde.highlightParsingErrors"] = {default = false,description = "Controls if parsing errors will be highlighted as problems.",type = "boolean"}},title = "Bash IDE configuration",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/clangd.lua b/lua/mason-schemas/lsp/clangd.lua new file mode 100644 index 00000000..d9147c25 --- /dev/null +++ b/lua/mason-schemas/lsp/clangd.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["clangd.arguments"] = {default = {},description = "Arguments for clangd server.",items = {type = "string"},type = "array"},["clangd.checkUpdates"] = {default = false,description = "Check for language server updates on startup.",type = "boolean"},["clangd.detectExtensionConflicts"] = {default = true,description = "Warn about conflicting extensions and suggest disabling them.",type = "boolean"},["clangd.fallbackFlags"] = {default = {},description = "Extra clang flags used to parse files when no compilation database is found.",items = {type = "string"},type = "array"},["clangd.onConfigChanged"] = {default = "prompt",description = "What to do when clangd configuration files are changed. Ignored for clangd 12+, which can reload such files itself.",enum = { "prompt", "restart", "ignore" },enumDescriptions = { "Prompt the user for restarting the server", "Automatically restart the server", "Do nothing" },type = "string"},["clangd.path"] = {default = "clangd",description = "The path to clangd executable, e.g.: /usr/bin/clangd.",scope = "machine-overridable",type = "string"},["clangd.restartAfterCrash"] = {default = true,description = "Auto restart clangd (up to 4 times) if it crashes.",type = "boolean"},["clangd.semanticHighlighting"] = {default = true,deprecationMessage = "Legacy semanticHighlights is no longer supported. Please use `editor.semanticHighlighting.enabled` instead.",description = "Enable semantic highlighting in clangd.",type = "boolean"},["clangd.serverCompletionRanking"] = {default = true,description = "Always rank completion items on the server as you type. This produces more accurate results at the cost of higher latency than client-side filtering.",type = "boolean"},["clangd.trace"] = {description = "Names a file that clangd should log a performance trace to, in chrome trace-viewer JSON format.",type = "string"}},title = "clangd",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/deno-lsp.lua b/lua/mason-schemas/lsp/deno-lsp.lua new file mode 100644 index 00000000..5ad46765 --- /dev/null +++ b/lua/mason-schemas/lsp/deno-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["deno.cache"] = {default = vim.NIL,markdownDescription = "A path to the cache directory for Deno. By default, the operating system's cache path plus `deno` is used, or the `DENO_DIR` environment variable, but if set, this path will be used instead.",scope = "window",type = "string"},["deno.certificateStores"] = {default = vim.NIL,items = {type = "string"},markdownDescription = "A list of root certificate stores used to validate TLS certificates when fetching and caching remote resources. This overrides the `DENO_TLS_CA_STORE` environment variable if set.",scope = "window",type = "array"},["deno.codeLens.implementations"] = {default = false,examples = { true, false },markdownDescription = "Enables or disables the display of code lens information for implementations of items in the code.",scope = "window",type = "boolean"},["deno.codeLens.references"] = {default = false,examples = { true, false },markdownDescription = "Enables or disables the display of code lens information for references of items in the code.",scope = "window",type = "boolean"},["deno.codeLens.referencesAllFunctions"] = {default = false,examples = { true, false },markdownDescription = "Enables or disables the display of code lens information for all functions in the code.",scope = "window",type = "boolean"},["deno.codeLens.test"] = {default = false,markdownDescription = "Enables or disables the display of code lenses that allow running of individual tests in the code.",scope = "resource",type = "boolean"},["deno.codeLens.testArgs"] = {default = { "--allow-all", "--no-check" },items = {type = "string"},markdownDescription = 'Additional arguments to use with the run test code lens. Defaults to `[ "--allow-all", "--no-check" ]`.',scope = "resource",type = "array"},["deno.config"] = {default = vim.NIL,examples = { "./deno.jsonc", "/path/to/deno.jsonc", "C:\\path\\to\\deno.jsonc" },markdownDescription = "The file path to a configuration file. This is the equivalent to using `--config` on the command line. The path can be either be relative to the workspace, or an absolute path.\n\nIt is recommend you name it `deno.json` or `deno.jsonc`.\n\n**Not recommended to be set globally.**",scope = "window",type = "string"},["deno.enable"] = {default = false,examples = { true, false },markdownDescription = "Controls if the Deno Language Server is enabled. When enabled, the extension will disable the built-in VSCode JavaScript and TypeScript language services, and will use the Deno Language Server instead.\n\nIf you want to enable only part of your workspace folder, consider using `deno.enablePaths` setting instead.\n\n**Not recommended to be enabled globally.**",scope = "resource",type = "boolean"},["deno.enablePaths"] = {default = {},examples = { { "./worker" } },items = {type = "string"},markdownDescription = 'Enables the Deno Language Server for specific paths, instead of for the whole workspace folder. This will disable the built in TypeScript/JavaScript language server for those paths.\n\nWhen a value is set, the value of `"deno.enable"` is ignored.\n\nThe workspace folder is used as the base for the supplied paths. If for example you have all your Deno code in `worker` path in your workspace, you can add an item with the value of `./worker`, and the Deno will only provide diagnostics for the files within `worker` or any of its sub paths.\n\n**Not recommended to be enabled in user settings.**',scope = "resource",type = "array"},["deno.importMap"] = {default = vim.NIL,examples = { "./import_map.json", "/path/to/import_map.json", "C:\\path\\to\\import_map.json" },markdownDescription = 'The file path to an import map. This is the equivalent to using `--import-map` on the command line.\n\n[Import maps](https://deno.land/manual@v1.6.0/linking_to_external_code/import_maps) provide a way to "relocate" modules based on their specifiers. The path can either be relative to the workspace, or an absolute path.\n\n**Not recommended to be set globally.**',scope = "window",type = "string"},["deno.internalDebug"] = {default = false,examples = { true, false },markdownDescription = "Determines if the internal debugging information for the Deno language server will be logged to the _Deno Language Server_ console.",scope = "window",type = "boolean"},["deno.lint"] = {default = true,examples = { true, false },markdownDescription = "Controls if linting information will be provided by the Deno Language Server.\n\n**Not recommended to be enabled globally.**",scope = "window",type = "boolean"},["deno.path"] = {default = vim.NIL,examples = { "/usr/bin/deno", "C:\\Program Files\\deno\\deno.exe" },markdownDescription = "A path to the `deno` CLI executable. By default, the extension looks for `deno` in the `PATH`, but if set, will use the path specified instead.",scope = "window",type = "string"},["deno.suggest.autoImports"] = {default = true,scope = "window",type = "boolean"},["deno.suggest.completeFunctionCalls"] = {default = false,scope = "window",type = "boolean"},["deno.suggest.imports.autoDiscover"] = {default = true,markdownDescription = "If enabled, when new hosts/origins are encountered that support import suggestions, you will be prompted to enable or disable it. Defaults to `true`.",scope = "window",type = "boolean"},["deno.suggest.imports.hosts"] = {default = {["https://crux.land"] = true,["https://deno.land"] = true,["https://x.nest.land"] = true},examples = {["https://deno.land"] = true},markdownDescription = "Controls which hosts are enabled for import suggestions.",scope = "window",type = "object"},["deno.suggest.names"] = {default = true,scope = "window",type = "boolean"},["deno.suggest.paths"] = {default = true,scope = "window",type = "boolean"},["deno.testing.args"] = {default = { "--allow-all", "--no-check" },items = {type = "string"},markdownDescription = 'Arguments to use when running tests via the Test Explorer. Defaults to `[ "--allow-all" ]`.',scope = "window",type = "array"},["deno.testing.enable"] = {default = true,markdownDescription = "Enable the testing API for the language server. When folder is Deno enabled, tests will be available in the Test Explorer view.",scope = "window",type = "boolean"},["deno.tlsCertificate"] = {default = vim.NIL,markdownDescription = "A path to a PEM certificate to use as the certificate authority when validating TLS certificates when fetching and caching remote resources. This is like using `--cert` on the Deno CLI and overrides the `DENO_CERT` environment variable if set.",scope = "window",type = "string"},["deno.unsafelyIgnoreCertificateErrors"] = {default = vim.NIL,items = {type = "string"},markdownDescription = "**DANGER** disables verification of TLS certificates for the hosts provided. There is likely a better way to deal with any errors than use this option. This is like using `--unsafely-ignore-certificate-errors` in the Deno CLI.",scope = "window",type = "array"},["deno.unstable"] = {default = false,examples = { true, false },markdownDescription = "Controls if code will be type checked with Deno's unstable APIs. This is the equivalent to using `--unstable` on the command line.\n\n**Not recommended to be enabled globally.**",scope = "window",type = "boolean"}},title = "Deno",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/elixir-ls.lua b/lua/mason-schemas/lsp/elixir-ls.lua new file mode 100644 index 00000000..ab43558b --- /dev/null +++ b/lua/mason-schemas/lsp/elixir-ls.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["elixirLS.additionalWatchedExtensions"] = {default = {},description = "Additional file types capable of triggering a build on change",items = {type = "string"},type = "array",uniqueItems = true},["elixirLS.dialyzerEnabled"] = {default = true,description = "Run ElixirLS's rapid Dialyzer when code is saved",scope = "resource",type = "boolean"},["elixirLS.dialyzerFormat"] = {default = "dialyxir_long",description = "Formatter to use for Dialyzer warnings",enum = { "dialyzer", "dialyxir_short", "dialyxir_long" },markdownEnumDescriptions = { "Original Dialyzer format", "Same as `mix dialyzer --format short`", "Same as `mix dialyzer --format long`" },scope = "resource",type = "string"},["elixirLS.dialyzerWarnOpts"] = {default = {},description = "Dialyzer options to enable or disable warnings. See Dialyzer's documentation for options. Note that the \"race_conditions\" option is unsupported",items = {enum = { "error_handling", "extra_return", "missing_return", "no_behaviours", "no_contracts", "no_fail_call", "no_fun_app", "no_improper_lists", "no_match", "no_missing_calls", "no_opaque", "no_return", "no_undefined_callbacks", "no_unused", "underspecs", "unknown", "unmatched_returns", "overspecs", "specdiffs", "no_underspecs", "no_extra_return", "no_missing_return" },type = "string"},scope = "resource",type = "array",uniqueItems = true},["elixirLS.enableTestLenses"] = {default = false,description = "Show code lenses to run tests in terminal",type = "boolean"},["elixirLS.envVariables"] = {description = "Environment variables to use for compilation",minLength = 0,scope = "resource",type = "object"},["elixirLS.fetchDeps"] = {default = false,description = "Automatically fetch project dependencies when compiling",scope = "resource",type = "boolean"},["elixirLS.mixEnv"] = {default = "test",description = "Mix environment to use for compilation",minLength = 1,scope = "resource",type = "string"},["elixirLS.mixTarget"] = {description = "Mix target to use for compilation",minLength = 0,scope = "resource",type = "string"},["elixirLS.projectDir"] = {default = "",description = "Subdirectory containing Mix project if not in the project root",minLength = 0,scope = "resource",type = "string"},["elixirLS.signatureAfterComplete"] = {default = true,description = "Show signature help after confirming autocomplete",type = "boolean"},["elixirLS.suggestSpecs"] = {default = true,description = "Suggest @spec annotations inline using Dialyzer's inferred success typings (Requires Dialyzer)",scope = "resource",type = "boolean"},["elixirLS.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the Elixir language server.",enum = { "off", "messages", "verbose" },type = "string"}},title = "ElixirLS"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/elm-language-server.lua b/lua/mason-schemas/lsp/elm-language-server.lua new file mode 100644 index 00000000..9d0d0c7e --- /dev/null +++ b/lua/mason-schemas/lsp/elm-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["elmLS.disableElmLSDiagnostics"] = {default = false,description = "Disable linting diagnostics from the language server.",scope = "window",type = "boolean"},["elmLS.elmFormatPath"] = {default = "",description = "The path to your elm-format executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.",scope = "window",type = "string"},["elmLS.elmPath"] = {default = "",description = "The path to your elm executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.",scope = "window",type = "string"},["elmLS.elmReviewDiagnostics"] = {default = "off",description = "Set severity or disable linting diagnostics for elm-review.",enum = { "off", "warning", "error" },scope = "window",type = "string"},["elmLS.elmReviewPath"] = {default = "",description = "The path to your elm-review executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.",scope = "window",type = "string"},["elmLS.elmTestPath"] = {default = "",description = "The path to your elm-test executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.",scope = "window",type = "string"},["elmLS.elmTestRunner.showElmTestOutput"] = {description = "Show output of elm-test as terminal task",scope = "resource",type = "boolean"},["elmLS.onlyUpdateDiagnosticsOnSave"] = {default = false,description = "Only update compiler diagnostics on save, not on document change.",scope = "window",type = "boolean"},["elmLS.skipInstallPackageConfirmation"] = {default = false,description = "Skips confirmation for the Install Package code action.",scope = "window",type = "boolean"},["elmLS.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"}},title = "Elm",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/fsautocomplete.lua b/lua/mason-schemas/lsp/fsautocomplete.lua new file mode 100644 index 00000000..c9553b0d --- /dev/null +++ b/lua/mason-schemas/lsp/fsautocomplete.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["FAKE.showTargetsOutlineIn"] = {default = "explorer",description = "Set the activity (left bar) where the FAKE targets outline view will be displayed.\nRequires restart.",enum = { "explorer", "fsharp" },scope = "application",type = "string"},["FAKE.targetsOutline"] = {default = true,description = "Enables the Targets Outline tree view.",scope = "resource",type = "boolean"},["FSharp.abstractClassStubGeneration"] = {default = true,description = "Enables a codefix that generates missing members for an abstract class when in an type inheriting from that abstract class.",type = "boolean"},["FSharp.abstractClassStubGenerationMethodBody"] = {default = 'failwith "Not Implemented"',description = "The expression to fill in the right-hand side of inherited members when generating missing members for an abstract base class",type = "string"},["FSharp.abstractClassStubGenerationObjectIdentifier"] = {default = "this",description = "The name of the 'self' identifier in an inherited member. For example, `this` in the expression `this.Member(x: int) = ()`",type = "string"},["FSharp.addFsiWatcher"] = {default = false,description = "Enables a panel for FSI that shows the value of all existing bindings in the FSI session",type = "boolean"},["FSharp.analyzersPath"] = {default = { "packages/Analyzers", "analyzers" },description = "Directories in the array are used as a source of custom analyzers. Requires restart.",scope = "machine-overridable",type = "array"},["FSharp.autoRevealInExplorer"] = {default = "sameAsFileExplorer",description = "Controls whether the solution explorer should automatically reveal and select files when opening them. If `sameAsFileExplorer` is set, then the value of the `explorer.autoReveal` setting will be used instead.",enum = { "sameAsFileExplorer", "enabled", "disabled" },scope = "window",type = "string"},["FSharp.codeLenses.references.enabled"] = {default = true,description = "If enabled, code lenses for reference counts for methods and functions will be shown.",type = "boolean"},["FSharp.codeLenses.signature.enabled"] = {default = true,description = "If enabled, code lenses for type signatures on methods and functions will be shown.",type = "boolean"},["FSharp.disableFailedProjectNotifications"] = {default = false,description = "Disables popup notifications for failed project loading",type = "boolean"},["FSharp.dotnetRoot"] = {description = "Sets the root path for finding locating the dotnet CLI binary. Defaults to the `dotnet` binary found on your system PATH.",type = "string"},["FSharp.enableAnalyzers"] = {default = false,description = "EXPERIMENTAL. Enables F# analyzers for custom code diagnostics. Requires restart.",type = "boolean"},["FSharp.enableBackgroundServices"] = {default = true,description = "Enables background services responsible for creating symbol cache and typechecking files in the background. Requires restart.",type = "boolean"},["FSharp.enableMSBuildProjectGraph"] = {default = false,description = "EXPERIMENTAL. Enables support for loading workspaces with MsBuild's ProjectGraph. This can improve load times. Requires restart.",type = "boolean"},["FSharp.enableReferenceCodeLens"] = {default = true,deprecationMessage = "This setting is deprecated. Use FSharp.codeLenses.references.enabled instead.",description = "Enables additional code lenses showing number of references of a function or value. Requires background services to be enabled.",markdownDeprecationMessage = "This setting is **deprecated**. Use `#FSharp.codeLenses.references.enabled#` instead.",type = "boolean"},["FSharp.enableTouchBar"] = {default = true,description = "Enables TouchBar integration of build/run/debug buttons",type = "boolean"},["FSharp.enableTreeView"] = {default = true,description = "Enables the solution explorer view of the current workspace, which shows the workspace as MSBuild sees it",type = "boolean"},["FSharp.excludeProjectDirectories"] = {default = { ".git", "paket-files", ".fable", "packages", "node_modules" },description = "Directories in the array are excluded from project file search. Requires restart.",type = "array"},["FSharp.externalAutocomplete"] = {default = false,description = "Includes external (from unopened modules and namespaces) symbols in autocomplete",type = "boolean"},["FSharp.fsac.attachDebugger"] = {default = false,description = "Appends the '--attachdebugger' argument to fsac, this will allow you to attach a debugger.",type = "boolean"},["FSharp.fsac.dotnetArgs"] = {default = {},description = "additional CLI arguments to be provided to the dotnet runner for FSAC",items = {type = "string"},type = "array"},["FSharp.fsac.netCoreDllPath"] = {default = "",description = "The path to the 'fsautocomplete.dll', useful for debugging a self-built fsac.",scope = "machine-overridable",type = "string"},["FSharp.fsac.silencedLogs"] = {default = {},description = "An array of log categories for FSAC to filter out. These can be found by viewing your log output and noting the text in between the brackets in the log line. For example, in the log line `[16:07:14.626 INF] [Compiler] done compiling foo.fsx`, the category is 'Compiler'. ",items = {type = "string"},type = "array"},["FSharp.fsiExtraParameters"] = {default = {},markdownDescription = "An array of additional command line parameters to pass to FSI when it is started. See [the Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/fsharp-interactive-options) for an exhaustive list.",type = "array"},["FSharp.fsiFilePath"] = {default = "",description = "The path to the F# Interactive tool used by Ionide-FSharp (.NET Framework only, on .NET Core `FSharp.fsiSdkFilePath` is used)",scope = "machine-overridable",type = "string"},["FSharp.fsiSdkFilePath"] = {default = "",description = "The path to the F# Interactive tool used by Ionide-FSharp (When using .NET SDK scripts)",scope = "machine-overridable",type = "string"},["FSharp.generateBinlog"] = {default = false,markdownDescription = "Enables generation of `msbuild.binlog` files for project loading. It works only for fresh, non-cached project loading. Run `F#: Clear Project Cache` and reload window to force fresh loading of all projects. These files can be loaded and inspected using the [MSBuild Structured Logger](https://github.com/KirillOsenkov/MSBuildStructuredLog)",type = "boolean"},["FSharp.indentationSize"] = {default = 4,description = "The number of spaces used for indentation when generating code, e.g. for interface stubs",minimum = 1,type = "number"},["FSharp.infoPanelReplaceHover"] = {default = false,description = "Controls whether the info panel replaces tooltips",type = "boolean"},["FSharp.infoPanelShowOnStartup"] = {default = false,description = "Controls whether the info panel should be displayed at startup",type = "boolean"},["FSharp.infoPanelStartLocked"] = {default = false,description = "Controls whether the info panel should be locked at startup",type = "boolean"},["FSharp.infoPanelUpdate"] = {default = "onCursorMove",description = "Controls when the info panel is updated",enum = { "onCursorMove", "onHover", "both", "none" },type = "string"},["FSharp.inlayHints.disableLongTooltip"] = {default = false,description = "Hides the explanatory tooltip that appears on InlayHints to describe the different configuration toggles.",type = "boolean"},["FSharp.inlayHints.enabled"] = {default = true,description = "Controls if the inlay hints feature is enabled",type = "boolean"},["FSharp.inlayHints.parameterNames"] = {default = true,description = "Controls if parameter-name inlay hints will be displayed for functions and methods",type = "boolean"},["FSharp.inlayHints.typeAnnotations"] = {default = true,description = "Controls if type-annotation inlay hints will be displayed for bindings.",type = "boolean"},["FSharp.interfaceStubGeneration"] = {default = true,description = "Enables a codefix that generates missing interface members when inside of an interface implementation expression",type = "boolean"},["FSharp.interfaceStubGenerationMethodBody"] = {default = 'failwith "Not Implemented"',description = "The expression to fill in the right-hand side of interface members when generating missing members for an interface implementation expression",type = "string"},["FSharp.interfaceStubGenerationObjectIdentifier"] = {default = "this",description = "The name of the 'self' identifier in an interface member. For example, `this` in the expression `this.Member(x: int) = ()`",type = "string"},["FSharp.keywordsAutocomplete"] = {default = true,description = "Includes keywords in autocomplete",type = "boolean"},["FSharp.lineLens.enabled"] = {default = "replaceCodeLens",description = "Usage mode for LineLens. If `never`, LineLens will never be shown. If `replaceCodeLens`, LineLens will be placed in a decoration on top of the current line.",enum = { "never", "replaceCodeLens", "always" },type = "string"},["FSharp.lineLens.prefix"] = {default = " // ",description = "The prefix displayed before the signature in a LineLens",type = "string"},["FSharp.linter"] = {default = true,markdownDescription = "Enables integration with [FSharpLint](https://fsprojects.github.io/FSharpLint/) for additional (user-defined) warnings",type = "boolean"},["FSharp.msbuildAutoshow"] = {default = false,description = "Automatically shows the MSBuild output panel when MSBuild functionality is invoked",type = "boolean"},["FSharp.pipelineHints.enabled"] = {default = true,description = "Enables PipeLine hints, which are like LineLenses that appear along each step of a chain of piped expressions",type = "boolean"},["FSharp.pipelineHints.prefix"] = {default = " // ",description = "The prefix displayed before the signature",type = "string"},["FSharp.recordStubGeneration"] = {default = true,description = "Enables a codefix that will generate missing record fields when inside a record construction expression",type = "boolean"},["FSharp.recordStubGenerationBody"] = {default = 'failwith "Not Implemented"',description = "The expression to fill in the right-hand side of record fields when generating missing fields for a record construction expression",type = "string"},["FSharp.resolveNamespaces"] = {default = true,description = "Enables a codefix that will suggest namespaces or module to open when a name is not recognized",type = "boolean"},["FSharp.saveOnSendLastSelection"] = {default = false,description = "If enabled, the current file will be saved before sending the last selection to FSI for evaluation",type = "boolean"},["FSharp.showExplorerOnStartup"] = {default = true,description = "Automatically shows solution explorer on plugin startup",type = "boolean"},["FSharp.showProjectExplorerIn"] = {default = "fsharp",description = "Set the activity (left bar) where the project explorer view will be displayed. If `explorer`, then the project explorer will be a collapsible tab in the main explorer view, a sibling to the file system explorer. If `fsharp`, a new activity with the F# logo will be added and the project explorer will be rendered in this activity.Requires restart.",enum = { "explorer", "fsharp" },scope = "application",type = "string"},["FSharp.simplifyNameAnalyzer"] = {default = true,description = "Enables detection of cases when names of functions and values can be simplified",type = "boolean"},["FSharp.smartIndent"] = {default = false,description = "Enables smart indent feature",type = "boolean"},["FSharp.suggestGitignore"] = {default = true,description = "Allow Ionide to prompt whenever internal data files aren't included in your project's .gitignore",type = "boolean"},["FSharp.suggestSdkScripts"] = {default = true,description = "Allow Ionide to prompt to use SdkScripts",type = "boolean"},["FSharp.trace.server"] = {default = "off",description = "Trace server messages at the LSP protocol level for diagnostics.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["FSharp.unionCaseStubGeneration"] = {default = true,description = "Enables a codefix that generates missing union cases when in a match expression",type = "boolean"},["FSharp.unionCaseStubGenerationBody"] = {default = 'failwith "Not Implemented"',description = "The expression to fill in the right-hand side of match cases when generating missing cases for a match on a discriminated union",type = "string"},["FSharp.unusedDeclarationsAnalyzer"] = {default = true,description = "Enables detection of unused declarations",type = "boolean"},["FSharp.unusedOpensAnalyzer"] = {default = true,description = "Enables detection of unused opens",type = "boolean"},["FSharp.useSdkScripts"] = {default = true,description = "Use 'dotnet fsi' instead of 'fsi.exe'/'fsharpi' to start an FSI session",type = "boolean"},["FSharp.verboseLogging"] = {default = false,description = "Logs additional information to F# output channel. This is equivalent to passing the `--verbose` flag to FSAC. Requires restart.",type = "boolean"},["FSharp.workspaceModePeekDeepLevel"] = {default = 4,description = "The deep level of directory hierarchy when searching for sln/projects",type = "integer"},["FSharp.workspacePath"] = {description = "Path to the directory or solution file that should be loaded as a workspace. If set, no workspace probing or discovery is done by Ionide at all.",scope = "window",type = "string"}},title = "F#",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/grammarly-languageserver.lua b/lua/mason-schemas/lsp/grammarly-languageserver.lua new file mode 100644 index 00000000..d1063c86 --- /dev/null +++ b/lua/mason-schemas/lsp/grammarly-languageserver.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["grammarly.config.documentDialect"] = {default = "auto-text",enum = { "american", "australian", "british", "canadian", "auto-text" },enumDescriptions = { "", "", "", "", "An appropriate value based on the text." },markdownDescription = "Specific variety of English being written. See [this article](https://support.grammarly.com/hc/en-us/articles/115000089992-Select-between-British-English-American-English-Canadian-English-and-Australian-English) for differences.",scope = "language-overridable"},["grammarly.config.documentDomain"] = {default = "general",enum = { "academic", "business", "general", "mail", "casual", "creative" },enumDescriptions = { "Academic is the strictest style of writing. On top of catching grammar and punctuation issues, Grammarly will make suggestions around passive voice, contractions, and informal pronouns (I, you), and will point out unclear antecedents (e.g., sentences starting with โ€œThis isโ€ฆโ€).", "The business style setting checks the text against formal writing criteria. However, unlike the Academic domain, it allows the use of some informal expressions, informal pronouns, and unclear antecedents.", "This is the default style and uses a medium level of strictness.", "The email genre is similar to the General domain and helps ensure that your email communication is engaging. In addition to catching grammar, spelling, and punctuation mistakes, Grammarly also points out the use of overly direct language that may sound harsh to a reader.", "Casual is designed for informal types of writing and ignores most style issues. It does not flag contractions, passive voice, informal pronouns, who-versus-whom usage, split infinitives, or run-on sentences. This style is suitable for personal communication.", "This is the most permissive style. It catches grammar, punctuation, and spelling mistakes but allows some leeway for those who want to intentionally bend grammar rules to achieve certain effects. Creative doesnโ€™t flag sentence fragments (missing subjects or verbs), wordy sentences, colloquialisms, informal pronouns, passive voice, incomplete comparisons, or run-on sentences." },markdownDescription = "The style or type of writing to be checked. See [What is domain/document type](https://support.grammarly.com/hc/en-us/articles/115000091472-What-is-domain-document-type-)?",scope = "language-overridable"},["grammarly.config.suggestions.ConjunctionAtStartOfSentence"] = {default = false,description = "Flags use of conjunctions such as 'but' and 'and' at the beginning of sentences.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.Fluency"] = {default = true,description = "Suggests ways to sound more natural and fluent.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.InformalPronounsAcademic"] = {default = false,description = "Flags use of personal pronouns such as 'I' and 'you' in academic writing.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.MissingSpaces"] = {default = true,description = "Suggests adding missing spacing after a numeral when writing times.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.NounStrings"] = {default = true,description = "Flags a series of nouns that modify a final noun.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.NumbersBeginningSentences"] = {default = true,description = "Suggests spelling out numbers at the beginning of sentences.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.NumbersZeroThroughTen"] = {default = true,description = "Suggests spelling out numbers zero through ten.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.OxfordComma"] = {default = false,description = "Suggests adding the Oxford comma after the second-to-last item in a list of things.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PassiveVoice"] = {default = false,description = "Flags use of passive voice.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PersonFirstLanguage"] = {default = true,description = "Suggests using person-first language to refer respectfully to an individual with a disability.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageAgeRelated"] = {default = true,description = "Suggests alternatives to potentially biased language related to older adults.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageDisabilityRelated"] = {default = true,description = "Suggests alternatives to potentially ableist language.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageFamilyRelated"] = {default = true,description = "Suggests alternatives to potentially biased language related to parenting and family systems.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageGenderRelated"] = {default = true,description = "Suggests alternatives to potentially gender-biased and non-inclusive phrasing.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageHumanRights"] = {default = true,description = "Suggests alternatives to language related to human slavery.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageHumanRightsRelated"] = {default = true,description = "Suggests alternatives to terms with origins in the institution of slavery.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageLgbtqiaRelated"] = {default = true,description = "Flags LGBTQIA+-related terms that may be seen as biased, outdated, or disrespectful in some contexts.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyBiasedLanguageRaceEthnicityRelated"] = {default = true,description = "Suggests alternatives to potentially biased language related to race and ethnicity.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PossiblyPoliticallyIncorrectLanguage"] = {default = true,description = "Suggests alternatives to language that may be considered politically incorrect.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PrepositionAtTheEndOfSentence"] = {default = false,description = "Flags use of prepositions such as 'with' and 'in' at the end of sentences.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.PunctuationWithQuotation"] = {default = true,description = "Suggests placing punctuation before closing quotation marks.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.ReadabilityFillerwords"] = {default = true,description = "Flags long, complicated sentences that could potentially confuse your reader.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.ReadabilityTransforms"] = {default = true,description = "Suggests splitting long, complicated sentences that could potentially confuse your reader.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.SentenceVariety"] = {default = true,description = "Flags series of sentences that follow the same pattern.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.SpacesSurroundingSlash"] = {default = true,description = "Suggests removing extra spaces surrounding a slash.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.SplitInfinitive"] = {default = true,description = "Suggests rewriting split infinitives so that an adverb doesn't come between 'to' and the verb.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.StylisticFragments"] = {default = false,description = "Suggests completing all incomplete sentences, including stylistic sentence fragments that may be intentional.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.UnnecessaryEllipses"] = {default = false,description = "Flags unnecessary use of ellipses (...).",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.Variety"] = {default = true,description = "Suggests alternatives to words that occur frequently in the same paragraph.",scope = "language-overridable",type = "boolean"},["grammarly.config.suggestions.Vocabulary"] = {default = true,description = "Suggests alternatives to bland and overused words such as 'good' and 'nice'.",scope = "language-overridable",type = "boolean"},["grammarly.files.exclude"] = {default = {},items = {type = "string"},markdownDescription = "Configure [glob patterns](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options) for excluding files and folders.",order = 2,required = true,scope = "window",type = "array"},["grammarly.files.include"] = {default = { "**/readme.md", "**/README.md", "**/*.txt" },items = {type = "string"},markdownDescription = "Configure [glob patterns](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options) for including files and folders.",order = 1,required = true,scope = "window",type = "array"},["grammarly.patterns"] = {default = { "**/readme.md", "**/README.md", "**/*.txt" },description = "A glob pattern, like `*.{md,txt}` for file scheme.",items = {type = "string"},markdownDeprecationMessage = "Use [Files: Include](#grammarly.files.include#)",order = 0,required = true,scope = "window",type = "array"},["grammarly.selectors"] = {default = {},description = "Filter documents to be checked with Grammarly.",items = {properties = {language = {description = "A language id, like `typescript`.",type = "string"},pattern = {description = "A glob pattern, like `*.{md,txt}`.",type = "string"},scheme = {description = "A Uri scheme, like `file` or `untitled`.",type = "string"}},type = "object"},order = 99,required = true,scope = "window",type = "array"},["grammarly.startTextCheckInPausedState"] = {default = false,description = "Start text checking session in paused state",type = "boolean"}},title = "Grammarly"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/haxe-language-server.lua b/lua/mason-schemas/lsp/haxe-language-server.lua new file mode 100644 index 00000000..c8c4adfc --- /dev/null +++ b/lua/mason-schemas/lsp/haxe-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["haxe.buildCompletionCache"] = {default = true,markdownDescription = "Speed up completion by building the project once on startup to initialize the cache.",type = "boolean"},["haxe.codeGeneration"] = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for code generation",properties = {functions = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for generating functions",properties = {anonymous = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for generating anonymous functions",properties = {argumentTypeHints = {default = false,markdownDescription = "Whether to include type hints for arguments",type = "boolean"},explicitNull = {default = false,markdownDescription = "Whether to wrap types in `Null` even if it can be omitted (for optional arguments with `?`)",type = "boolean"},returnTypeHint = {default = "never",enum = { "always", "never", "non-void" },markdownDescription = "In which case to include return type hints",type = "string"},useArrowSyntax = {default = true,markdownDescription = "Whether to use arrow function syntax (Haxe 4+)",type = "boolean"}},type = "object"},field = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for generating field-level functions",properties = {argumentTypeHints = {default = true,markdownDescription = "Whether to include type hints for arguments",type = "boolean"},explicitNull = {default = false,markdownDescription = "Whether to wrap types in `Null` even if it can be omitted (for optional arguments with `?`)",type = "boolean"},explicitPrivate = {default = false,markdownDescription = "Whether to include the private visibility modifier even if it can be omitted",type = "boolean"},explicitPublic = {default = false,markdownDescription = "Whether to include the public visibility modifier even if it can be omitted",type = "boolean"},placeOpenBraceOnNewLine = {default = false,markdownDescription = "Whether to place `{` in a new line",type = "boolean"},returnTypeHint = {default = "non-void",enum = { "always", "never", "non-void" },markdownDescription = "In which case to include return type hints",type = "string"}},type = "object"}},type = "object"},imports = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for generating imports",properties = {enableAutoImports = {default = true,markdownDescription = "Whether to insert an import automatically when selecting a not-yet-imported type from completion. If `false`, the fully qualified name is inserted instead.",type = "boolean"},style = {default = "type",enum = { "type", "module" },markdownDescription = "How to deal with module subtypes when generating imports.",markdownEnumDescriptions = { "Import only the specific sub-type (`import pack.Foo.Type`).", "Import the entire module the sub-type lives in (`import pack.Foo`)." },type = "string"}},type = "object"},switch = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for generating switch expressions",properties = {parentheses = {default = false,markdownDescription = "Whether to wrap the switch subject in parentheses",type = "boolean"}},type = "object"}},type = "object"},["haxe.configurations"] = {default = {},items = {markdownDescription = "Command-line arguments passed to the Haxe completion server. Can contain HXML files. Relative paths will be resolved against workspace root.",oneOf = { {items = {type = "string"},type = "array"}, {additionalProperties = false,properties = {args = {items = {type = "string"},markdownDescription = "The Haxe command-line arguments.",type = "array"},label = {markdownDescription = "The label to use for displaying this configuration in the UI.",type = "string"}},type = "object"} }},markdownDescription = "Array of switchable configurations for the Haxe completion server. Each configuration is an array of command-line arguments, see item documentation for more details.",type = "array"},["haxe.diagnosticsPathFilter"] = {default = "${workspaceRoot}",markdownDescription = 'A regex that paths of source files have to match to be included in diagnostics. Defaults to `"${workspaceRoot}"` so only files within your workspace are included. You can use `"${haxelibPath}/"` to only show results for a specific haxelib. Use `".*?"` to see all results, including haxelibs.',type = "string"},["haxe.displayConfigurations"] = {default = {},deprecationMessage = 'Use "haxe.configurations" instead',type = "array"},["haxe.displayPort"] = {default = "auto",markdownDescription = 'Integer value for the port to open on the display server, or `"auto"`. Can be used to `--connect` Haxe build commands.',oneOf = { {type = "integer"}, {enum = { "auto" },type = "string"} }},["haxe.displayServer"] = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Haxe completion server configuration",properties = {arguments = {default = {},items = {type = "string"},markdownDescription = 'Array of arguments passed to the Haxe completion server at start. Can be used for debugging completion server issues, for example by adding the `"-v"` argument.',type = "array"},print = {additionalProperties = false,default = {completion = false,reusing = false},markdownDescription = "Which debug output to print to the Haxe output channel. With `-v`, all flags default to `true`, and without it to `false`. Setting a flag here overrides the default. Only works with Haxe 4.0.0-preview.4 or newer.",properties = {addedDirectory = {type = "boolean"},arguments = {type = "boolean"},cachedModules = {type = "boolean"},changedDirectories = {type = "boolean"},completion = {type = "boolean"},defines = {type = "boolean"},displayPosition = {type = "boolean"},foundDirectories = {type = "boolean"},message = {type = "boolean"},modulePathChanged = {type = "boolean"},newContext = {type = "boolean"},notCached = {type = "boolean"},parsed = {type = "boolean"},removedDirectory = {type = "boolean"},reusing = {type = "boolean"},signature = {type = "boolean"},skippingDep = {type = "boolean"},socketMessage = {type = "boolean"},stats = {type = "boolean"},uncaughtError = {type = "boolean"},unchangedContent = {type = "boolean"}},type = "object"},useSocket = {default = true,markdownDescription = "If possible, use a socket for communication with Haxe rather than stdio.",type = "boolean"}},type = "object"},["haxe.enableBraceBodyWrapping"] = {default = false,markdownDescription = "Add closing brace at the end of one-line `if/for/while` body expressions",type = "boolean"},["haxe.enableCodeLens"] = {default = false,markdownDescription = "Enable code lens to show some statistics",type = "boolean"},["haxe.enableCompilationServer"] = {default = true,markdownDescription = "Use the extension's Haxe server to compile auto-generated tasks. Requires `\"haxe.displayPort\"` to be set.",type = "boolean"},["haxe.enableCompletionCacheWarning"] = {default = true,markdownDescription = "Whether a warning popup should be shown if the completion cache build has failed.",type = "boolean"},["haxe.enableDiagnostics"] = {default = true,markdownDescription = "Enable automatic diagnostics of Haxe files, run automatically on open and save.",type = "boolean"},["haxe.enableExtendedIndentation"] = {default = false,markdownDescription = "Align new line brackets with Allman style. Can have typing overhead and is incompatible with the Vim extension.",type = "boolean"},["haxe.enableMethodsView"] = {default = false,deprecationMessage = 'Use "haxe.enableServerView" instead',type = "boolean"},["haxe.enableServerView"] = {default = false,markdownDescription = 'Enable the "Haxe Server" view container for performance and cache debugging.',type = "boolean"},["haxe.enableSignatureHelpDocumentation"] = {default = true,markdownDescription = "Whether signature help should include documentation or not.",type = "boolean"},["haxe.exclude"] = {default = { "zpp_nape" },markdownDescription = "A list of dot paths (packages, modules, types) to exclude from classpath parsing, completion and workspace symbols. Can be useful to improve performance.",type = "array"},["haxe.executable"] = {default = "auto",markdownDescription = "Path to the Haxe executable or an object containing a Haxe executable configuration",oneOf = { {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}, {additionalProperties = false,markdownDescription = "Haxe executable configuration",properties = {env = {additionalProperties = {type = "string"},default = vim.empty_dict(),markdownDescription = "Additional environment variables used for running Haxe executable",type = "object"},linux = {default = "auto",markdownDescription = "Linux-specific path to the Haxe executable or an object containing a Haxe executable configuration",oneOf = { {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}, {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Overrides for Linux",properties = {env = {additionalProperties = {type = "string"},default = vim.empty_dict(),markdownDescription = "Additional environment variables used for running Haxe executable",type = "object"},path = {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}},type = "object"} }},osx = {default = "auto",markdownDescription = "Mac-specific path to the Haxe executable or an object containing a Haxe executable configuration",oneOf = { {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}, {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Overrides for Mac",properties = {env = {additionalProperties = {type = "string"},default = vim.empty_dict(),markdownDescription = "Additional environment variables used for running Haxe executable",type = "object"},path = {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}},type = "object"} }},path = {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"},windows = {default = "auto",markdownDescription = "Windows-specific path to the Haxe executable or an object containing a Haxe executable configuration",oneOf = { {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}, {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Overrides for Windows",properties = {env = {additionalProperties = {type = "string"},default = vim.empty_dict(),markdownDescription = "Additional environment variables used for running Haxe executable",type = "object"},path = {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxe executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxe executable",type = "string"}},type = "object"} }}},type = "object"} },scope = "resource"},["haxe.maxCompletionItems"] = {default = 1000,markdownDescription = "Upper limit for the number of completion items that can be shown at once.",type = "integer"},["haxe.postfixCompletion"] = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "Options for postfix completion",properties = {level = {default = "full",enum = { "full", "filtered", "off" },markdownDescription = "Which kinds of postfix completions to include",markdownEnumDescriptions = { "Show all postfix completion items.", "Only show items that apply to specific types like `for` and `switch`.", "Disable postfix completion." },type = "string"}},type = "object"},["haxe.taskPresentation"] = {additionalProperties = false,default = {clear = false,echo = true,focus = false,panel = "shared",reveal = "always",showReuseMessage = true},markdownDescription = "Configures which presentation options to use for generated tasks by default (see `presentation` in `tasks.json`).",properties = {clear = {default = false,markdownDescription = "Controls whether the terminal is cleared before executing the task.",type = "boolean"},echo = {default = true,markdownDescription = "Controls whether the executed command is echoed to the panel. Default is `true`.",type = "boolean"},focus = {default = false,markdownDescription = "Controls whether the panel takes focus. Default is `false`. If set to `true` the panel is revealed as well.",type = "boolean"},panel = {default = "shared",enum = { "shared", "dedicated", "new" },markdownDescription = "Controls if the panel is shared between tasks, dedicated to this task or a new one is created on every run.",type = "string"},reveal = {default = "always",enum = { "always", "silent", "never" },markdownDescription = 'Controls whether the panel running the task is revealed or not. Default is `"always"`.',markdownEnumDescriptions = { "Always reveals the terminal when this task is executed.", "Only reveals the terminal if no problem matcher is associated with the task and an errors occurs executing it.", "Never reveals the terminal when this task is executed." },type = "string"},showReuseMessage = {default = true,markdownDescription = "Controls whether to show the `Terminal will be reused by tasks, press any key to close it` message.",type = "boolean"}},type = "object"},["haxe.useLegacyCompletion"] = {default = false,markdownDescription = "Whether to revert to a Haxe 3 style completion where only toplevel packages and imported types are shown (effectively making it incompatible with auto-imports). *Note:* this setting has no effect with Haxe versions earlier than 4.0.0-rc.4.",type = "boolean"},["haxelib.executable"] = {anyOf = { {enum = { "auto" },markdownEnumDescriptions = { "Auto-detect the Haxelib executable." },type = "string"}, {type = "string"} },default = "auto",markdownDescription = "Path to the Haxelib executable",scope = "resource",type = "string"}},title = "Haxe"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/html-lsp.lua b/lua/mason-schemas/lsp/html-lsp.lua new file mode 100644 index 00000000..605ccb49 --- /dev/null +++ b/lua/mason-schemas/lsp/html-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {id = "html",order = 20,properties = {["html.autoClosingTags"] = {default = true,description = "%html.autoClosingTags%",scope = "resource",type = "boolean"},["html.autoCreateQuotes"] = {default = true,description = "%html.autoCreateQuotes%",scope = "resource",type = "boolean"},["html.completion.attributeDefaultValue"] = {default = "doublequotes",description = "%html.completion.attributeDefaultValue%",enum = { "doublequotes", "singlequotes", "empty" },enumDescriptions = { "%html.completion.attributeDefaultValue.doublequotes%", "%html.completion.attributeDefaultValue.singlequotes%", "%html.completion.attributeDefaultValue.empty%" },scope = "resource",type = "string"},["html.customData"] = {default = {},items = {type = "string"},markdownDescription = "%html.customData.desc%",scope = "resource",type = "array"},["html.format.contentUnformatted"] = {default = "pre,code,textarea",markdownDescription = "%html.format.contentUnformatted.desc%",scope = "resource",type = { "string", "null" }},["html.format.enable"] = {default = true,description = "%html.format.enable.desc%",scope = "window",type = "boolean"},["html.format.extraLiners"] = {default = "head, body, /html",markdownDescription = "%html.format.extraLiners.desc%",scope = "resource",type = { "string", "null" }},["html.format.indentHandlebars"] = {default = false,markdownDescription = "%html.format.indentHandlebars.desc%",scope = "resource",type = "boolean"},["html.format.indentInnerHtml"] = {default = false,markdownDescription = "%html.format.indentInnerHtml.desc%",scope = "resource",type = "boolean"},["html.format.maxPreserveNewLines"] = {default = vim.NIL,markdownDescription = "%html.format.maxPreserveNewLines.desc%",scope = "resource",type = { "number", "null" }},["html.format.preserveNewLines"] = {default = true,description = "%html.format.preserveNewLines.desc%",scope = "resource",type = "boolean"},["html.format.templating"] = {default = false,description = "%html.format.templating.desc%",scope = "resource",type = "boolean"},["html.format.unformatted"] = {default = "wbr",markdownDescription = "%html.format.unformatted.desc%",scope = "resource",type = { "string", "null" }},["html.format.unformattedContentDelimiter"] = {default = "",markdownDescription = "%html.format.unformattedContentDelimiter.desc%",scope = "resource",type = "string"},["html.format.wrapAttributes"] = {default = "auto",description = "%html.format.wrapAttributes.desc%",enum = { "auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned" },enumDescriptions = { "%html.format.wrapAttributes.auto%", "%html.format.wrapAttributes.force%", "%html.format.wrapAttributes.forcealign%", "%html.format.wrapAttributes.forcemultiline%", "%html.format.wrapAttributes.alignedmultiple%", "%html.format.wrapAttributes.preserve%", "%html.format.wrapAttributes.preservealigned%" },scope = "resource",type = "string"},["html.format.wrapAttributesIndentSize"] = {default = vim.NIL,markdownDescription = "%html.format.wrapAttributesIndentSize.desc%",scope = "resource",type = { "number", "null" }},["html.format.wrapLineLength"] = {default = 120,description = "%html.format.wrapLineLength.desc%",scope = "resource",type = "integer"},["html.hover.documentation"] = {default = true,description = "%html.hover.documentation%",scope = "resource",type = "boolean"},["html.hover.references"] = {default = true,description = "%html.hover.references%",scope = "resource",type = "boolean"},["html.mirrorCursorOnMatchingTag"] = {default = false,deprecationMessage = "%html.mirrorCursorOnMatchingTagDeprecationMessage%",description = "%html.mirrorCursorOnMatchingTag%",scope = "resource",type = "boolean"},["html.suggest.html5"] = {default = true,description = "%html.suggest.html5.desc%",scope = "resource",type = "boolean"},["html.trace.server"] = {default = "off",description = "%html.trace.server.desc%",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["html.validate.scripts"] = {default = true,description = "%html.validate.scripts%",scope = "resource",type = "boolean"},["html.validate.styles"] = {default = true,description = "%html.validate.styles%",scope = "resource",type = "boolean"}},title = "HTML",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/intelephense.lua b/lua/mason-schemas/lsp/intelephense.lua new file mode 100644 index 00000000..10d4a5c7 --- /dev/null +++ b/lua/mason-schemas/lsp/intelephense.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["intelephense.compatibility.correctForArrayAccessArrayAndTraversableArrayUnionTypes"] = {default = true,description = "Resolves `ArrayAccess` and `Traversable` implementations that are unioned with a typed array to generic syntax. eg `ArrayAccessOrTraversable|ElementType[]` => `ArrayAccessOrTraversable`.",scope = "window",type = "boolean"},["intelephense.compatibility.correctForBaseClassStaticUnionTypes"] = {default = true,description = "Resolves `BaseClass|static` union types to `static` instead of `BaseClass`.",scope = "window",type = "boolean"},["intelephense.completion.fullyQualifyGlobalConstantsAndFunctions"] = {default = false,description = "Global namespace constants and functions will be fully qualified (prefixed with a backslash).",scope = "window",type = "boolean"},["intelephense.completion.insertUseDeclaration"] = {default = true,description = "Use declarations will be automatically inserted for namespaced classes, traits, interfaces, functions, and constants.",scope = "window",type = "boolean"},["intelephense.completion.maxItems"] = {default = 100,description = "The maximum number of completion items returned per request.",scope = "window",type = "number"},["intelephense.completion.triggerParameterHints"] = {default = true,description = "Method and function completions will include parentheses and trigger parameter hints.",scope = "window",type = "boolean"},["intelephense.diagnostics.argumentCount"] = {default = true,description = "Enables argument count diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.deprecated"] = {default = true,description = "Enables deprecated diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.duplicateSymbols"] = {default = true,description = "Enables duplicate symbol diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.embeddedLanguages"] = {default = true,description = "Enables diagnostics in embedded languages.",scope = "window",type = "boolean"},["intelephense.diagnostics.enable"] = {default = true,description = "Enables diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.implementationErrors"] = {default = true,description = "Enables reporting of problems associated with method and class implementations. For example, unimplemented methods or method signature incompatibilities.",scope = "window",type = "boolean"},["intelephense.diagnostics.languageConstraints"] = {default = true,description = "Enables reporting of various language constraint errors.",scope = "window",type = "boolean"},["intelephense.diagnostics.run"] = {default = "onType",description = "Controls when diagnostics are run.",enum = { "onType", "onSave" },enumDescriptions = { "Diagnostics will run as changes are made to the document.", "Diagnostics will run when the document is saved." },scope = "window",type = "string"},["intelephense.diagnostics.typeErrors"] = {default = true,description = "Enables diagnostics on type compatibility of arguments, property assignments, and return statements where types have been declared.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedClassConstants"] = {default = true,description = "Enables undefined class constant diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedConstants"] = {default = true,description = "Enables undefined constant diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedFunctions"] = {default = true,description = "Enables undefined function diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedMethods"] = {default = true,description = "Enables undefined method diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedProperties"] = {default = true,description = "Enables undefined static property diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedSymbols"] = {default = true,description = "DEPRECATED. Use the setting for each symbol category.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedTypes"] = {default = true,description = "Enables undefined class, interface and trait diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.undefinedVariables"] = {default = true,description = "Enables undefined variable diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.unexpectedTokens"] = {default = true,description = "Enables unexpected token diagnostics.",scope = "window",type = "boolean"},["intelephense.diagnostics.unusedSymbols"] = {default = true,description = "Enables unused variable, private member, and import diagnostics.",scope = "window",type = "boolean"},["intelephense.environment.documentRoot"] = {description = "The directory of the entry point to the application (directory of index.php). Can be absolute or relative to the workspace folder. Used for resolving script inclusion and path suggestions.",scope = "resource",type = "string"},["intelephense.environment.includePaths"] = {description = "The include paths (as individual path items) as defined in the include_path ini setting or paths to external libraries. Can be absolute or relative to the workspace folder. Used for resolving script inclusion and/or adding external symbols to folder.",items = {type = "string"},scope = "resource",type = "array"},["intelephense.environment.phpVersion"] = {default = "8.1.0",description = "A semver compatible string that represents the target PHP version. Used for providing version appropriate suggestions and diagnostics. PHP 5.3.0 and greater supported.",scope = "window",type = "string"},["intelephense.environment.shortOpenTag"] = {default = true,description = "When enabled '` or `}`",scope = "window",type = "boolean"},["java.format.settings.profile"] = {default = vim.NIL,description = "Optional formatter profile name from the Eclipse formatter settings.",scope = "window",type = "string"},["java.format.settings.url"] = {default = vim.NIL,markdownDescription = "Specifies the url or file path to the [Eclipse formatter xml settings](https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings).",scope = "window",type = "string"},["java.home"] = {default = vim.NIL,deprecationMessage = "This setting is deprecated, please use 'java.jdt.ls.java.home' instead.",description = 'Specifies the folder path to the JDK (17 or more recent) used to launch the Java Language Server.\nOn Windows, backslashes must be escaped, i.e.\n"java.home":"C:\\\\Program Files\\\\Java\\\\jdk-17.0_3"',scope = "machine-overridable",type = { "string", "null" }},["java.implementationsCodeLens.enabled"] = {default = false,description = "Enable/disable the implementations code lens.",scope = "window",type = "boolean"},["java.import.exclusions"] = {default = { "**/node_modules/**", "**/.metadata/**", "**/archetype-resources/**", "**/META-INF/maven/**" },description = "Configure glob patterns for excluding folders. Use `!` to negate patterns to allow subfolders imports. You have to include a parent directory. The order is important.",scope = "window",type = "array"},["java.import.generatesMetadataFilesAtProjectRoot"] = {default = false,markdownDescription = "Specify whether the project metadata files(.project, .classpath, .factorypath, .settings/) will be generated at the project root. Click [HERE](command:_java.metadataFilesGeneration) to learn how to change the setting to make it take effect.",scope = "window",type = "boolean"},["java.import.gradle.arguments"] = {default = vim.NIL,description = "Arguments to pass to Gradle.",scope = "machine",type = "string"},["java.import.gradle.enabled"] = {default = true,description = "Enable/disable the Gradle importer.",scope = "window",type = "boolean"},["java.import.gradle.home"] = {default = vim.NIL,description = "Use Gradle from the specified local installation directory or GRADLE_HOME if the Gradle wrapper is missing or disabled and no 'java.import.gradle.version' is specified.",scope = "window",type = "string"},["java.import.gradle.java.home"] = {default = vim.NIL,description = "The location to the JVM used to run the Gradle daemon.",scope = "machine",type = "string"},["java.import.gradle.jvmArguments"] = {default = vim.NIL,description = "JVM arguments to pass to Gradle.",scope = "machine",type = "string"},["java.import.gradle.offline.enabled"] = {default = false,description = "Enable/disable the Gradle offline mode.",scope = "window",type = "boolean"},["java.import.gradle.user.home"] = {default = vim.NIL,description = "Setting for GRADLE_USER_HOME.",scope = "window",type = "string"},["java.import.gradle.version"] = {default = vim.NIL,description = "Use Gradle from the specific version if the Gradle wrapper is missing or disabled.",scope = "window",type = "string"},["java.import.gradle.wrapper.enabled"] = {default = true,description = "Use Gradle from the 'gradle-wrapper.properties' file.",scope = "window",type = "boolean"},["java.import.maven.enabled"] = {default = true,description = "Enable/disable the Maven importer.",scope = "window",type = "boolean"},["java.imports.gradle.wrapper.checksums"] = {default = {},description = "Defines allowed/disallowed SHA-256 checksums of Gradle Wrappers",items = {additionalProperties = false,default = vim.empty_dict(),properties = {allowed = {default = true,label = "Is allowed?",type = "boolean"},sha256 = {label = "SHA-256 checksum.",type = "string"}},required = { "sha256" },type = "object",uniqueItems = true},scope = "application",type = "array"},["java.inlayHints.parameterNames.enabled"] = {default = "literals",enum = { "none", "literals", "all" },enumDescriptions = { "Disable parameter name hints", "Enable parameter name hints only for literal arguments", "Enable parameter name hints for literal and non-literal arguments" },markdownDescription = "Enable/disable inlay hints for parameter names:\n```java\n\nInteger.valueOf(/* s: */ '123', /* radix: */ 10)\n \n```\n `#java.inlayHints.parameterNames.exclusions#` can be used to disable the inlay hints for methods.",scope = "window",type = "string"},["java.inlayHints.parameterNames.exclusions"] = {default = {},items = {type = "string"},markdownDescription = "The patterns for the methods that will be disabled to show the inlay hints. Supported pattern examples:\n - `java.lang.Math.*` - All the methods from java.lang.Math.\n - `*.Arrays.asList` - Methods named as 'asList' in the types named as 'Arrays'.\n - `*.println(*)` - Methods named as 'println'.\n - `(from, to)` - Methods with two parameters named as 'from' and 'to'.\n - `(arg*)` - Methods with one parameter whose name starts with 'arg'.",scope = "window",type = "array"},["java.jdt.ls.java.home"] = {default = vim.NIL,description = "Specifies the folder path to the JDK (17 or more recent) used to launch the Java Language Server. This setting will replace the Java extension's embedded JRE to start the Java Language Server. \n\nOn Windows, backslashes must be escaped, i.e.\n\"java.jdt.ls.java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk-17.0_3\"",scope = "machine-overridable",type = { "string", "null" }},["java.jdt.ls.lombokSupport.enabled"] = {default = true,description = "Whether to load lombok processors from project classpath",scope = "window",type = "boolean"},["java.jdt.ls.vmargs"] = {default = "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m",description = "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m ` to optimize memory usage with the parallel garbage collector",scope = "machine-overridable",type = { "string", "null" }},["java.maven.downloadSources"] = {default = false,description = "Enable/disable download of Maven source artifacts as part of importing Maven projects.",scope = "window",type = "boolean"},["java.maven.updateSnapshots"] = {default = false,description = "Force update of Snapshots/Releases.",scope = "window",type = "boolean"},["java.maxConcurrentBuilds"] = {default = 1,description = "Max simultaneous project builds",minimum = 1,scope = "window",type = "integer"},["java.progressReports.enabled"] = {default = true,description = "[Experimental] Enable/disable progress reports from background processes on the server.",scope = "window",type = "boolean"},["java.project.encoding"] = {default = "ignore",enum = { "ignore", "warning", "setDefault" },enumDescriptions = { "Ignore project encoding settings", "Show warning if a project has no explicit encoding set", "Set the default workspace encoding settings" },markdownDescription = "Project encoding settings",scope = "window"},["java.project.importHint"] = {default = true,description = "Enable/disable the server-mode switch information, when Java projects import is skipped on startup.",scope = "application",type = "boolean"},["java.project.importOnFirstTimeStartup"] = {default = "automatic",description = "Specifies whether to import the Java projects, when opening the folder in Hybrid mode for the first time.",enum = { "disabled", "interactive", "automatic" },scope = "application",type = "string"},["java.project.outputPath"] = {default = "",markdownDescription = "A relative path to the workspace where stores the compiled output. `Only` effective in the `WORKSPACE` scope. The setting will `NOT` affect Maven or Gradle project.",scope = "window",type = { "string", "null" }},["java.project.referencedLibraries"] = {additionalProperties = false,default = { "lib/**/*.jar" },description = "Configure glob patterns for referencing local libraries to a Java project.",properties = {exclude = {type = "array"},include = {type = "array"},sources = {type = "object"}},required = { "include" },scope = "window",type = { "array", "object" }},["java.project.resourceFilters"] = {default = { "node_modules", ".git" },description = "Excludes files and folders from being refreshed by the Java Language Server, which can improve the overall performance. For example, [\"node_modules\",\".git\"] will exclude all files and folders named 'node_modules' or '.git'. Defaults to [\"node_modules\",\".git\"].",scope = "window",type = "array"},["java.project.sourcePaths"] = {default = {},items = {type = "string"},markdownDescription = "Relative paths to the workspace where stores the source files. `Only` effective in the `WORKSPACE` scope. The setting will `NOT` affect Maven or Gradle project.",scope = "window",type = "array"},["java.quickfix.showAt"] = {default = "line",description = "Show quickfixes at the problem or line level.",enum = { "line", "problem" },scope = "window",type = "string"},["java.recommendations.dependency.analytics.show"] = {default = true,description = "Show the recommended Dependency Analytics extension.",scope = "window",type = "boolean"},["java.references.includeAccessors"] = {default = true,description = "Include getter, setter and builder/constructor when finding references.",scope = "window",type = "boolean"},["java.references.includeDecompiledSources"] = {default = true,description = "Include the decompiled sources when finding references.",scope = "window",type = "boolean"},["java.referencesCodeLens.enabled"] = {default = false,description = "Enable/disable the references code lens.",scope = "window",type = "boolean"},["java.saveActions.organizeImports"] = {default = false,description = "Enable/disable auto organize imports on save action",scope = "window",type = "boolean"},["java.selectionRange.enabled"] = {default = true,description = "Enable/disable Smart Selection support for Java. Disabling this option will not affect the VS Code built-in word-based and bracket-based smart selection.",scope = "window",type = "boolean"},["java.server.launchMode"] = {default = "Hybrid",description = "The launch mode for the Java extension",enum = { "Standard", "LightWeight", "Hybrid" },enumDescriptions = { "Provides full features such as intellisense, refactoring, building, Maven/Gradle support etc.", "Starts a syntax server with lower start-up cost. Only provides syntax features such as outline, navigation, javadoc, syntax errors.", "Provides full features with better responsiveness. It starts a standard language server and a secondary syntax server. The syntax server provides syntax features until the standard server is ready." },scope = "window",type = "string"},["java.settings.url"] = {default = vim.NIL,markdownDescription = "Specifies the url or file path to the workspace Java settings. See [Setting Global Preferences](https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences)",scope = "window",type = "string"},["java.showBuildStatusOnStart.enabled"] = {anyOf = { {enum = { "notification", "terminal", "off" },enumDescriptions = { "Show the build status via progress notification on start", "Show the build status via terminal on start", "Do not show any build status on start" }}, "boolean" },default = "notification",description = "Automatically show build status on startup.",scope = "window"},["java.signatureHelp.description.enabled"] = {default = false,description = "Enable/disable to show the description in signature help.",scope = "window",type = "boolean"},["java.signatureHelp.enabled"] = {default = false,description = "Enable/disable the signature help.",scope = "window",type = "boolean"},["java.sources.organizeImports.starThreshold"] = {default = 99,description = "Specifies the number of imports added before a star-import declaration is used.",minimum = 1,scope = "window",type = "integer"},["java.sources.organizeImports.staticStarThreshold"] = {default = 99,description = "Specifies the number of static imports added before a star-import declaration is used.",minimum = 1,scope = "window",type = "integer"},["java.symbols.includeSourceMethodDeclarations"] = {default = false,markdownDescription = "Include method declarations from source files in symbol search.",scope = "window",type = "boolean"},["java.templates.fileHeader"] = {default = {},markdownDescription = "Specifies the file header comment for new Java file. Supports configuring multi-line comments with an array of strings, and using ${variable} to reference the [predefined variables](command:_java.templateVariables).",scope = "window",type = "array"},["java.templates.typeComment"] = {default = {},markdownDescription = "Specifies the type comment for new Java type. Supports configuring multi-line comments with an array of strings, and using ${variable} to reference the [predefined variables](command:_java.templateVariables).",scope = "window",type = "array"},["java.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the Java language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["java.typeHierarchy.lazyLoad"] = {default = false,description = "Enable/disable lazy loading the content in type hierarchy. Lazy loading could save a lot of loading time but every type should be expanded manually to load its content.",scope = "window",type = "boolean"}},title = "Java",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/json-lsp.lua b/lua/mason-schemas/lsp/json-lsp.lua new file mode 100644 index 00000000..1bbd6b5d --- /dev/null +++ b/lua/mason-schemas/lsp/json-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {id = "json",order = 20,properties = {["json.colorDecorators.enable"] = {default = true,deprecationMessage = "%json.colorDecorators.enable.deprecationMessage%",description = "%json.colorDecorators.enable.desc%",scope = "window",type = "boolean"},["json.format.enable"] = {default = true,description = "%json.format.enable.desc%",scope = "window",type = "boolean"},["json.maxItemsComputed"] = {default = 5000,description = "%json.maxItemsComputed.desc%",type = "number"},["json.schemaDownload.enable"] = {default = true,description = "%json.enableSchemaDownload.desc%",tags = { "usesOnlineServices" },type = "boolean"},["json.schemas"] = {description = "%json.schemas.desc%",items = {default = {fileMatch = { "/myfile" },url = "schemaURL"},properties = {fileMatch = {description = "%json.schemas.fileMatch.desc%",items = {default = "MyFile.json",description = "%json.schemas.fileMatch.item.desc%",type = "string"},minItems = 1,type = "array"},schema = {["$ref"] = "http://json-schema.org/draft-07/schema#",description = "%json.schemas.schema.desc%"},url = {default = "/user.schema.json",description = "%json.schemas.url.desc%",type = "string"}},type = "object"},scope = "resource",type = "array"},["json.trace.server"] = {default = "off",description = "%json.tracing.desc%",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["json.validate.enable"] = {default = true,description = "%json.validate.enable.desc%",scope = "window",type = "boolean"}},title = "JSON",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/julia-lsp.lua b/lua/mason-schemas/lsp/julia-lsp.lua new file mode 100644 index 00000000..d4aad042 --- /dev/null +++ b/lua/mason-schemas/lsp/julia-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["julia.NumThreads"] = {default = vim.NIL,markdownDescription = "Number of threads to use for Julia processes. A value of `auto` works on Julia versions that allow for `--threads=auto`.",scope = "machine-overridable",type = { "integer", "string", "null" }},["julia.additionalArgs"] = {default = {},description = "Additional Julia arguments.",type = "array"},["julia.cellDelimiters"] = {default = { "^##(?!#)", "^#(\\s?)%%", "^#-" },description = "Cell delimiter regular expressions for Julia files.",type = "array"},["julia.completionmode"] = {default = "qualify",description = "Sets the mode for completions.",enum = { "exportedonly", "import", "qualify" },enumDescriptions = { "Show completions for the current namespace.", "Show completions for the current namespace and unexported variables of `using`ed modules. Selection of an unexported variable will result in the automatic insertion of an explicit `using` statement.", "Show completions for the current namespace and unexported variables of `using`ed modules. Selection of an unexported variable will complete to a qualified variable name." },scope = "window",type = "string"},["julia.debuggerDefaultCompiled"] = {default = { "Base.", "-Base.!", "-Base.all", "-Base.all!", "-Base.any", "-Base.any!", "-Base.cd", "-Base.iterate", "-Base.collect", "-Base.collect_similar", "-Base._collect", "-Base.collect_to!", "-Base.collect_to_with_first!", "-Base.filter", "-Base.filter!", "-Base.foreach", "-Base.findall", "-Base.findfirst", "-Base.findlast", "-Base.findnext", "-Base.findprev", "-Base.Generator", "-Base.map", "-Base.map!", "-Base.maximum!", "-Base.minimum!", "-Base.mktemp", "-Base.mktempdir", "-Base.open", "-Base.prod!", "-Base.redirect_stderr", "-Base.redirect_stdin", "-Base.redirect_stdout", "-Base.reenable_sigint", "-Base.setindex!", "-Base.setprecision", "-Base.setrounding", "-Base.show", "-Base.sprint", "-Base.sum", "-Base.sum!", "-Base.task_local_storage", "-Base.timedwait", "-Base.withenv", "-Base.Broadcast", "Core", "Core.Compiler.", "Core.IR", "Core.Intrinsics", "DelimitedFiles", "Distributed", "LinearAlgebra.", "Serialization", "Statistics", "-Statistics.mean", "SparseArrays", "Mmap" },description = "Functions or modules that are set to compiled mode when setting the defaults.",scope = "window",type = "array"},["julia.deleteJuliaCovFiles"] = {default = true,description = "Delete Julia .cov files when running tests with coverage, leaving only a .lcov file behind.",scope = "window",type = "boolean"},["julia.editor"] = {default = "code",markdownDescription = "Command to open files from the REPL (via setting the `JULIA_EDITOR` environment variable).",type = "string"},["julia.enableCrashReporter"] = {default = vim.NIL,description = "Enable crash reports to be sent to the julia VS Code extension developers.",scope = "window",type = { "boolean", "null" }},["julia.enableTelemetry"] = {default = vim.NIL,description = "Enable usage data and errors to be sent to the julia VS Code extension developers.",scope = "window",type = { "boolean", "null" }},["julia.environmentPath"] = {default = vim.NIL,description = "Path to a julia environment. VS Code needs to be reloaded for changes to take effect.",scope = "window",type = { "string", "null" }},["julia.executablePath"] = {default = "",description = "Points to the julia executable.",scope = "machine-overridable",type = "string"},["julia.execution.codeInREPL"] = {default = false,description = "Print executed code in REPL and append it to the REPL history.",scope = "window",type = "boolean"},["julia.execution.inlineResultsForCellEvaluation"] = {default = false,markdownDescription = "Show separate inline results for all code blocks in a cell",scope = "window",type = "boolean"},["julia.execution.resultType"] = {default = "both",description = "Specifies how to show inline execution results",enum = { "REPL", "inline", "inline, errors in REPL", "both" },enumDescriptions = { "Shows inline execution results in REPL", "Shows inline execution results as inline bubbles", "Shows inline execution results in REPL and inline bubbles" },type = "string"},["julia.execution.saveOnEval"] = {default = false,markdownDescription = "Save file before execution",scope = "window",type = "boolean"},["julia.focusPlotNavigator"] = {default = false,description = "Whether to automatically show the plot navigator when plotting.",type = "boolean"},["julia.lint.call"] = {default = true,description = "This compares call signatures against all known methods for the called function. Calls with too many or too few arguments, or unknown keyword parameters are highlighted.",type = "boolean"},["julia.lint.constif"] = {default = true,description = "Check for constant conditionals in if statements that result in branches never being reached..",type = "boolean"},["julia.lint.datadecl"] = {default = true,description = "Check variables used in type declarations are datatypes.",type = "boolean"},["julia.lint.disabledDirs"] = {default = { "docs", "test" },markdownDescription = "Specifies sub-directories in [a package directory](https://docs.julialang.org/en/v1/manual/code-loading/#Package-directories-1) where only basic linting is. This drastically lowers the chance for false positives.",type = "array"},["julia.lint.iter"] = {default = true,description = "Check iterator syntax of loops. Will identify, for example, attempts to iterate over single values.",type = "boolean"},["julia.lint.lazy"] = {default = true,description = "Check for deterministic lazy boolean operators.",type = "boolean"},["julia.lint.missingrefs"] = {default = "none",description = "Highlight unknown symbols. The `symbols` option will not mark unknown fields.",enum = { "none", "symbols", "all" },type = "string"},["julia.lint.modname"] = {default = true,description = "Check submodule names do not shadow their parent's name.",type = "boolean"},["julia.lint.nothingcomp"] = {default = true,description = "Check for use of `==` rather than `===` when comparing against `nothing`. ",type = "boolean"},["julia.lint.pirates"] = {default = true,description = "Check for type piracy - the overloading of external functions with methods specified for external datatypes. 'External' here refers to imported code.",type = "boolean"},["julia.lint.run"] = {default = true,description = "Run the linter on active files.",type = "boolean"},["julia.lint.typeparam"] = {default = true,description = "Check parameters declared in `where` statements or datatype declarations are used.",type = "boolean"},["julia.lint.useoffuncargs"] = {default = true,description = "Check that all declared arguments are used within the function body.",type = "boolean"},["julia.liveTestFile"] = {default = "test/runtests.jl",description = "A workspace relative path to a Julia file that contains the tests that should be run for live testing.",scope = "window",type = "string"},["julia.packageServer"] = {default = "",markdownDescription = "Julia package server. Set's the `JULIA_PKG_SERVER` environment variable *before* starting a Julia process. Leave this empty to use the systemwide default. Requires a restart of the Julia process.",scope = "machine-overridable",type = "string"},["julia.persistentSession.alwaysCopy"] = {default = false,description = "Always copy the command for connecting to an external REPL to the clipboard.",scope = "machine-overridable",type = "boolean"},["julia.persistentSession.enabled"] = {default = false,markdownDescription = "Experimental: Starts the interactive Julia session in a persistent `tmux` session. Note that `tmux` must be available in the shell defined below. If present the string `$[workspace]` will be replaced with the current file's workspace when the REPL is first opened.",scope = "machine-overridable",type = "boolean"},["julia.persistentSession.shell"] = {default = "/bin/sh",description = "Shell used to start the persistent session.",scope = "machine-overridable",type = "string"},["julia.persistentSession.shellExecutionArgument"] = {default = "-c",markdownDescription = "Argument to execute code in the configured shell, e.g. `-c` for sh-likes or `/c` for `cmd`.",scope = "machine-overridable",type = "string"},["julia.persistentSession.tmuxSessionName"] = {default = "julia_vscode",markdownDescription = "Name of the `tmux` session.",scope = "machine-overridable",type = "string"},["julia.persistentSession.warnOnKill"] = {default = true,description = "Warn when stopping a persistent session.",scope = "machine-overridable",type = "boolean"},["julia.plots.path"] = {description = "The output directory to save plots to",scope = "window",type = "string"},["julia.runtimeCompletions"] = {default = false,description = "Request runtime completions from the integrated REPL.",scope = "application",type = "boolean"},["julia.showRuntimeDiagnostics"] = {default = true,markdownDescription = "Enable display of runtime diagnostics. These diagnostics are provided by packages that overload a `show` method for the `application/vnd.julia-vscode.diagnostics` MIME type.",type = "boolean"},["julia.symbolCacheDownload"] = {default = vim.NIL,description = "Download symbol server cache files from GitHub.",scope = "application",type = { "boolean", "null" }},["julia.symbolserverUpstream"] = {default = "https://www.julia-vscode.org/symbolcache",description = "Symbol server cache download URL.",scope = "application",type = "string"},["julia.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["julia.useCustomSysimage"] = {default = false,description = "Use an existing custom sysimage when starting the REPL",scope = "application",type = "boolean"},["julia.usePlotPane"] = {default = true,description = "Display plots within VS Code. Might require a restart of the Julia process.",type = "boolean"},["julia.useProgressFrontend"] = {default = true,markdownDescription = "Display [progress bars](https://github.com/JunoLab/ProgressLogging.jl) within VS Code.",type = "boolean"},["julia.useRevise"] = {default = true,description = "Load Revise.jl on startup of the REPL.",type = "boolean"}},title = "Julia",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/kotlin-language-server.lua b/lua/mason-schemas/lsp/kotlin-language-server.lua new file mode 100644 index 00000000..85903a0c --- /dev/null +++ b/lua/mason-schemas/lsp/kotlin-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["kotlin.compiler.jvm.target"] = {default = "default",description = 'Specifies the JVM target, e.g. "1.6" or "1.8"',type = "string"},["kotlin.completion.snippets.enabled"] = {default = true,description = "Specifies whether code completion should provide snippets (true) or plain-text items (false).",type = "boolean"},["kotlin.debounceTime"] = {default = 250,deprecationMessage = "Use 'kotlin.linting.debounceTime' instead",description = "[DEPRECATED] Specifies the debounce time limit. Lower to increase responsiveness at the cost of possible stability issues.",type = "integer"},["kotlin.debugAdapter.enabled"] = {default = true,description = "[Recommended] Specifies whether the debug adapter should be used. When enabled a debugger for Kotlin will be available.",type = "boolean"},["kotlin.debugAdapter.path"] = {default = "",description = "Optionally a custom path to the debug adapter executable.",type = "string"},["kotlin.externalSources.autoConvertToKotlin"] = {default = false,description = "Specifies whether decompiled/external classes should be auto-converted to Kotlin.",type = "boolean"},["kotlin.externalSources.useKlsScheme"] = {default = true,description = "[Recommended] Specifies whether URIs inside JARs should be represented using the 'kls'-scheme.",type = "boolean"},["kotlin.indexing.enabled"] = {default = true,description = "Whether global symbols in the project should be indexed automatically in the background. This enables e.g. code completion for unimported classes and functions.",type = "boolean"},["kotlin.java.home"] = {default = "",description = "A custom JAVA_HOME for the language server and debug adapter to use.",type = "string"},["kotlin.languageServer.debugAttach.autoSuspend"] = {default = false,description = "[DEBUG] If enabled (together with debugAttach.enabled), the language server will not immediately launch but instead listen on the specified attach port and wait for a debugger. This is ONLY useful if you need to debug the language server ITSELF.",type = "boolean"},["kotlin.languageServer.debugAttach.enabled"] = {default = false,description = "[DEBUG] Whether the language server should listen for debuggers, i.e. be debuggable while running in VSCode. This is ONLY useful if you need to debug the language server ITSELF.",type = "boolean"},["kotlin.languageServer.debugAttach.port"] = {default = 5005,description = "[DEBUG] If transport is stdio this enables you to attach to the running language server with a debugger. This is ONLY useful if you need to debug the language server ITSELF.",type = "integer"},["kotlin.languageServer.enabled"] = {default = true,description = "[Recommended] Specifies whether the language server should be used. When enabled the extension will provide code completions and linting, otherwise just syntax highlighting. Might require a reload to apply.",type = "boolean"},["kotlin.languageServer.path"] = {default = "",description = "Optionally a custom path to the language server executable.",type = "string"},["kotlin.languageServer.port"] = {default = 0,description = "The port to which the client will attempt to connect to. A random port is used if zero. Only used if the transport layer is TCP.",type = "integer"},["kotlin.languageServer.transport"] = {default = "stdio",description = "The transport layer beneath the language server protocol. Note that the extension will launch the server even if a TCP socket is used.",enum = { "stdio", "tcp" },type = "string"},["kotlin.linting.debounceTime"] = {default = 250,description = "[DEBUG] Specifies the debounce time limit. Lower to increase responsiveness at the cost of possible stability issues.",type = "integer"},["kotlin.snippetsEnabled"] = {default = true,deprecationMessage = "Use 'kotlin.completion.snippets.enabled'",description = "[DEPRECATED] Specifies whether code completion should provide snippets (true) or plain-text items (false).",type = "boolean"},["kotlin.trace.server"] = {default = "off",description = "Traces the communication between VSCode and the Kotlin language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"}},title = "Kotlin"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/ltex-ls.lua b/lua/mason-schemas/lsp/ltex-ls.lua new file mode 100644 index 00000000..1e5fbdf4 --- /dev/null +++ b/lua/mason-schemas/lsp/ltex-ls.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["ltex.additionalRules.enablePickyRules"] = {default = false,markdownDescription = "%ltex.i18n.configuration.ltex.additionalRules.enablePickyRules.markdownDescription%",scope = "resource",type = "boolean"},["ltex.additionalRules.languageModel"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.additionalRules.languageModel.markdownDescription%",scope = "resource",type = "string"},["ltex.additionalRules.motherTongue"] = {default = "",enum = { "", "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },enumDescriptions = { "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.emptyString.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ar.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ast-ES.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.be-BY.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.br-FR.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ca-ES.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ca-ES-valencia.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.da-DK.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-AT.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-CH.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-DE.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-DE-x-simple-language.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.el-GR.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-AU.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-CA.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-GB.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-NZ.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-US.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-ZA.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.eo.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.es.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.es-AR.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.fa.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.fr.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ga-IE.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.gl-ES.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.it.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ja-JP.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.km-KH.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.nl.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.nl-BE.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pl-PL.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-AO.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-BR.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-MZ.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-PT.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ro-RO.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ru-RU.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sk-SK.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sl-SI.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sv.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ta-IN.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.tl-PH.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.uk-UA.enumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.zh-CN.enumDescription%" },markdownDescription = "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.markdownDescription%",markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.emptyString.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ar.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ast-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.be-BY.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.br-FR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ca-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ca-ES-valencia.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.da-DK.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-AT.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-CH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-DE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.de-DE-x-simple-language.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.el-GR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-AU.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-CA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-GB.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-NZ.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-US.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.en-ZA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.eo.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.es.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.es-AR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.fa.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.fr.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ga-IE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.gl-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.it.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ja-JP.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.km-KH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.nl.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.nl-BE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pl-PL.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-AO.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-BR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-MZ.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.pt-PT.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ro-RO.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ru-RU.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sk-SK.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sl-SI.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.sv.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.ta-IN.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.tl-PH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.uk-UA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.additionalRules.motherTongue.zh-CN.markdownEnumDescription%" },scope = "resource",type = "string"},["ltex.additionalRules.neuralNetworkModel"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.additionalRules.neuralNetworkModel.markdownDescription%",scope = "resource",type = "string"},["ltex.additionalRules.word2VecModel"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.additionalRules.word2VecModel.markdownDescription%",scope = "resource",type = "string"},["ltex.bibtex.fields"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {maintitle = false,seealso = true} },markdownDescription = "%ltex.i18n.configuration.ltex.bibtex.fields.markdownDescription%",patternProperties = {["^.*$"] = {type = "boolean"}},scope = "resource",type = "object"},["ltex.checkFrequency"] = {default = "edit",enum = { "edit", "save", "manual" },enumDescriptions = { "%ltex.i18n.configuration.ltex.checkFrequency.edit.enumDescription%", "%ltex.i18n.configuration.ltex.checkFrequency.save.enumDescription%", "%ltex.i18n.configuration.ltex.checkFrequency.manual.enumDescription%" },markdownDescription = "%ltex.i18n.configuration.ltex.checkFrequency.markdownDescription%",markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.checkFrequency.edit.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.checkFrequency.save.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.checkFrequency.manual.markdownEnumDescription%" },scope = "window",type = "string"},["ltex.clearDiagnosticsWhenClosingFile"] = {default = true,markdownDescription = "%ltex.i18n.configuration.ltex.clearDiagnosticsWhenClosingFile.markdownDescription%",scope = "resource",type = "boolean"},["ltex.completionEnabled"] = {default = false,markdownDescription = "%ltex.i18n.configuration.ltex.completionEnabled.markdownDescription%",scope = "resource",type = "boolean"},["ltex.configurationTarget"] = {additionalProperties = false,default = {dictionary = "workspaceFolderExternalFile",disabledRules = "workspaceFolderExternalFile",hiddenFalsePositives = "workspaceFolderExternalFile"},markdownDescription = "%ltex.i18n.configuration.ltex.configurationTarget.markdownDescription%",properties = {dictionary = {enum = { "user", "workspace", "workspaceFolder", "userExternalFile", "workspaceExternalFile", "workspaceFolderExternalFile" },enumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.user.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspace.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceFolder.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.userExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceFolderExternalFile.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.user.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspace.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceFolder.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.userExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.dictionary.workspaceFolderExternalFile.markdownEnumDescription%" },type = "string"},disabledRules = {enum = { "user", "workspace", "workspaceFolder", "userExternalFile", "workspaceExternalFile", "workspaceFolderExternalFile" },enumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.user.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspace.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceFolder.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.userExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceFolderExternalFile.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.user.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspace.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceFolder.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.userExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.disabledRules.workspaceFolderExternalFile.markdownEnumDescription%" },type = "string"},hiddenFalsePositives = {enum = { "user", "workspace", "workspaceFolder", "userExternalFile", "workspaceExternalFile", "workspaceFolderExternalFile" },enumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.user.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspace.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceFolder.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.userExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceExternalFile.enumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceFolderExternalFile.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.user.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspace.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceFolder.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.userExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceExternalFile.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.configurationTarget.hiddenFalsePositives.workspaceFolderExternalFile.markdownEnumDescription%" },type = "string"}},propertyNames = {enum = { "dictionary", "disabledRules", "hiddenFalsePositives" },type = "string"},scope = "resource",type = "object"},["ltex.diagnosticSeverity"] = {default = "information",examples = { "information", {PASSIVE_VOICE = "hint",default = "information"} },markdownDescription = "%ltex.i18n.configuration.ltex.diagnosticSeverity.markdownDescription%",oneOf = { {enum = { "error", "warning", "information", "hint" },enumDescriptions = { "%ltex.i18n.configuration.ltex.diagnosticSeverity.error.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.warning.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.information.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.hint.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.diagnosticSeverity.error.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.warning.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.information.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.hint.markdownEnumDescription%" },type = "string"}, {additionalProperties = false,patternProperties = {["^.*$"] = {enum = { "error", "warning", "information", "hint" },enumDescriptions = { "%ltex.i18n.configuration.ltex.diagnosticSeverity.error.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.warning.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.information.enumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.hint.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.diagnosticSeverity.error.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.warning.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.information.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.diagnosticSeverity.hint.markdownEnumDescription%" },type = "string"}},required = { "default" },type = "object"} },scope = "resource"},["ltex.dictionary"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {["de-DE"] = { "B-Splines", ":/path/to/externalFile.txt" },["en-US"] = { "adaptivity", "precomputed", "subproblem" }} },markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.markdownDescription%",properties = {ar = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ar.markdownDescription%",type = "array"},["ast-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ast-ES.markdownDescription%",type = "array"},["be-BY"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.be-BY.markdownDescription%",type = "array"},["br-FR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.br-FR.markdownDescription%",type = "array"},["ca-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ca-ES.markdownDescription%",type = "array"},["ca-ES-valencia"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ca-ES-valencia.markdownDescription%",type = "array"},["da-DK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.da-DK.markdownDescription%",type = "array"},de = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.de.markdownDescription%",type = "array"},["de-AT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.de-AT.markdownDescription%",type = "array"},["de-CH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.de-CH.markdownDescription%",type = "array"},["de-DE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.de-DE.markdownDescription%",type = "array"},["de-DE-x-simple-language"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.de-DE-x-simple-language.markdownDescription%",type = "array"},["el-GR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.el-GR.markdownDescription%",type = "array"},en = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en.markdownDescription%",type = "array"},["en-AU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-AU.markdownDescription%",type = "array"},["en-CA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-CA.markdownDescription%",type = "array"},["en-GB"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-GB.markdownDescription%",type = "array"},["en-NZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-NZ.markdownDescription%",type = "array"},["en-US"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-US.markdownDescription%",type = "array"},["en-ZA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.en-ZA.markdownDescription%",type = "array"},eo = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.eo.markdownDescription%",type = "array"},es = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.es.markdownDescription%",type = "array"},["es-AR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.es-AR.markdownDescription%",type = "array"},fa = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.fa.markdownDescription%",type = "array"},fr = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.fr.markdownDescription%",type = "array"},["ga-IE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ga-IE.markdownDescription%",type = "array"},["gl-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.gl-ES.markdownDescription%",type = "array"},it = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.it.markdownDescription%",type = "array"},["ja-JP"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ja-JP.markdownDescription%",type = "array"},["km-KH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.km-KH.markdownDescription%",type = "array"},nl = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.nl.markdownDescription%",type = "array"},["nl-BE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.nl-BE.markdownDescription%",type = "array"},["pl-PL"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pl-PL.markdownDescription%",type = "array"},pt = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pt.markdownDescription%",type = "array"},["pt-AO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pt-AO.markdownDescription%",type = "array"},["pt-BR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pt-BR.markdownDescription%",type = "array"},["pt-MZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pt-MZ.markdownDescription%",type = "array"},["pt-PT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.pt-PT.markdownDescription%",type = "array"},["ro-RO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ro-RO.markdownDescription%",type = "array"},["ru-RU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ru-RU.markdownDescription%",type = "array"},["sk-SK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.sk-SK.markdownDescription%",type = "array"},["sl-SI"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.sl-SI.markdownDescription%",type = "array"},sv = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.sv.markdownDescription%",type = "array"},["ta-IN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.ta-IN.markdownDescription%",type = "array"},["tl-PH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.tl-PH.markdownDescription%",type = "array"},["uk-UA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.uk-UA.markdownDescription%",type = "array"},["zh-CN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.dictionary.zh-CN.markdownDescription%",type = "array"}},propertyNames = {enum = { "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },type = "string"},scope = "resource",type = "object"},["ltex.disabledRules"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {["en-US"] = { "EN_QUOTES", "UPPERCASE_SENTENCE_START", ":/path/to/externalFile.txt" }} },markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.markdownDescription%",properties = {ar = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ar.markdownDescription%",type = "array"},["ast-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ast-ES.markdownDescription%",type = "array"},["be-BY"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.be-BY.markdownDescription%",type = "array"},["br-FR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.br-FR.markdownDescription%",type = "array"},["ca-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ca-ES.markdownDescription%",type = "array"},["ca-ES-valencia"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ca-ES-valencia.markdownDescription%",type = "array"},["da-DK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.da-DK.markdownDescription%",type = "array"},de = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.de.markdownDescription%",type = "array"},["de-AT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.de-AT.markdownDescription%",type = "array"},["de-CH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.de-CH.markdownDescription%",type = "array"},["de-DE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.de-DE.markdownDescription%",type = "array"},["de-DE-x-simple-language"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.de-DE-x-simple-language.markdownDescription%",type = "array"},["el-GR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.el-GR.markdownDescription%",type = "array"},en = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en.markdownDescription%",type = "array"},["en-AU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-AU.markdownDescription%",type = "array"},["en-CA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-CA.markdownDescription%",type = "array"},["en-GB"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-GB.markdownDescription%",type = "array"},["en-NZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-NZ.markdownDescription%",type = "array"},["en-US"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-US.markdownDescription%",type = "array"},["en-ZA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.en-ZA.markdownDescription%",type = "array"},eo = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.eo.markdownDescription%",type = "array"},es = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.es.markdownDescription%",type = "array"},["es-AR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.es-AR.markdownDescription%",type = "array"},fa = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.fa.markdownDescription%",type = "array"},fr = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.fr.markdownDescription%",type = "array"},["ga-IE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ga-IE.markdownDescription%",type = "array"},["gl-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.gl-ES.markdownDescription%",type = "array"},it = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.it.markdownDescription%",type = "array"},["ja-JP"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ja-JP.markdownDescription%",type = "array"},["km-KH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.km-KH.markdownDescription%",type = "array"},nl = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.nl.markdownDescription%",type = "array"},["nl-BE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.nl-BE.markdownDescription%",type = "array"},["pl-PL"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pl-PL.markdownDescription%",type = "array"},pt = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pt.markdownDescription%",type = "array"},["pt-AO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pt-AO.markdownDescription%",type = "array"},["pt-BR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pt-BR.markdownDescription%",type = "array"},["pt-MZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pt-MZ.markdownDescription%",type = "array"},["pt-PT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.pt-PT.markdownDescription%",type = "array"},["ro-RO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ro-RO.markdownDescription%",type = "array"},["ru-RU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ru-RU.markdownDescription%",type = "array"},["sk-SK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.sk-SK.markdownDescription%",type = "array"},["sl-SI"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.sl-SI.markdownDescription%",type = "array"},sv = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.sv.markdownDescription%",type = "array"},["ta-IN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.ta-IN.markdownDescription%",type = "array"},["tl-PH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.tl-PH.markdownDescription%",type = "array"},["uk-UA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.uk-UA.markdownDescription%",type = "array"},["zh-CN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.disabledRules.zh-CN.markdownDescription%",type = "array"}},propertyNames = {enum = { "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },type = "string"},scope = "resource",type = "object"},["ltex.enabled"] = {default = { "bibtex", "context", "context.tex", "html", "latex", "markdown", "org", "restructuredtext", "rsweave" },examples = { true, false, { "latex", "markdown" } },markdownDescription = "%ltex.i18n.configuration.ltex.enabled.markdownDescription%",oneOf = { {type = "boolean"}, {items = {type = "string"},type = "array"} },scope = "window"},["ltex.enabledRules"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {["en-GB"] = { "PASSIVE_VOICE", "OXFORD_SPELLING_NOUNS", ":/path/to/externalFile.txt" }} },markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.markdownDescription%",properties = {ar = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ar.markdownDescription%",type = "array"},["ast-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ast-ES.markdownDescription%",type = "array"},["be-BY"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.be-BY.markdownDescription%",type = "array"},["br-FR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.br-FR.markdownDescription%",type = "array"},["ca-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ca-ES.markdownDescription%",type = "array"},["ca-ES-valencia"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ca-ES-valencia.markdownDescription%",type = "array"},["da-DK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.da-DK.markdownDescription%",type = "array"},de = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.de.markdownDescription%",type = "array"},["de-AT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.de-AT.markdownDescription%",type = "array"},["de-CH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.de-CH.markdownDescription%",type = "array"},["de-DE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.de-DE.markdownDescription%",type = "array"},["de-DE-x-simple-language"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.de-DE-x-simple-language.markdownDescription%",type = "array"},["el-GR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.el-GR.markdownDescription%",type = "array"},en = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en.markdownDescription%",type = "array"},["en-AU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-AU.markdownDescription%",type = "array"},["en-CA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-CA.markdownDescription%",type = "array"},["en-GB"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-GB.markdownDescription%",type = "array"},["en-NZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-NZ.markdownDescription%",type = "array"},["en-US"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-US.markdownDescription%",type = "array"},["en-ZA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.en-ZA.markdownDescription%",type = "array"},eo = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.eo.markdownDescription%",type = "array"},es = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.es.markdownDescription%",type = "array"},["es-AR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.es-AR.markdownDescription%",type = "array"},fa = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.fa.markdownDescription%",type = "array"},fr = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.fr.markdownDescription%",type = "array"},["ga-IE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ga-IE.markdownDescription%",type = "array"},["gl-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.gl-ES.markdownDescription%",type = "array"},it = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.it.markdownDescription%",type = "array"},["ja-JP"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ja-JP.markdownDescription%",type = "array"},["km-KH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.km-KH.markdownDescription%",type = "array"},nl = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.nl.markdownDescription%",type = "array"},["nl-BE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.nl-BE.markdownDescription%",type = "array"},["pl-PL"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pl-PL.markdownDescription%",type = "array"},pt = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pt.markdownDescription%",type = "array"},["pt-AO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pt-AO.markdownDescription%",type = "array"},["pt-BR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pt-BR.markdownDescription%",type = "array"},["pt-MZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pt-MZ.markdownDescription%",type = "array"},["pt-PT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.pt-PT.markdownDescription%",type = "array"},["ro-RO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ro-RO.markdownDescription%",type = "array"},["ru-RU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ru-RU.markdownDescription%",type = "array"},["sk-SK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.sk-SK.markdownDescription%",type = "array"},["sl-SI"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.sl-SI.markdownDescription%",type = "array"},sv = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.sv.markdownDescription%",type = "array"},["ta-IN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.ta-IN.markdownDescription%",type = "array"},["tl-PH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.tl-PH.markdownDescription%",type = "array"},["uk-UA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.uk-UA.markdownDescription%",type = "array"},["zh-CN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.enabledRules.zh-CN.markdownDescription%",type = "array"}},propertyNames = {enum = { "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },type = "string"},scope = "application",type = "object"},["ltex.hiddenFalsePositives"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {["en-US"] = { ":/path/to/externalFile.txt" }} },markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.markdownDescription%",properties = {ar = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ar.markdownDescription%",type = "array"},["ast-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ast-ES.markdownDescription%",type = "array"},["be-BY"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.be-BY.markdownDescription%",type = "array"},["br-FR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.br-FR.markdownDescription%",type = "array"},["ca-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ca-ES.markdownDescription%",type = "array"},["ca-ES-valencia"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ca-ES-valencia.markdownDescription%",type = "array"},["da-DK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.da-DK.markdownDescription%",type = "array"},de = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.de.markdownDescription%",type = "array"},["de-AT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.de-AT.markdownDescription%",type = "array"},["de-CH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.de-CH.markdownDescription%",type = "array"},["de-DE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.de-DE.markdownDescription%",type = "array"},["de-DE-x-simple-language"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.de-DE-x-simple-language.markdownDescription%",type = "array"},["el-GR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.el-GR.markdownDescription%",type = "array"},en = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en.markdownDescription%",type = "array"},["en-AU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-AU.markdownDescription%",type = "array"},["en-CA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-CA.markdownDescription%",type = "array"},["en-GB"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-GB.markdownDescription%",type = "array"},["en-NZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-NZ.markdownDescription%",type = "array"},["en-US"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-US.markdownDescription%",type = "array"},["en-ZA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.en-ZA.markdownDescription%",type = "array"},eo = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.eo.markdownDescription%",type = "array"},es = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.es.markdownDescription%",type = "array"},["es-AR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.es-AR.markdownDescription%",type = "array"},fa = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.fa.markdownDescription%",type = "array"},fr = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.fr.markdownDescription%",type = "array"},["ga-IE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ga-IE.markdownDescription%",type = "array"},["gl-ES"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.gl-ES.markdownDescription%",type = "array"},it = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.it.markdownDescription%",type = "array"},["ja-JP"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ja-JP.markdownDescription%",type = "array"},["km-KH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.km-KH.markdownDescription%",type = "array"},nl = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.nl.markdownDescription%",type = "array"},["nl-BE"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.nl-BE.markdownDescription%",type = "array"},["pl-PL"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pl-PL.markdownDescription%",type = "array"},pt = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pt.markdownDescription%",type = "array"},["pt-AO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pt-AO.markdownDescription%",type = "array"},["pt-BR"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pt-BR.markdownDescription%",type = "array"},["pt-MZ"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pt-MZ.markdownDescription%",type = "array"},["pt-PT"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.pt-PT.markdownDescription%",type = "array"},["ro-RO"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ro-RO.markdownDescription%",type = "array"},["ru-RU"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ru-RU.markdownDescription%",type = "array"},["sk-SK"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.sk-SK.markdownDescription%",type = "array"},["sl-SI"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.sl-SI.markdownDescription%",type = "array"},sv = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.sv.markdownDescription%",type = "array"},["ta-IN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.ta-IN.markdownDescription%",type = "array"},["tl-PH"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.tl-PH.markdownDescription%",type = "array"},["uk-UA"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.uk-UA.markdownDescription%",type = "array"},["zh-CN"] = {items = {type = "string"},markdownDescription = "%ltex.i18n.configuration.ltex.hiddenFalsePositives.zh-CN.markdownDescription%",type = "array"}},propertyNames = {enum = { "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },type = "string"},scope = "resource",type = "object"},["ltex.java.initialHeapSize"] = {default = 64,markdownDescription = "%ltex.i18n.configuration.ltex.java.initialHeapSize.markdownDescription%",scope = "window",type = "integer"},["ltex.java.maximumHeapSize"] = {default = 512,markdownDescription = "%ltex.i18n.configuration.ltex.java.maximumHeapSize.markdownDescription%",scope = "window",type = "integer"},["ltex.java.path"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.java.path.markdownDescription%",scope = "window",type = "string"},["ltex.language"] = {default = "en-US",enum = { "auto", "ar", "ast-ES", "be-BY", "br-FR", "ca-ES", "ca-ES-valencia", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-DE-x-simple-language", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "en-ZA", "eo", "es", "es-AR", "fa", "fr", "ga-IE", "gl-ES", "it", "ja-JP", "km-KH", "nl", "nl-BE", "pl-PL", "pt", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv", "ta-IN", "tl-PH", "uk-UA", "zh-CN" },enumDescriptions = { "%ltex.i18n.configuration.ltex.language.auto.enumDescription%", "%ltex.i18n.configuration.ltex.language.ar.enumDescription%", "%ltex.i18n.configuration.ltex.language.ast-ES.enumDescription%", "%ltex.i18n.configuration.ltex.language.be-BY.enumDescription%", "%ltex.i18n.configuration.ltex.language.br-FR.enumDescription%", "%ltex.i18n.configuration.ltex.language.ca-ES.enumDescription%", "%ltex.i18n.configuration.ltex.language.ca-ES-valencia.enumDescription%", "%ltex.i18n.configuration.ltex.language.da-DK.enumDescription%", "%ltex.i18n.configuration.ltex.language.de.enumDescription%", "%ltex.i18n.configuration.ltex.language.de-AT.enumDescription%", "%ltex.i18n.configuration.ltex.language.de-CH.enumDescription%", "%ltex.i18n.configuration.ltex.language.de-DE.enumDescription%", "%ltex.i18n.configuration.ltex.language.de-DE-x-simple-language.enumDescription%", "%ltex.i18n.configuration.ltex.language.el-GR.enumDescription%", "%ltex.i18n.configuration.ltex.language.en.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-AU.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-CA.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-GB.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-NZ.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-US.enumDescription%", "%ltex.i18n.configuration.ltex.language.en-ZA.enumDescription%", "%ltex.i18n.configuration.ltex.language.eo.enumDescription%", "%ltex.i18n.configuration.ltex.language.es.enumDescription%", "%ltex.i18n.configuration.ltex.language.es-AR.enumDescription%", "%ltex.i18n.configuration.ltex.language.fa.enumDescription%", "%ltex.i18n.configuration.ltex.language.fr.enumDescription%", "%ltex.i18n.configuration.ltex.language.ga-IE.enumDescription%", "%ltex.i18n.configuration.ltex.language.gl-ES.enumDescription%", "%ltex.i18n.configuration.ltex.language.it.enumDescription%", "%ltex.i18n.configuration.ltex.language.ja-JP.enumDescription%", "%ltex.i18n.configuration.ltex.language.km-KH.enumDescription%", "%ltex.i18n.configuration.ltex.language.nl.enumDescription%", "%ltex.i18n.configuration.ltex.language.nl-BE.enumDescription%", "%ltex.i18n.configuration.ltex.language.pl-PL.enumDescription%", "%ltex.i18n.configuration.ltex.language.pt.enumDescription%", "%ltex.i18n.configuration.ltex.language.pt-AO.enumDescription%", "%ltex.i18n.configuration.ltex.language.pt-BR.enumDescription%", "%ltex.i18n.configuration.ltex.language.pt-MZ.enumDescription%", "%ltex.i18n.configuration.ltex.language.pt-PT.enumDescription%", "%ltex.i18n.configuration.ltex.language.ro-RO.enumDescription%", "%ltex.i18n.configuration.ltex.language.ru-RU.enumDescription%", "%ltex.i18n.configuration.ltex.language.sk-SK.enumDescription%", "%ltex.i18n.configuration.ltex.language.sl-SI.enumDescription%", "%ltex.i18n.configuration.ltex.language.sv.enumDescription%", "%ltex.i18n.configuration.ltex.language.ta-IN.enumDescription%", "%ltex.i18n.configuration.ltex.language.tl-PH.enumDescription%", "%ltex.i18n.configuration.ltex.language.uk-UA.enumDescription%", "%ltex.i18n.configuration.ltex.language.zh-CN.enumDescription%" },markdownDescription = "%ltex.i18n.configuration.ltex.language.markdownDescription%",markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.language.auto.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ar.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ast-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.be-BY.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.br-FR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ca-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ca-ES-valencia.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.da-DK.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.de.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.de-AT.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.de-CH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.de-DE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.de-DE-x-simple-language.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.el-GR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-AU.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-CA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-GB.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-NZ.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-US.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.en-ZA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.eo.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.es.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.es-AR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.fa.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.fr.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ga-IE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.gl-ES.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.it.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ja-JP.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.km-KH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.nl.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.nl-BE.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pl-PL.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pt.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pt-AO.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pt-BR.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pt-MZ.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.pt-PT.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ro-RO.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ru-RU.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.sk-SK.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.sl-SI.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.sv.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.ta-IN.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.tl-PH.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.uk-UA.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.language.zh-CN.markdownEnumDescription%" },scope = "resource",type = "string"},["ltex.languageToolHttpServerUri"] = {default = "",examples = { "http://localhost:8081/" },markdownDescription = "%ltex.i18n.configuration.ltex.languageToolHttpServerUri.markdownDescription%",scope = "window",type = "string"},["ltex.languageToolOrg.apiKey"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.languageToolOrg.apiKey.markdownDescription%",scope = "window",type = "string"},["ltex.languageToolOrg.username"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.languageToolOrg.username.markdownDescription%",scope = "window",type = "string"},["ltex.latex.commands"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {["\\cite[]{}"] = "dummy",["\\cite{}"] = "dummy",["\\documentclass[]{}"] = "ignore",["\\label{}"] = "ignore"} },markdownDescription = "%ltex.i18n.configuration.ltex.latex.commands.markdownDescription%",patternProperties = {["^.*$"] = {enum = { "default", "ignore", "dummy", "pluralDummy", "vowelDummy" },enumDescriptions = { "%ltex.i18n.configuration.ltex.latex.commands.default.enumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.ignore.enumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.dummy.enumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.pluralDummy.enumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.vowelDummy.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.latex.commands.default.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.ignore.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.dummy.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.pluralDummy.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.latex.commands.vowelDummy.markdownEnumDescription%" },type = "string"}},scope = "resource",type = "object"},["ltex.latex.environments"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {lstlisting = "ignore",verbatim = "ignore"} },markdownDescription = "%ltex.i18n.configuration.ltex.latex.environments.markdownDescription%",patternProperties = {["^.*$"] = {enum = { "default", "ignore" },enumDescriptions = { "%ltex.i18n.configuration.ltex.latex.environments.default.enumDescription%", "%ltex.i18n.configuration.ltex.latex.environments.ignore.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.latex.environments.default.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.latex.environments.ignore.markdownEnumDescription%" },type = "string"}},scope = "resource",type = "object"},["ltex.ltex-ls.languageToolHttpServerUri"] = {default = "",deprecationMessage = "Deprecated: This setting has been renamed to 'ltex.languageToolHttpServerUri', see https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolhttpserveruri.",markdownDeprecationMessage = "**Deprecated:** This setting has been renamed to [`ltex.languageToolHttpServerUri`](https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolhttpserveruri).",scope = "window",type = "string"},["ltex.ltex-ls.languageToolOrgApiKey"] = {default = "",deprecationMessage = "Deprecated: This setting has been renamed to 'ltex.languageToolOrg.apiKey', see https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolorgapikey.",markdownDeprecationMessage = "**Deprecated:** This setting has been renamed to [`ltex.languageToolOrg.apiKey`](https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolorgapikey).",scope = "window",type = "string"},["ltex.ltex-ls.languageToolOrgUsername"] = {default = "",deprecationMessage = "Deprecated: This setting has been renamed to 'ltex.languageToolOrg.username', see https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolorgusername.",markdownDeprecationMessage = "**Deprecated:** This setting has been renamed to [`ltex.languageToolOrg.username`](https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlanguagetoolorgusername).",scope = "window",type = "string"},["ltex.ltex-ls.logLevel"] = {default = "fine",enum = { "severe", "warning", "info", "config", "fine", "finer", "finest" },enumDescriptions = { "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.severe.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.warning.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.info.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.config.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.fine.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.finer.enumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.finest.enumDescription%" },markdownDescription = "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.markdownDescription%",markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.severe.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.warning.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.info.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.config.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.fine.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.finer.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.ltex-ls.logLevel.finest.markdownEnumDescription%" },scope = "window",type = "string"},["ltex.ltex-ls.path"] = {default = "",markdownDescription = "%ltex.i18n.configuration.ltex.ltex-ls.path.markdownDescription%",scope = "window",type = "string"},["ltex.markdown.nodes"] = {additionalProperties = false,default = vim.empty_dict(),examples = { {AutoLink = "dummy",Code = "dummy",CodeBlock = "ignore",FencedCodeBlock = "ignore"} },markdownDescription = "%ltex.i18n.configuration.ltex.markdown.nodes.markdownDescription%",patternProperties = {["^.*$"] = {enum = { "default", "ignore", "dummy", "pluralDummy", "vowelDummy" },enumDescriptions = { "%ltex.i18n.configuration.ltex.markdown.nodes.default.enumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.ignore.enumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.dummy.enumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.pluralDummy.enumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.vowelDummy.enumDescription%" },markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.markdown.nodes.default.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.ignore.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.dummy.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.pluralDummy.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.markdown.nodes.vowelDummy.markdownEnumDescription%" },type = "string"}},scope = "resource",type = "object"},["ltex.sentenceCacheSize"] = {default = 2000,markdownDescription = "%ltex.i18n.configuration.ltex.sentenceCacheSize.markdownDescription%",scope = "resource",type = "integer"},["ltex.statusBarItem"] = {default = false,markdownDescription = "%ltex.i18n.configuration.ltex.statusBarItem.markdownDescription%",scope = "window",type = "boolean"},["ltex.trace.server"] = {default = "off",enum = { "off", "messages", "verbose" },enumDescriptions = { "%ltex.i18n.configuration.ltex.trace.server.off.enumDescription%", "%ltex.i18n.configuration.ltex.trace.server.messages.enumDescription%", "%ltex.i18n.configuration.ltex.trace.server.verbose.enumDescription%" },markdownDescription = "%ltex.i18n.configuration.ltex.trace.server.markdownDescription%",markdownEnumDescriptions = { "%ltex.i18n.configuration.ltex.trace.server.off.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.trace.server.messages.markdownEnumDescription%", "%ltex.i18n.configuration.ltex.trace.server.verbose.markdownEnumDescription%" },scope = "window",type = "string"}},title = "LTeX"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/lua-language-server.lua b/lua/mason-schemas/lsp/lua-language-server.lua new file mode 100644 index 00000000..8756a800 --- /dev/null +++ b/lua/mason-schemas/lsp/lua-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["Lua.completion.autoRequire"] = {default = true,markdownDescription = "%config.completion.autoRequire%",scope = "resource",type = "boolean"},["Lua.completion.callSnippet"] = {default = "Disable",enum = { "Disable", "Both", "Replace" },markdownDescription = "%config.completion.callSnippet%",markdownEnumDescriptions = { "%config.completion.callSnippet.Disable%", "%config.completion.callSnippet.Both%", "%config.completion.callSnippet.Replace%" },scope = "resource",type = "string"},["Lua.completion.displayContext"] = {default = 0,markdownDescription = "%config.completion.displayContext%",scope = "resource",type = "integer"},["Lua.completion.enable"] = {default = true,markdownDescription = "%config.completion.enable%",scope = "resource",type = "boolean"},["Lua.completion.keywordSnippet"] = {default = "Replace",enum = { "Disable", "Both", "Replace" },markdownDescription = "%config.completion.keywordSnippet%",markdownEnumDescriptions = { "%config.completion.keywordSnippet.Disable%", "%config.completion.keywordSnippet.Both%", "%config.completion.keywordSnippet.Replace%" },scope = "resource",type = "string"},["Lua.completion.postfix"] = {default = "@",markdownDescription = "%config.completion.postfix%",scope = "resource",type = "string"},["Lua.completion.requireSeparator"] = {default = ".",markdownDescription = "%config.completion.requireSeparator%",scope = "resource",type = "string"},["Lua.completion.showParams"] = {default = true,markdownDescription = "%config.completion.showParams%",scope = "resource",type = "boolean"},["Lua.completion.showWord"] = {default = "Fallback",enum = { "Enable", "Fallback", "Disable" },markdownDescription = "%config.completion.showWord%",markdownEnumDescriptions = { "%config.completion.showWord.Enable%", "%config.completion.showWord.Fallback%", "%config.completion.showWord.Disable%" },scope = "resource",type = "string"},["Lua.completion.workspaceWord"] = {default = true,markdownDescription = "%config.completion.workspaceWord%",scope = "resource",type = "boolean"},["Lua.diagnostics.disable"] = {default = {},items = {enum = { "not-yieldable", "redundant-parameter", "break-outside", "undefined-doc-class", "unknown-symbol", "miss-method", "err-nonstandard-symbol", "unknown-attribute", "unexpect-efunc-name", "different-requires", "miss-end", "await-in-sync", "args-after-dots", "err-eq-as-assign", "newfield-call", "err-assign-as-eq", "undefined-doc-param", "param-type-mismatch", "global-in-nil-env", "missing-parameter", "miss-sep-in-table", "unknown-cast-variable", "miss-loop-min", "malformed-number", "err-do-as-then", "spell-check", "undefined-env-child", "missing-return-value", "discard-returns", "redundant-return", "miss-esc-x", "redundant-value", "duplicate-doc-alias", "doc-field-no-class", "no-visible-label", "miss-exp", "miss-loop-max", "miss-name", "empty-block", "unused-local", "err-then-as-do", "duplicate-doc-field", "redefined-label", "exp-in-action", "set-const", "circle-doc-class", "unexpect-lfunc-name", "unsupport-symbol", "unused-label", "action-after-return", "unexpect-dots", "newline-call", "jump-local-scope", "close-non-object", "miss-field", "count-down-loop", "cast-type-mismatch", "duplicate-index", "unexpect-symbol", "block-after-else", "unicode-name", "miss-exponent", "err-esc", "redundant-return-value", "unbalanced-assignments", "err-c-long-comment", "undefined-doc-name", "ambiguity-1", "trailing-space", "deprecated", "codestyle-check", "missing-return", "undefined-global", "unused-function", "code-after-break", "assign-type-mismatch", "local-limit", "cast-local-type", "need-check-nil", "keyword", "unknown-diag-code", "unused-vararg", "err-comment-prefix", "lowercase-global", "return-type-mismatch", "duplicate-set-field", "redefined-local", "no-unknown", "duplicate-doc-param", "index-in-func-name", "miss-symbol", "undefined-field", "miss-space-between" },type = "string"},markdownDescription = "%config.diagnostics.disable%",scope = "resource",type = "array"},["Lua.diagnostics.disableScheme"] = {default = { "git" },items = {type = "string"},markdownDescription = "%config.diagnostics.disableScheme%",scope = "resource",type = "array"},["Lua.diagnostics.enable"] = {default = true,markdownDescription = "%config.diagnostics.enable%",scope = "resource",type = "boolean"},["Lua.diagnostics.globals"] = {default = {},items = {type = "string"},markdownDescription = "%config.diagnostics.globals%",scope = "resource",type = "array"},["Lua.diagnostics.groupFileStatus"] = {additionalProperties = false,markdownDescription = "%config.diagnostics.groupFileStatus%",properties = {ambiguity = {default = "Fallback",description = "%config.diagnostics.ambiguity%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},await = {default = "Fallback",description = "%config.diagnostics.await%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},codestyle = {default = "Fallback",description = "%config.diagnostics.codestyle%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},duplicate = {default = "Fallback",description = "%config.diagnostics.duplicate%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},global = {default = "Fallback",description = "%config.diagnostics.global%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},luadoc = {default = "Fallback",description = "%config.diagnostics.luadoc%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},redefined = {default = "Fallback",description = "%config.diagnostics.redefined%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},strict = {default = "Fallback",description = "%config.diagnostics.strict%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},strong = {default = "Fallback",description = "%config.diagnostics.strong%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},["type-check"] = {default = "Fallback",description = "%config.diagnostics.type-check%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},unbalanced = {default = "Fallback",description = "%config.diagnostics.unbalanced%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"},unused = {default = "Fallback",description = "%config.diagnostics.unused%",enum = { "Any", "Opened", "None", "Fallback" },type = "string"}},scope = "resource",title = "groupFileStatus",type = "object"},["Lua.diagnostics.groupSeverity"] = {additionalProperties = false,markdownDescription = "%config.diagnostics.groupSeverity%",properties = {ambiguity = {default = "Fallback",description = "%config.diagnostics.ambiguity%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},await = {default = "Fallback",description = "%config.diagnostics.await%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},codestyle = {default = "Fallback",description = "%config.diagnostics.codestyle%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},duplicate = {default = "Fallback",description = "%config.diagnostics.duplicate%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},global = {default = "Fallback",description = "%config.diagnostics.global%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},luadoc = {default = "Fallback",description = "%config.diagnostics.luadoc%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},redefined = {default = "Fallback",description = "%config.diagnostics.redefined%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},strict = {default = "Fallback",description = "%config.diagnostics.strict%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},strong = {default = "Fallback",description = "%config.diagnostics.strong%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},["type-check"] = {default = "Fallback",description = "%config.diagnostics.type-check%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},unbalanced = {default = "Fallback",description = "%config.diagnostics.unbalanced%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"},unused = {default = "Fallback",description = "%config.diagnostics.unused%",enum = { "Error", "Warning", "Information", "Hint", "Fallback" },type = "string"}},scope = "resource",title = "groupSeverity",type = "object"},["Lua.diagnostics.ignoredFiles"] = {default = "Opened",enum = { "Enable", "Opened", "Disable" },markdownDescription = "%config.diagnostics.ignoredFiles%",markdownEnumDescriptions = { "%config.diagnostics.ignoredFiles.Enable%", "%config.diagnostics.ignoredFiles.Opened%", "%config.diagnostics.ignoredFiles.Disable%" },scope = "resource",type = "string"},["Lua.diagnostics.libraryFiles"] = {default = "Opened",enum = { "Enable", "Opened", "Disable" },markdownDescription = "%config.diagnostics.libraryFiles%",markdownEnumDescriptions = { "%config.diagnostics.libraryFiles.Enable%", "%config.diagnostics.libraryFiles.Opened%", "%config.diagnostics.libraryFiles.Disable%" },scope = "resource",type = "string"},["Lua.diagnostics.neededFileStatus"] = {additionalProperties = false,markdownDescription = "%config.diagnostics.neededFileStatus%",properties = {["ambiguity-1"] = {default = "Any",description = "%config.diagnostics.ambiguity-1%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["assign-type-mismatch"] = {default = "Opened",description = "%config.diagnostics.assign-type-mismatch%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["await-in-sync"] = {default = "None",description = "%config.diagnostics.await-in-sync%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["cast-local-type"] = {default = "Opened",description = "%config.diagnostics.cast-local-type%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["cast-type-mismatch"] = {default = "Any",description = "%config.diagnostics.cast-type-mismatch%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["circle-doc-class"] = {default = "Any",description = "%config.diagnostics.circle-doc-class%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["close-non-object"] = {default = "Any",description = "%config.diagnostics.close-non-object%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["code-after-break"] = {default = "Opened",description = "%config.diagnostics.code-after-break%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["codestyle-check"] = {default = "None",description = "%config.diagnostics.codestyle-check%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["count-down-loop"] = {default = "Any",description = "%config.diagnostics.count-down-loop%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},deprecated = {default = "Any",description = "%config.diagnostics.deprecated%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["different-requires"] = {default = "Any",description = "%config.diagnostics.different-requires%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["discard-returns"] = {default = "Any",description = "%config.diagnostics.discard-returns%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["doc-field-no-class"] = {default = "Any",description = "%config.diagnostics.doc-field-no-class%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["duplicate-doc-alias"] = {default = "Any",description = "%config.diagnostics.duplicate-doc-alias%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["duplicate-doc-field"] = {default = "Any",description = "%config.diagnostics.duplicate-doc-field%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["duplicate-doc-param"] = {default = "Any",description = "%config.diagnostics.duplicate-doc-param%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["duplicate-index"] = {default = "Any",description = "%config.diagnostics.duplicate-index%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["duplicate-set-field"] = {default = "Any",description = "%config.diagnostics.duplicate-set-field%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["empty-block"] = {default = "Opened",description = "%config.diagnostics.empty-block%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["global-in-nil-env"] = {default = "Any",description = "%config.diagnostics.global-in-nil-env%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["lowercase-global"] = {default = "Any",description = "%config.diagnostics.lowercase-global%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["missing-parameter"] = {default = "Any",description = "%config.diagnostics.missing-parameter%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["missing-return"] = {default = "Any",description = "%config.diagnostics.missing-return%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["missing-return-value"] = {default = "Any",description = "%config.diagnostics.missing-return-value%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["need-check-nil"] = {default = "Opened",description = "%config.diagnostics.need-check-nil%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["newfield-call"] = {default = "Any",description = "%config.diagnostics.newfield-call%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["newline-call"] = {default = "Any",description = "%config.diagnostics.newline-call%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["no-unknown"] = {default = "None",description = "%config.diagnostics.no-unknown%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["not-yieldable"] = {default = "None",description = "%config.diagnostics.not-yieldable%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["param-type-mismatch"] = {default = "Opened",description = "%config.diagnostics.param-type-mismatch%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["redefined-local"] = {default = "Opened",description = "%config.diagnostics.redefined-local%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["redundant-parameter"] = {default = "Any",description = "%config.diagnostics.redundant-parameter%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["redundant-return"] = {default = "Opened",description = "%config.diagnostics.redundant-return%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["redundant-return-value"] = {default = "Any",description = "%config.diagnostics.redundant-return-value%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["redundant-value"] = {default = "Any",description = "%config.diagnostics.redundant-value%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["return-type-mismatch"] = {default = "Opened",description = "%config.diagnostics.return-type-mismatch%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["spell-check"] = {default = "None",description = "%config.diagnostics.spell-check%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["trailing-space"] = {default = "Opened",description = "%config.diagnostics.trailing-space%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unbalanced-assignments"] = {default = "Any",description = "%config.diagnostics.unbalanced-assignments%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-doc-class"] = {default = "Any",description = "%config.diagnostics.undefined-doc-class%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-doc-name"] = {default = "Any",description = "%config.diagnostics.undefined-doc-name%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-doc-param"] = {default = "Any",description = "%config.diagnostics.undefined-doc-param%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-env-child"] = {default = "Any",description = "%config.diagnostics.undefined-env-child%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-field"] = {default = "Opened",description = "%config.diagnostics.undefined-field%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["undefined-global"] = {default = "Any",description = "%config.diagnostics.undefined-global%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unknown-cast-variable"] = {default = "Any",description = "%config.diagnostics.unknown-cast-variable%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unknown-diag-code"] = {default = "Any",description = "%config.diagnostics.unknown-diag-code%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unused-function"] = {default = "Opened",description = "%config.diagnostics.unused-function%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unused-label"] = {default = "Opened",description = "%config.diagnostics.unused-label%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unused-local"] = {default = "Opened",description = "%config.diagnostics.unused-local%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"},["unused-vararg"] = {default = "Opened",description = "%config.diagnostics.unused-vararg%",enum = { "Any", "Opened", "None", "Any!", "Opened!", "None!" },type = "string"}},scope = "resource",title = "neededFileStatus",type = "object"},["Lua.diagnostics.severity"] = {additionalProperties = false,markdownDescription = "%config.diagnostics.severity%",properties = {["ambiguity-1"] = {default = "Warning",description = "%config.diagnostics.ambiguity-1%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["assign-type-mismatch"] = {default = "Warning",description = "%config.diagnostics.assign-type-mismatch%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["await-in-sync"] = {default = "Warning",description = "%config.diagnostics.await-in-sync%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["cast-local-type"] = {default = "Warning",description = "%config.diagnostics.cast-local-type%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["cast-type-mismatch"] = {default = "Warning",description = "%config.diagnostics.cast-type-mismatch%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["circle-doc-class"] = {default = "Warning",description = "%config.diagnostics.circle-doc-class%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["close-non-object"] = {default = "Warning",description = "%config.diagnostics.close-non-object%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["code-after-break"] = {default = "Hint",description = "%config.diagnostics.code-after-break%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["codestyle-check"] = {default = "Warning",description = "%config.diagnostics.codestyle-check%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["count-down-loop"] = {default = "Warning",description = "%config.diagnostics.count-down-loop%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},deprecated = {default = "Warning",description = "%config.diagnostics.deprecated%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["different-requires"] = {default = "Warning",description = "%config.diagnostics.different-requires%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["discard-returns"] = {default = "Warning",description = "%config.diagnostics.discard-returns%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["doc-field-no-class"] = {default = "Warning",description = "%config.diagnostics.doc-field-no-class%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["duplicate-doc-alias"] = {default = "Warning",description = "%config.diagnostics.duplicate-doc-alias%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["duplicate-doc-field"] = {default = "Warning",description = "%config.diagnostics.duplicate-doc-field%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["duplicate-doc-param"] = {default = "Warning",description = "%config.diagnostics.duplicate-doc-param%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["duplicate-index"] = {default = "Warning",description = "%config.diagnostics.duplicate-index%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["duplicate-set-field"] = {default = "Warning",description = "%config.diagnostics.duplicate-set-field%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["empty-block"] = {default = "Hint",description = "%config.diagnostics.empty-block%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["global-in-nil-env"] = {default = "Warning",description = "%config.diagnostics.global-in-nil-env%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["lowercase-global"] = {default = "Information",description = "%config.diagnostics.lowercase-global%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["missing-parameter"] = {default = "Warning",description = "%config.diagnostics.missing-parameter%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["missing-return"] = {default = "Warning",description = "%config.diagnostics.missing-return%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["missing-return-value"] = {default = "Warning",description = "%config.diagnostics.missing-return-value%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["need-check-nil"] = {default = "Warning",description = "%config.diagnostics.need-check-nil%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["newfield-call"] = {default = "Warning",description = "%config.diagnostics.newfield-call%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["newline-call"] = {default = "Warning",description = "%config.diagnostics.newline-call%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["no-unknown"] = {default = "Warning",description = "%config.diagnostics.no-unknown%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["not-yieldable"] = {default = "Warning",description = "%config.diagnostics.not-yieldable%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["param-type-mismatch"] = {default = "Warning",description = "%config.diagnostics.param-type-mismatch%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["redefined-local"] = {default = "Hint",description = "%config.diagnostics.redefined-local%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["redundant-parameter"] = {default = "Warning",description = "%config.diagnostics.redundant-parameter%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["redundant-return"] = {default = "Hint",description = "%config.diagnostics.redundant-return%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["redundant-return-value"] = {default = "Warning",description = "%config.diagnostics.redundant-return-value%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["redundant-value"] = {default = "Warning",description = "%config.diagnostics.redundant-value%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["return-type-mismatch"] = {default = "Warning",description = "%config.diagnostics.return-type-mismatch%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["spell-check"] = {default = "Information",description = "%config.diagnostics.spell-check%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["trailing-space"] = {default = "Hint",description = "%config.diagnostics.trailing-space%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unbalanced-assignments"] = {default = "Warning",description = "%config.diagnostics.unbalanced-assignments%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-doc-class"] = {default = "Warning",description = "%config.diagnostics.undefined-doc-class%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-doc-name"] = {default = "Warning",description = "%config.diagnostics.undefined-doc-name%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-doc-param"] = {default = "Warning",description = "%config.diagnostics.undefined-doc-param%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-env-child"] = {default = "Information",description = "%config.diagnostics.undefined-env-child%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-field"] = {default = "Warning",description = "%config.diagnostics.undefined-field%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["undefined-global"] = {default = "Warning",description = "%config.diagnostics.undefined-global%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unknown-cast-variable"] = {default = "Warning",description = "%config.diagnostics.unknown-cast-variable%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unknown-diag-code"] = {default = "Warning",description = "%config.diagnostics.unknown-diag-code%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unused-function"] = {default = "Hint",description = "%config.diagnostics.unused-function%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unused-label"] = {default = "Hint",description = "%config.diagnostics.unused-label%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unused-local"] = {default = "Hint",description = "%config.diagnostics.unused-local%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"},["unused-vararg"] = {default = "Hint",description = "%config.diagnostics.unused-vararg%",enum = { "Error", "Warning", "Information", "Hint", "Error!", "Warning!", "Information!", "Hint!" },type = "string"}},scope = "resource",title = "severity",type = "object"},["Lua.diagnostics.workspaceDelay"] = {default = 3000,markdownDescription = "%config.diagnostics.workspaceDelay%",scope = "resource",type = "integer"},["Lua.diagnostics.workspaceRate"] = {default = 100,markdownDescription = "%config.diagnostics.workspaceRate%",scope = "resource",type = "integer"},["Lua.format.defaultConfig"] = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "%config.format.defaultConfig%",patternProperties = {[".*"] = {default = "",type = "string"}},scope = "resource",title = "defaultConfig",type = "object"},["Lua.format.enable"] = {default = true,markdownDescription = "%config.format.enable%",scope = "resource",type = "boolean"},["Lua.hint.arrayIndex"] = {default = "Auto",enum = { "Enable", "Auto", "Disable" },markdownDescription = "%config.hint.arrayIndex%",markdownEnumDescriptions = { "%config.hint.arrayIndex.Enable%", "%config.hint.arrayIndex.Auto%", "%config.hint.arrayIndex.Disable%" },scope = "resource",type = "string"},["Lua.hint.await"] = {default = true,markdownDescription = "%config.hint.await%",scope = "resource",type = "boolean"},["Lua.hint.enable"] = {default = false,markdownDescription = "%config.hint.enable%",scope = "resource",type = "boolean"},["Lua.hint.paramName"] = {default = "All",enum = { "All", "Literal", "Disable" },markdownDescription = "%config.hint.paramName%",markdownEnumDescriptions = { "%config.hint.paramName.All%", "%config.hint.paramName.Literal%", "%config.hint.paramName.Disable%" },scope = "resource",type = "string"},["Lua.hint.paramType"] = {default = true,markdownDescription = "%config.hint.paramType%",scope = "resource",type = "boolean"},["Lua.hint.semicolon"] = {default = "SameLine",enum = { "All", "SameLine", "Disable" },markdownDescription = "%config.hint.semicolon%",markdownEnumDescriptions = { "%config.hint.semicolon.All%", "%config.hint.semicolon.SameLine%", "%config.hint.semicolon.Disable%" },scope = "resource",type = "string"},["Lua.hint.setType"] = {default = false,markdownDescription = "%config.hint.setType%",scope = "resource",type = "boolean"},["Lua.hover.enable"] = {default = true,markdownDescription = "%config.hover.enable%",scope = "resource",type = "boolean"},["Lua.hover.enumsLimit"] = {default = 5,markdownDescription = "%config.hover.enumsLimit%",scope = "resource",type = "integer"},["Lua.hover.expandAlias"] = {default = true,markdownDescription = "%config.hover.expandAlias%",scope = "resource",type = "boolean"},["Lua.hover.previewFields"] = {default = 50,markdownDescription = "%config.hover.previewFields%",scope = "resource",type = "integer"},["Lua.hover.viewNumber"] = {default = true,markdownDescription = "%config.hover.viewNumber%",scope = "resource",type = "boolean"},["Lua.hover.viewString"] = {default = true,markdownDescription = "%config.hover.viewString%",scope = "resource",type = "boolean"},["Lua.hover.viewStringMax"] = {default = 1000,markdownDescription = "%config.hover.viewStringMax%",scope = "resource",type = "integer"},["Lua.misc.parameters"] = {default = {},items = {type = "string"},markdownDescription = "%config.misc.parameters%",scope = "resource",type = "array"},["Lua.runtime.builtin"] = {additionalProperties = false,markdownDescription = "%config.runtime.builtin%",properties = {basic = {default = "default",description = "%config.runtime.builtin.basic%",enum = { "default", "enable", "disable" },type = "string"},bit = {default = "default",description = "%config.runtime.builtin.bit%",enum = { "default", "enable", "disable" },type = "string"},bit32 = {default = "default",description = "%config.runtime.builtin.bit32%",enum = { "default", "enable", "disable" },type = "string"},builtin = {default = "default",description = "%config.runtime.builtin.builtin%",enum = { "default", "enable", "disable" },type = "string"},coroutine = {default = "default",description = "%config.runtime.builtin.coroutine%",enum = { "default", "enable", "disable" },type = "string"},debug = {default = "default",description = "%config.runtime.builtin.debug%",enum = { "default", "enable", "disable" },type = "string"},ffi = {default = "default",description = "%config.runtime.builtin.ffi%",enum = { "default", "enable", "disable" },type = "string"},io = {default = "default",description = "%config.runtime.builtin.io%",enum = { "default", "enable", "disable" },type = "string"},jit = {default = "default",description = "%config.runtime.builtin.jit%",enum = { "default", "enable", "disable" },type = "string"},math = {default = "default",description = "%config.runtime.builtin.math%",enum = { "default", "enable", "disable" },type = "string"},os = {default = "default",description = "%config.runtime.builtin.os%",enum = { "default", "enable", "disable" },type = "string"},package = {default = "default",description = "%config.runtime.builtin.package%",enum = { "default", "enable", "disable" },type = "string"},string = {default = "default",description = "%config.runtime.builtin.string%",enum = { "default", "enable", "disable" },type = "string"},table = {default = "default",description = "%config.runtime.builtin.table%",enum = { "default", "enable", "disable" },type = "string"},utf8 = {default = "default",description = "%config.runtime.builtin.utf8%",enum = { "default", "enable", "disable" },type = "string"}},scope = "resource",title = "builtin",type = "object"},["Lua.runtime.fileEncoding"] = {default = "utf8",enum = { "utf8", "ansi", "utf16le", "utf16be" },markdownDescription = "%config.runtime.fileEncoding%",markdownEnumDescriptions = { "%config.runtime.fileEncoding.utf8%", "%config.runtime.fileEncoding.ansi%", "%config.runtime.fileEncoding.utf16le%", "%config.runtime.fileEncoding.utf16be%" },scope = "resource",type = "string"},["Lua.runtime.meta"] = {default = "${version} ${language} ${encoding}",markdownDescription = "%config.runtime.meta%",scope = "resource",type = "string"},["Lua.runtime.nonstandardSymbol"] = {default = {},items = {enum = { "//", "/**/", "`", "+=", "-=", "*=", "/=", "%=", "^=", "//=", "|=", "&=", "<<=", ">>=", "||", "&&", "!", "!=", "continue" },type = "string"},markdownDescription = "%config.runtime.nonstandardSymbol%",scope = "resource",type = "array"},["Lua.runtime.path"] = {default = { "?.lua", "?/init.lua" },items = {type = "string"},markdownDescription = "%config.runtime.path%",scope = "resource",type = "array"},["Lua.runtime.pathStrict"] = {default = false,markdownDescription = "%config.runtime.pathStrict%",scope = "resource",type = "boolean"},["Lua.runtime.plugin"] = {default = "",markdownDescription = "%config.runtime.plugin%",scope = "resource",type = "string"},["Lua.runtime.special"] = {additionalProperties = false,default = vim.empty_dict(),markdownDescription = "%config.runtime.special%",patternProperties = {[".*"] = {default = "require",enum = { "_G", "rawset", "rawget", "setmetatable", "require", "dofile", "loadfile", "pcall", "xpcall", "assert", "error", "type" },type = "string"}},scope = "resource",title = "special",type = "object"},["Lua.runtime.unicodeName"] = {default = false,markdownDescription = "%config.runtime.unicodeName%",scope = "resource",type = "boolean"},["Lua.runtime.version"] = {default = "Lua 5.4",enum = { "Lua 5.1", "Lua 5.2", "Lua 5.3", "Lua 5.4", "LuaJIT" },markdownDescription = "%config.runtime.version%",markdownEnumDescriptions = { "%config.runtime.version.Lua 5.1%", "%config.runtime.version.Lua 5.2%", "%config.runtime.version.Lua 5.3%", "%config.runtime.version.Lua 5.4%", "%config.runtime.version.LuaJIT%" },scope = "resource",type = "string"},["Lua.semantic.annotation"] = {default = true,markdownDescription = "%config.semantic.annotation%",scope = "resource",type = "boolean"},["Lua.semantic.enable"] = {default = true,markdownDescription = "%config.semantic.enable%",scope = "resource",type = "boolean"},["Lua.semantic.keyword"] = {default = false,markdownDescription = "%config.semantic.keyword%",scope = "resource",type = "boolean"},["Lua.semantic.variable"] = {default = true,markdownDescription = "%config.semantic.variable%",scope = "resource",type = "boolean"},["Lua.signatureHelp.enable"] = {default = true,markdownDescription = "%config.signatureHelp.enable%",scope = "resource",type = "boolean"},["Lua.spell.dict"] = {default = {},items = {type = "string"},markdownDescription = "%config.spell.dict%",scope = "resource",type = "array"},["Lua.telemetry.enable"] = {default = vim.NIL,markdownDescription = "%config.telemetry.enable%",scope = "resource",tags = { "telemetry" },type = { "boolean", "null" }},["Lua.type.castNumberToInteger"] = {default = false,markdownDescription = "%config.type.castNumberToInteger%",scope = "resource",type = "boolean"},["Lua.type.weakNilCheck"] = {default = false,markdownDescription = "%config.type.weakNilCheck%",scope = "resource",type = "boolean"},["Lua.type.weakUnionCheck"] = {default = false,markdownDescription = "%config.type.weakUnionCheck%",scope = "resource",type = "boolean"},["Lua.window.progressBar"] = {default = true,markdownDescription = "%config.window.progressBar%",scope = "resource",type = "boolean"},["Lua.window.statusBar"] = {default = true,markdownDescription = "%config.window.statusBar%",scope = "resource",type = "boolean"},["Lua.workspace.checkThirdParty"] = {default = true,markdownDescription = "%config.workspace.checkThirdParty%",scope = "resource",type = "boolean"},["Lua.workspace.ignoreDir"] = {default = { ".vscode" },items = {type = "string"},markdownDescription = "%config.workspace.ignoreDir%",scope = "resource",type = "array"},["Lua.workspace.ignoreSubmodules"] = {default = true,markdownDescription = "%config.workspace.ignoreSubmodules%",scope = "resource",type = "boolean"},["Lua.workspace.library"] = {default = {},items = {type = "string"},markdownDescription = "%config.workspace.library%",scope = "resource",type = "array"},["Lua.workspace.maxPreload"] = {default = 5000,markdownDescription = "%config.workspace.maxPreload%",scope = "resource",type = "integer"},["Lua.workspace.preloadFileSize"] = {default = 500,markdownDescription = "%config.workspace.preloadFileSize%",scope = "resource",type = "integer"},["Lua.workspace.supportScheme"] = {default = { "file", "untitled", "git" },items = {type = "string"},markdownDescription = "%config.workspace.supportScheme%",scope = "resource",type = "array"},["Lua.workspace.useGitIgnore"] = {default = true,markdownDescription = "%config.workspace.useGitIgnore%",scope = "resource",type = "boolean"},["Lua.workspace.userThirdParty"] = {default = {},items = {type = "string"},markdownDescription = "%config.workspace.userThirdParty%",scope = "resource",type = "array"}},title = "Lua",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/nickel-lang-lsp.lua b/lua/mason-schemas/lsp/nickel-lang-lsp.lua new file mode 100644 index 00000000..c18af1a6 --- /dev/null +++ b/lua/mason-schemas/lsp/nickel-lang-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["nls.server.debugLog"] = {default = false,description = "Logs the communication between VS Code and the language server.",scope = "window",type = "boolean"},["nls.server.path"] = {default = "nls",description = "Path to nickel language server",scope = "window",type = "string"},["nls.server.trace"] = {description = "Enables performance tracing to the given file",scope = "window",type = "string"}},title = "Nickel Language Server Configuration",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/omnisharp-roslyn.lua b/lua/mason-schemas/lsp/omnisharp-roslyn.lua new file mode 100644 index 00000000..7adac3a5 --- /dev/null +++ b/lua/mason-schemas/lsp/omnisharp-roslyn.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["csharp.format.enable"] = {default = true,description = "Enable/disable default C# formatter (requires restart).",type = "boolean"},["csharp.inlayHints.parameters.enabled"] = {default = false,description = "Display inline parameter name hints",type = "boolean"},["csharp.inlayHints.parameters.forIndexerParameters"] = {default = false,description = "Show hints for indexers",type = "boolean"},["csharp.inlayHints.parameters.forLiteralParameters"] = {default = false,description = "Show hints for literals",type = "boolean"},["csharp.inlayHints.parameters.forObjectCreationParameters"] = {default = false,description = "Show hints for 'new' expressions",type = "boolean"},["csharp.inlayHints.parameters.forOtherParameters"] = {default = false,description = "Show hints for everything else",type = "boolean"},["csharp.inlayHints.parameters.suppressForParametersThatDifferOnlyBySuffix"] = {default = false,description = "Suppress hints when parameter names differ only by suffix",type = "boolean"},["csharp.inlayHints.parameters.suppressForParametersThatMatchArgumentName"] = {default = false,description = "Suppress hints when argument matches parameter name",type = "boolean"},["csharp.inlayHints.parameters.suppressForParametersThatMatchMethodIntent"] = {default = false,description = "Suppress hints when parameter name matches the method's intent",type = "boolean"},["csharp.inlayHints.types.enabled"] = {default = false,description = "Display inline type hints",type = "boolean"},["csharp.inlayHints.types.forImplicitObjectCreation"] = {default = false,description = "Show hints for implicit object creation",type = "boolean"},["csharp.inlayHints.types.forImplicitVariableTypes"] = {default = false,description = "Show hints for variables with inferred types",type = "boolean"},["csharp.inlayHints.types.forLambdaParameterTypes"] = {default = false,description = "Show hints for lambda parameter types",type = "boolean"},["csharp.maxProjectFileCountForDiagnosticAnalysis"] = {default = 1000,description = "Specifies the maximum number of files for which diagnostics are reported for the whole workspace. If this limit is exceeded, diagnostics will be shown for currently opened files only. Specify 0 or less to disable the limit completely.",type = "number"},["csharp.referencesCodeLens.enabled"] = {default = true,description = "Specifies whether the references CodeLens should be shown.",type = "boolean"},["csharp.referencesCodeLens.filteredSymbols"] = {default = {},description = "Array of custom symbol names for which CodeLens should be disabled.",items = {type = "string"},type = "array"},["csharp.semanticHighlighting.enabled"] = {default = true,description = "Enable/disable Semantic Highlighting for C# files (Razor files currently unsupported). Defaults to false. Close open files for changes to take effect.",scope = "window",type = "boolean"},["csharp.showOmnisharpLogOnError"] = {default = true,description = "Shows the OmniSharp log in the Output pane when OmniSharp reports an error.",type = "boolean"},["csharp.suppressBuildAssetsNotification"] = {default = false,description = "Suppress the notification window to add missing assets to build or debug the application.",type = "boolean"},["csharp.suppressDotnetInstallWarning"] = {default = false,description = "Suppress the warning that the .NET Core SDK is not on the path.",type = "boolean"},["csharp.suppressDotnetRestoreNotification"] = {default = false,description = "Suppress the notification window to perform a 'dotnet restore' when dependencies can't be resolved.",type = "boolean"},["csharp.suppressHiddenDiagnostics"] = {default = true,description = "Suppress 'hidden' diagnostics (such as 'unnecessary using directives') from appearing in the editor or the Problems pane.",type = "boolean"},["csharp.suppressProjectJsonWarning"] = {default = false,description = "Suppress the warning that project.json is no longer a supported project format for .NET Core applications",type = "boolean"},["csharp.testsCodeLens.enabled"] = {default = true,description = "Specifies whether the run and debug test CodeLens should be shown.",type = "boolean"},["csharp.unitTestDebuggingOptions"] = {default = vim.empty_dict(),description = "Options to use with the debugger when launching for unit test debugging. Any launch.json option is valid here.",properties = {allowFastEvaluate = {default = true,description = "When true (the default state), the debugger will attempt faster evaluation by simulating execution of simple properties and methods.",type = "boolean"},debugServer = {default = 4711,description = "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode",type = "number"},enableStepFiltering = {default = true,description = "Optional flag to enable stepping over Properties and Operators.",type = "boolean"},justMyCode = {default = true,description = "Optional flag to only show user code.",type = "boolean"},logging = {default = vim.empty_dict(),description = "Optional flags to determine what types of messages should be logged to the output window.",properties = {browserStdOut = {default = true,description = "Optional flag to determine if stdout text from the launching the web browser should be logged to the output window.",type = "boolean"},elapsedTiming = {default = false,description = "If true, engine logging will include `adapterElapsedTime` and `engineElapsedTime` properties to indicate the amount of time, in microseconds, that a request took.",type = "boolean"},engineLogging = {default = false,description = "Optional flag to determine whether diagnostic engine logs should be logged to the output window.",type = "boolean"},exceptions = {default = true,description = "Optional flag to determine whether exception messages should be logged to the output window.",type = "boolean"},moduleLoad = {default = true,description = "Optional flag to determine whether module load events should be logged to the output window.",type = "boolean"},processExit = {default = true,description = "Controls if a message is logged when the target process exits, or debugging is stopped. Default: `true`.",type = "boolean"},programOutput = {default = true,description = "Optional flag to determine whether program output should be logged to the output window when not using an external console.",type = "boolean"},threadExit = {default = false,description = "Controls if a message is logged when a thread in the target process exits. Default: `false`.",type = "boolean"}},required = {},type = "object"},requireExactSource = {default = true,description = "Optional flag to require current source code to match the pdb.",type = "boolean"},sourceFileMap = {additionalProperties = {type = "string"},default = {[""] = ""},description = "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'",type = "object"},sourceLinkOptions = {additionalItems = {properties = {enabled = {default = "true",description = "Is Source Link enabled for this URL? If unspecified, this option defaults to 'true'.",title = "boolean"}},type = "object"},default = {["*"] = {enabled = true}},description = "Options to control how Source Link connects to web servers. For more information: https://aka.ms/VSCode-CS-LaunchJson#source-link-options",type = "object"},suppressJITOptimizations = {default = false,description = "If true, when an optimized module (.dll compiled in the Release configuration) loads in the target process, the debugger will ask the Just-In-Time compiler to generate code with optimizations disabled. For more information: https://aka.ms/VSCode-CS-LaunchJson#suppress-jit-optimizations",type = "boolean"},symbolOptions = {default = {searchMicrosoftSymbolServer = false,searchNuGetOrgSymbolServer = false,searchPaths = {}},description = "Options to control how symbols (.pdb files) are found and loaded.",properties = {cachePath = {default = "~/.dotnet/symbolcache",description = "Directory where symbols downloaded from symbol servers should be cached. If unspecified, on Windows the debugger will default to %TEMP%\\SymbolCache, and on Linux and macOS the debugger will default to ~/.dotnet/symbolcache.",type = "string"},moduleFilter = {default = {excludedModules = {},mode = "loadAllButExcluded"},description = "Provides options to control which modules (.dll files) the debugger will attempt to load symbols (.pdb files) for.",properties = {excludedModules = {default = {},description = "Array of modules that the debugger should NOT load symbols for. Wildcards (example: MyCompany.*.dll) are supported.\n\nThis property is ignored unless 'mode' is set to 'loadAllButExcluded'.",items = {type = "string"},type = "array"},includeSymbolsNextToModules = {default = true,description = "If true, for any module NOT in the 'includedModules' array, the debugger will still check next to the module itself and the launching executable, but it will not check paths on the symbol search list. This option defaults to 'true'.\n\nThis property is ignored unless 'mode' is set to 'loadOnlyIncluded'.",type = "boolean"},includedModules = {default = { "MyExampleModule.dll" },description = "Array of modules that the debugger should load symbols for. Wildcards (example: MyCompany.*.dll) are supported.\n\nThis property is ignored unless 'mode' is set to 'loadOnlyIncluded'.",items = {type = "string"},type = "array"},mode = {default = "loadAllButExcluded",description = "Controls which of the two basic operating modes the module filter operates in.",enum = { "loadAllButExcluded", "loadOnlyIncluded" },enumDescriptions = { "Load symbols for all modules unless the module is in the 'excludedModules' array.", "Do not attempt to load symbols for ANY module unless it is in the 'includedModules' array, or it is included through the 'includeSymbolsNextToModules' setting." },type = "string"}},required = { "mode" },type = "object"},searchMicrosoftSymbolServer = {default = false,description = "If 'true' the Microsoft Symbol server (httpsโ€‹://msdl.microsoft.comโ€‹/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",type = "boolean"},searchNuGetOrgSymbolServer = {default = false,description = "If 'true' the NuGet.org symbol server (httpsโ€‹://symbols.nuget.orgโ€‹/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",type = "boolean"},searchPaths = {default = {},description = "Array of symbol server URLs (example: httpโ€‹://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",items = {type = "string"},type = "array"}},type = "object"},targetArchitecture = {description = "[Only supported in local macOS debugging] The architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are x86_64 or arm64.",type = "string"},type = {default = "coreclr",description = "Type type of code to debug. Can be either 'coreclr' for .NET Core debugging, or 'clr' for Desktop .NET Framework. 'clr' only works on Windows as the Desktop framework is Windows-only.",enum = { "coreclr", "clr" },type = "string"}},type = "object"},["omnisharp.analyzeOpenDocumentsOnly"] = {default = false,description = "Only run analyzers against open files when 'enableRoslynAnalyzers' is true",type = "boolean"},["omnisharp.autoStart"] = {default = true,description = "Specifies whether the OmniSharp server will be automatically started or not. If false, OmniSharp can be started with the 'Restart OmniSharp' command",type = "boolean"},["omnisharp.defaultLaunchSolution"] = {description = "The name of the default solution used at start up if the repo has multiple solutions. e.g.'MyAwesomeSolution.sln'. Default value is `null` which will cause the first in alphabetical order to be chosen.",type = "string"},["omnisharp.disableMSBuildDiagnosticWarning"] = {default = false,description = "Specifies whether notifications should be shown if OmniSharp encounters warnings or errors loading a project. Note that these warnings/errors are always emitted to the OmniSharp log",type = "boolean"},["omnisharp.dotnetPath"] = {description = 'Specified the path to a dotnet installation to use when "useModernNet" is set to true, instead of the default system one. Example: "/home/username/mycustomdotnetdirectory".',scope = "window",type = "string"},["omnisharp.enableAsyncCompletion"] = {default = false,description = "(EXPERIMENTAL) Enables support for resolving completion edits asynchronously. This can speed up time to show the completion list, particularly override and partial method completion lists, at the cost of slight delays after inserting a completion item. Most completion items will have no noticeable impact with this feature, but typing immediately after inserting an override or partial method completion, before the insert is completed, can have unpredictable results.",type = "boolean"},["omnisharp.enableDecompilationSupport"] = {default = false,description = "Enables support for decompiling external references instead of viewing metadata.",scope = "machine",type = "boolean"},["omnisharp.enableEditorConfigSupport"] = {default = true,description = "Enables support for reading code style, naming convention and analyzer settings from .editorconfig.",type = "boolean"},["omnisharp.enableImportCompletion"] = {default = false,description = "Enables support for showing unimported types and unimported extension methods in completion lists. When committed, the appropriate using directive will be added at the top of the current file. This option can have a negative impact on initial completion responsiveness, particularly for the first few completion sessions after opening a solution.",type = "boolean"},["omnisharp.enableMsBuildLoadProjectsOnDemand"] = {default = false,description = "If true, MSBuild project system will only load projects for files that were opened in the editor. This setting is useful for big C# codebases and allows for faster initialization of code navigation features only for projects that are relevant to code that is being edited. With this setting enabled OmniSharp may load fewer projects and may thus display incomplete reference lists for symbols.",type = "boolean"},["omnisharp.enableRoslynAnalyzers"] = {default = false,description = "Enables support for roslyn analyzers, code fixes and rulesets.",type = "boolean"},["omnisharp.loggingLevel"] = {default = "information",description = "Specifies the level of logging output from the OmniSharp server.",enum = { "trace", "debug", "information", "warning", "error", "critical" },type = "string"},["omnisharp.maxFindSymbolsItems"] = {default = 1000,description = "The maximum number of items that 'Go to Symbol in Workspace' operation can show. The limit is applied only when a positive number is specified here.",type = "number"},["omnisharp.maxProjectResults"] = {default = 250,description = "The maximum number of projects to be shown in the 'Select Project' dropdown (maximum 250).",type = "number"},["omnisharp.minFindSymbolsFilterLength"] = {default = 0,description = "The minimum number of characters to enter before 'Go to Symbol in Workspace' operation shows any results.",type = "number"},["omnisharp.monoPath"] = {description = 'Specifies the path to a mono installation to use when "useModernNet" is set to false, instead of the default system one. Example: "/Library/Frameworks/Mono.framework/Versions/Current"',scope = "machine",type = "string"},["omnisharp.organizeImportsOnFormat"] = {default = false,description = "Specifies whether 'using' directives should be grouped and sorted during document formatting.",type = "boolean"},["omnisharp.path"] = {description = 'Specifies the path to OmniSharp. When left empty the OmniSharp version pinned to the C# Extension is used. This can be the absolute path to an OmniSharp executable, a specific version number, or "latest". If a version number or "latest" is specified, the appropriate version of OmniSharp will be downloaded on your behalf. Setting "latest" is an opt-in into latest beta releases of OmniSharp.',scope = "machine",type = "string"},["omnisharp.projectLoadTimeout"] = {default = 60,description = "The time Visual Studio Code will wait for the OmniSharp server to start. Time is expressed in seconds.",type = "number"},["omnisharp.sdkIncludePrereleases"] = {default = true,description = 'Specifies whether to include preview versions of the .NET SDK when determining which version to use for project loading. Applies when "useModernNet" is set to true.',scope = "window",type = "boolean"},["omnisharp.sdkPath"] = {description = 'Specifies the path to a .NET SDK installation to use for project loading instead of the highest version installed. Applies when "useModernNet" is set to true. Example: /home/username/dotnet/sdks/6.0.300.',scope = "window",type = "string"},["omnisharp.sdkVersion"] = {description = 'Specifies the version of the .NET SDK to use for project loading instead of the highest version installed. Applies when "useModernNet" is set to true. Example: 6.0.300.',scope = "window",type = "string"},["omnisharp.testRunSettings"] = {description = "Path to the .runsettings file which should be used when running unit tests.",type = "string"},["omnisharp.useEditorFormattingSettings"] = {default = true,description = "Specifes whether OmniSharp should use VS Code editor settings for C# code formatting (use of tabs, indentation size).",type = "boolean"},["omnisharp.useModernNet"] = {default = true,description = "Use OmniSharp build for .NET 6. This version _does not_ support non-SDK-style .NET Framework projects, including Unity. SDK-style Framework, .NET Core, and .NET 5+ projects should see significant performance improvements.",scope = "window",title = "Use .NET 6 build of OmniSharp",type = "boolean"},["omnisharp.waitForDebugger"] = {default = false,description = "Pass the --debug flag when launching the OmniSharp server to allow a debugger to be attached.",type = "boolean"},["razor.devmode"] = {default = false,description = "Forces the omnisharp-vscode extension to run in a mode that enables local Razor.VSCode deving.",type = "boolean"},["razor.disabled"] = {default = false,description = "Specifies whether to disable Razor language features.",type = "boolean"},["razor.format.enable"] = {default = true,description = "Enable/disable default Razor formatter.",scope = "window",type = "boolean"},["razor.languageServer.debug"] = {default = false,description = "Specifies whether to wait for debug attach when launching the language server.",type = "boolean"},["razor.languageServer.directory"] = {description = "Overrides the path to the Razor Language Server directory.",scope = "machine",type = "string"},["razor.plugin.path"] = {description = "Overrides the path to the Razor plugin dll.",scope = "machine",type = "string"},["razor.trace"] = {default = "Off",description = "Specifies whether to output all messages [Verbose], some messages [Messages] or not at all [Off].",enum = { "Off", "Messages", "Verbose" },enumDescriptions = { "Does not log messages from the Razor extension", "Logs only some messages from the Razor extension", "Logs all messages from the Razor extension" },type = "string"}},title = "C# configuration"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/perlnavigator.lua b/lua/mason-schemas/lsp/perlnavigator.lua new file mode 100644 index 00000000..4c0bac84 --- /dev/null +++ b/lua/mason-schemas/lsp/perlnavigator.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["perlnavigator.enableWarnings"] = {default = true,description = "Enable warnings using -Mwarnings command switch",scope = "resource",type = "boolean"},["perlnavigator.includeLib"] = {default = true,description = "Boolean to indicate if $project/lib should be added to the path by default",scope = "resource",type = "boolean"},["perlnavigator.includePaths"] = {default = {},description = "Array of paths added to @INC. You can use $workspaceFolder as a placeholder.",scope = "resource",type = "array"},["perlnavigator.logging"] = {default = true,description = "Log to stdout from the navigator. Viewable in the Perl Navigator LSP log",scope = "resource",type = "boolean"},["perlnavigator.perlPath"] = {default = "perl",description = "Full path to the perl executable (no aliases, .bat files or ~/)",scope = "resource",type = "string"},["perlnavigator.perlcriticEnabled"] = {default = true,description = "Enable perl critic.",scope = "resource",type = "boolean"},["perlnavigator.perlcriticProfile"] = {default = "",description = "Path to perl critic profile. Otherwise perlcritic itself will default to ~/.perlcriticrc. (no aliases, .bat files or ~/)",scope = "resource",type = "string"},["perlnavigator.perltidyEnabled"] = {default = true,description = "Enable perl tidy.",scope = "resource",type = "boolean"},["perlnavigator.perltidyProfile"] = {default = "",description = "Path to perl tidy profile (no aliases, .bat files or ~/)",scope = "resource",type = "string"},["perlnavigator.severity1"] = {default = "hint",description = "Editor Diagnostic severity level for Critic severity 1",enum = { "error", "warning", "info", "hint", "none" },scope = "resource",type = "string"},["perlnavigator.severity2"] = {default = "hint",description = "Editor Diagnostic severity level for Critic severity 2",enum = { "error", "warning", "info", "hint", "none" },scope = "resource",type = "string"},["perlnavigator.severity3"] = {default = "hint",description = "Editor Diagnostic severity level for Critic severity 3",enum = { "error", "warning", "info", "hint", "none" },scope = "resource",type = "string"},["perlnavigator.severity4"] = {default = "info",description = "Editor Diagnostic severity level for Critic severity 4",enum = { "error", "warning", "info", "hint", "none" },scope = "resource",type = "string"},["perlnavigator.severity5"] = {default = "warning",description = "Editor Diagnostic severity level for Critic severity 5",enum = { "error", "warning", "info", "hint", "none" },scope = "resource",type = "string"},["perlnavigator.trace.server"] = {default = "messages",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"}},title = "Perl Navigator",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/psalm.lua b/lua/mason-schemas/lsp/psalm.lua new file mode 100644 index 00000000..7fffe98a --- /dev/null +++ b/lua/mason-schemas/lsp/psalm.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["psalm.analyzedFileExtensions"] = {default = { {language = "php",scheme = "file"}, {language = "php",scheme = "untitled"} },description = "A list of file extensions to request Psalm to analyze. By default, this only includes 'php' (Modifying requires VSCode reload)",type = "array"},["psalm.configPaths"] = {default = { "psalm.xml", "psalm.xml.dist" },description = "A list of files to checkup for psalm configuration (relative to the workspace directory)",items = {type = "string"},type = "array"},["psalm.connectToServerWithTcp"] = {default = false,description = "If this is set to true, this VSCode extension will use TCP instead of the default STDIO to communicate with the Psalm language server. (Modifying requires VSCode reload)",type = "boolean"},["psalm.disableAutoComplete"] = {default = false,description = "Enable to disable autocomplete on methods and properties (Modifying requires VSCode reload)",type = "boolean"},["psalm.enableDebugLog"] = {default = false,deprecationMessage = "Deprecated: Please use psalm.enableVerbose, psalm.logLevel or psalm.trace.server instead.",description = "Enable this to print messages to the debug console when developing or debugging this VS Code extension. (Modifying requires VSCode reload)",type = "boolean"},["psalm.enableUseIniDefaults"] = {default = false,description = "Enable this to use PHP-provided ini defaults for memory and error display. (Modifying requires restart)",type = "boolean"},["psalm.enableVerbose"] = {default = false,description = "Enable --verbose mode on the Psalm Language Server (Modifying requires VSCode reload)",type = "boolean"},["psalm.hideStatusMessageWhenRunning"] = {default = true,description = "This will hide the Psalm status from the status bar when it is started and running. This is useful to clear up a cluttered status bar.",type = "boolean"},["psalm.logLevel"] = {default = "INFO",description = "Traces the communication between VSCode and the Psalm language server.",enum = { "NONE", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" },scope = "window",type = "string"},["psalm.maxRestartCount"] = {default = 5,description = "The number of times the Language Server is allowed to crash and restart before it will no longer try to restart (Modifying requires VSCode reload)",type = "number"},["psalm.phpExecutableArgs"] = {default = { "-dxdebug.remote_autostart=0", "-dxdebug.remote_enable=0", "-dxdebug_profiler_enable=0" },description = "Optional (Advanced), default is '-dxdebug.remote_autostart=0 -dxdebug.remote_enable=0 -dxdebug_profiler_enable=0'. Additional PHP executable CLI arguments to use. (Modifying requires VSCode reload)",items = {type = "string"},type = "array"},["psalm.phpExecutablePath"] = {default = vim.NIL,description = 'Optional, defaults to searching for "php". The path to a PHP 7.0+ executable to use to execute the Psalm server. The PHP 7.0+ installation should preferably include and enable the PHP module `pcntl`. (Modifying requires VSCode reload)',type = "string"},["psalm.psalmClientScriptPath"] = {default = vim.NIL,deprecationMessage = "Deprecated: Please use psalm.psalmScriptPath instead.",description = "Optional (Advanced). If provided, this overrides the Psalm script to use, e.g. vendor/bin/psalm. (Modifying requires VSCode reload)",markdownDeprecationMessage = "**Deprecated**: Please use `#psalm.psalmScriptPath#` instead.",type = "string"},["psalm.psalmScriptArgs"] = {default = {},description = "Optional (Advanced). Additional arguments to the Psalm language server. (Modifying requires VSCode reload)",items = {type = "string"},type = "array"},["psalm.psalmScriptPath"] = {default = vim.NIL,description = "Optional (Advanced). If provided, this overrides the Psalm script to use, e.g. vendor/bin/psalm-language-server. (Modifying requires VSCode reload)",type = "string"},["psalm.psalmVersion"] = {default = vim.NIL,description = "Optional (Advanced). If provided, this overrides the Psalm version detection (Modifying requires VSCode reload)",type = "string"},["psalm.trace.server"] = {default = "off",description = "Traces the communication between VSCode and the Psalm language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["psalm.unusedVariableDetection"] = {default = false,description = "Enable this to enable unused variable and parameter detection",type = "boolean"}},title = "PHP - Psalm Analyzer",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/puppet-editor-services.lua b/lua/mason-schemas/lsp/puppet-editor-services.lua new file mode 100644 index 00000000..f662c090 --- /dev/null +++ b/lua/mason-schemas/lsp/puppet-editor-services.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["puppet.editorService.debugFilePath"] = {default = "",description = "The absolute filepath where the Puppet Editor Service will output the debugging log. By default no logfile is generated",type = "string"},["puppet.editorService.enable"] = {default = true,description = "Enable/disable advanced Puppet Language Features",type = "boolean"},["puppet.editorService.featureFlags"] = {default = {},description = "An array of strings of experimental features to enable in the Puppet Editor Service",type = "array"},["puppet.editorService.foldingRange.enable"] = {default = true,description = "Enable/disable syntax aware code folding provider",type = "boolean"},["puppet.editorService.foldingRange.showLastLine"] = {default = false,description = "Show or hide the last line in code folding regions",type = "boolean"},["puppet.editorService.formatOnType.enable"] = {default = false,description = "Enable/disable the Puppet document on-type formatter, for example hashrocket alignment",type = "boolean"},["puppet.editorService.formatOnType.maxFileSize"] = {default = 4096,description = "Sets the maximum file size (in Bytes) that document on-type formatting will occur. Setting this to zero (0) will disable the file size check. Note that large file sizes can cause performance issues.",minimum = 0,type = "integer"},["puppet.editorService.hover.showMetadataInfo"] = {default = true,description = "Enable or disable showing Puppet Module version information in the metadata.json file",type = "boolean"},["puppet.editorService.loglevel"] = {default = "normal",description = "Set the logging verbosity level for the Puppet Editor Service, with Debug producing the most output and Error producing the least",enum = { "debug", "error", "normal", "warning", "verbose" },type = "string"},["puppet.editorService.protocol"] = {default = "stdio",description = "The protocol used to communicate with the Puppet Editor Service. By default the local STDIO protocol is used.",enum = { "stdio", "tcp" },type = "string"},["puppet.editorService.puppet.confdir"] = {default = "",description = "The Puppet configuration directory. See https://puppet.com/docs/puppet/latest/dirs_confdir.html for more information",type = "string"},["puppet.editorService.puppet.environment"] = {default = "",description = "The Puppet environment to use. See https://puppet.com/docs/puppet/latest/config_print.html#environments for more information",type = "string"},["puppet.editorService.puppet.modulePath"] = {default = "",description = "Additional module paths to use when starting the Editor Services. On Windows this is delimited with a semicolon, and on all other platforms, with a colon. For example C:\\Path1;C:\\Path2",type = "string"},["puppet.editorService.puppet.vardir"] = {default = "",description = "The Puppet cache directory. See https://puppet.com/docs/puppet/latest/dirs_vardir.html for more information",type = "string"},["puppet.editorService.puppet.version"] = {default = "",description = "The version of Puppet to use. For example '5.4.0'. This is generally only applicable when using the PDK installation type. If Puppet Editor Services is unable to use this version, it will default to the latest available version of Puppet.",type = "string"},["puppet.editorService.tcp.address"] = {description = "The IP address or hostname of the remote Puppet Editor Service to connect to, for example 'computer.domain' or '192.168.0.1'. Only applicable when the editorService.protocol is set to tcp",type = "string"},["puppet.editorService.tcp.port"] = {description = "The TCP Port of the remote Puppet Editor Service to connect to. Only applicable when the editorService.protocol is set to tcp",type = "integer"},["puppet.editorService.timeout"] = {default = 10,description = "The timeout to connect to the Puppet Editor Service",type = "integer"},["puppet.format.enable"] = {default = true,description = "Enable/disable the Puppet document formatter",scope = "window",type = "boolean"},["puppet.installDirectory"] = {markdownDescription = "The fully qualified path to the Puppet install directory. This can be a PDK or Puppet Agent installation. For example: 'C:\\Program Files\\Puppet Labs\\Puppet' or '/opt/puppetlabs/puppet'. If this is not set the extension will attempt to detect the installation directory. Do **not** use when `#puppet.installType#` is set to `auto`",type = "string"},["puppet.installType"] = {default = "auto",enum = { "auto", "pdk", "agent" },enumDescriptions = { "The exention will use the PDK or the Puppet Agent based on default install locations. When both are present, it will use the PDK", "Use the PDK as an installation source", "Use the Puppet Agent as an installation source" },markdownDescription = "The type of Puppet installation. Either the Puppet Development Kit (pdk) or the Puppet Agent (agent). Choose `auto` to have the extension detect which to use automatically based on default install locations",type = "string"},["puppet.notification.nodeGraph"] = {default = "messagebox",description = "The type of notification used when a node graph is being generated. Default value of messagebox",enum = { "messagebox", "statusbar", "none" },type = "string"},["puppet.notification.puppetResource"] = {default = "messagebox",description = "The type of notification used when a running Puppet Resouce. Default value of messagebox",enum = { "messagebox", "statusbar", "none" },type = "string"},["puppet.pdk.checkVersion"] = {default = true,description = "Enable/disable checking if installed PDK version is latest",type = "boolean"},["puppet.titleBar.pdkNewModule.enable"] = {default = true,description = "Enable/disable the PDK New Module icon in the Editor Title Bar",type = "boolean"},["puppet.validate.resolvePuppetfiles"] = {default = true,description = "Enable/disable using dependency resolution for Puppetfiles",type = "boolean"}},title = "Puppet",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/purescript-language-server.lua b/lua/mason-schemas/lsp/purescript-language-server.lua new file mode 100644 index 00000000..f4815ccb --- /dev/null +++ b/lua/mason-schemas/lsp/purescript-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["purescript.addNpmPath"] = {default = false,description = "Whether to add the local npm bin directory to the PATH for purs IDE server and build command.",scope = "resource",type = "boolean"},["purescript.addPscPackageSources"] = {default = false,description = "Whether to add psc-package sources to the globs passed to the IDE server for source locations (specifically the output of `psc-package sources`, if this is a psc-package project). Update due to adding packages/changing package set requires psc-ide server restart.",scope = "resource",type = "boolean"},["purescript.addSpagoSources"] = {default = true,description = "Whether to add spago sources to the globs passed to the IDE server for source locations (specifically the output of `spago sources`, if this is a spago project). Update due to adding packages/changing package set requires psc-ide server restart.",scope = "resource",type = "boolean"},["purescript.autoStartPscIde"] = {default = true,description = "Whether to automatically start/connect to purs IDE server when editing a PureScript file (includes connecting to an existing running instance). If this is disabled, various features like autocomplete, tooltips, and other type info will not work until start command is run manually.",scope = "resource",type = "boolean"},["purescript.autocompleteAddImport"] = {default = true,description = "Whether to automatically add imported identifiers when accepting autocomplete result.",scope = "resource",type = "boolean"},["purescript.autocompleteAllModules"] = {default = true,description = "Whether to always autocomplete from all built modules, or just those imported in the file. Suggestions from all modules always available by explicitly triggering autocomplete.",scope = "resource",type = "boolean"},["purescript.autocompleteGrouped"] = {default = true,description = "Whether to group completions in autocomplete results. Requires compiler 0.11.6",scope = "resource",type = "boolean"},["purescript.autocompleteLimit"] = {default = vim.NIL,description = "Maximum number of results to fetch for an autocompletion request. May improve performance on large projects.",scope = "resource",type = { "null", "integer" }},["purescript.buildCommand"] = {default = "spago build --purs-args --json-errors",description = "Build command to use with arguments. Not passed to shell. eg `spago build --purs-args --json-errors`",scope = "resource",type = "string"},["purescript.buildOpenedFiles"] = {default = false,markdownDescription = "**EXPERIMENTAL** Enable purs IDE server fast rebuild of opened files. This includes both newly opened tabs and those present at startup.",scope = "resource",type = "boolean"},["purescript.censorWarnings"] = {default = {},description = 'The warning codes to censor, both for fast rebuild and a full build. Unrelated to any psa setup. e.g.: ["ShadowedName","MissingTypeDeclaration"]',items = {type = "string"},scope = "resource",title = "Censor warnings",type = "array"},["purescript.codegenTargets"] = {default = vim.NIL,description = "List of codegen targets to pass to the compiler for rebuild. e.g. js, corefn. If not specified (rather than empty array) this will not be passed and the compiler will default to js. Requires 0.12.1+",items = {type = "string"},scope = "resource",type = "array"},["purescript.declarationTypeCodeLens"] = {default = true,description = "Enable declaration codelens to add types to declarations",scope = "resource",type = "boolean"},["purescript.exportsCodeLens"] = {default = true,description = "Enable declaration codelenses for export management",scope = "resource",type = "boolean"},["purescript.fastRebuild"] = {default = true,description = "Enable purs IDE server fast rebuild",scope = "resource",type = "boolean"},["purescript.formatter"] = {default = "purty",description = "Tool to use to for formatting. Must be installed and on PATH (or npm installed with addNpmPath set)",enum = { "none", "purty", "purs-tidy", "pose" },markdownEnumDescriptions = { "No formatting provision", "Use purty. Must be installed - [instructions](https://gitlab.com/joneshf/purty#npm)", "Use purs-tidy. Must be installed - [instructions](https://github.com/natefaubion/purescript-tidy)", "Use pose (prettier plugin). Must be installed - [instructions](https://pose.rowtype.yoga/)" },scope = "resource",type = "string"},["purescript.fullBuildOnSave"] = {default = false,description = "Whether to perform a full build on save with the configured build command (rather than IDE server fast rebuild). This is not generally recommended because it is slow, but it does mean that dependent modules are rebuilt as necessary.",scope = "resource",type = "boolean"},["purescript.importsPreferredModules"] = {default = { "Prelude" },description = "Module to prefer to insert when adding imports which have been re-exported. In order of preference, most preferred first.",items = {type = "string"},scope = "resource",type = "array"},["purescript.outputDirectory"] = {default = "output/",description = "Override purs ide output directory (output/ if not specified). This should match up to your build command",scope = "resource",type = "string"},["purescript.packagePath"] = {default = "",description = "Path to installed packages. Will be used to control globs passed to IDE server for source locations. Change requires IDE server restart.",scope = "resource",type = "string"},["purescript.preludeModule"] = {default = "Prelude",description = "Module to consider as your default prelude, if an auto-complete suggestion comes from this module it will be imported unqualified.",scope = "resource",type = "string"},["purescript.pscIdePort"] = {default = vim.NIL,description = "Port to use for purs IDE server (whether an existing server or to start a new one). By default a random port is chosen (or an existing port in .psc-ide-port if present), if this is specified no attempt will be made to select an alternative port on failure.",scope = "resource",type = { "integer", "null" }},["purescript.pscIdelogLevel"] = {default = "",description = "Log level for purs IDE server",scope = "resource",type = "string"},["purescript.pursExe"] = {default = "purs",description = "Location of purs executable (resolved wrt PATH)",scope = "resource",type = "string"},["purescript.sourcePath"] = {default = "src",description = "Path to application source root. Will be used to control globs passed to IDE server for source locations. Change requires IDE server restart.",scope = "resource",type = "string"},["purescript.trace.server"] = {default = "off",description = "Traces the communication between VSCode and the PureScript language service.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"}},title = "PureScript"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/pyright.lua b/lua/mason-schemas/lsp/pyright.lua new file mode 100644 index 00000000..152658dd --- /dev/null +++ b/lua/mason-schemas/lsp/pyright.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["pyright.disableLanguageServices"] = {default = false,description = "Disables type completion, definitions, and references.",scope = "resource",type = "boolean"},["pyright.disableOrganizeImports"] = {default = false,description = "Disables the โ€œOrganize Importsโ€ command.",scope = "resource",type = "boolean"},["python.analysis.autoImportCompletions"] = {default = true,description = "Offer auto-import completions.",scope = "resource",type = "boolean"},["python.analysis.autoSearchPaths"] = {default = true,description = "Automatically add common search paths like 'src'?",scope = "resource",type = "boolean"},["python.analysis.diagnosticMode"] = {default = "openFilesOnly",enum = { "openFilesOnly", "workspace" },enumDescriptions = { "Analyzes and reports errors on only open files.", "Analyzes and reports errors on all files in the workspace." },scope = "resource",type = "string"},["python.analysis.diagnosticSeverityOverrides"] = {default = vim.empty_dict(),description = "Allows a user to override the severity levels for individual diagnostics.",properties = {reportAssertAlwaysTrue = {default = "warning",description = "Diagnostics for 'assert' statement that will provably always assert. This can be indicative of a programming error.",enum = { "none", "information", "warning", "error" },type = "string"},reportCallInDefaultInitializer = {default = "none",description = "Diagnostics for function calls within a default value initialization expression. Such calls can mask expensive operations that are performed at module initialization time.",enum = { "none", "information", "warning", "error" },type = "string"},reportConstantRedefinition = {default = "none",description = "Diagnostics for attempts to redefine variables whose names are all-caps with underscores and numerals.",enum = { "none", "information", "warning", "error" },type = "string"},reportDuplicateImport = {default = "none",description = "Diagnostics for an imported symbol or module that is imported more than once.",enum = { "none", "information", "warning", "error" },type = "string"},reportFunctionMemberAccess = {default = "none",description = "Diagnostics for member accesses on functions.",enum = { "none", "information", "warning", "error" },type = "string"},reportGeneralTypeIssues = {default = "error",description = "Diagnostics for general type inconsistencies, unsupported operations, argument/parameter mismatches, etc. Covers all of the basic type-checking rules not covered by other rules. Does not include syntax errors.",enum = { "none", "information", "warning", "error" },type = "string"},reportImplicitStringConcatenation = {default = "none",description = "Diagnostics for two or more string literals that follow each other, indicating an implicit concatenation. This is considered a bad practice and often masks bugs such as missing commas.",enum = { "none", "information", "warning", "error" },type = "string"},reportImportCycles = {default = "none",description = "Diagnostics for cyclical import chains. These are not errors in Python, but they do slow down type analysis and often hint at architectural layering issues. Generally, they should be avoided.",enum = { "none", "information", "warning", "error" },type = "string"},reportIncompatibleMethodOverride = {default = "none",description = "Diagnostics for methods that override a method of the same name in a base class in an incompatible manner (wrong number of parameters, incompatible parameter types, or incompatible return type).",enum = { "none", "information", "warning", "error" },type = "string"},reportIncompatibleVariableOverride = {default = "none",description = "Diagnostics for overrides in subclasses that redefine a variable in an incompatible way.",enum = { "none", "information", "warning", "error" },type = "string"},reportIncompleteStub = {default = "none",description = "Diagnostics for the use of a module-level โ€œ__getattr__โ€ function, indicating that the stub is incomplete.",enum = { "none", "information", "warning", "error" },type = "string"},reportInconsistentConstructor = {default = "none",description = "Diagnostics for __init__ and __new__ methods whose signatures are inconsistent.",enum = { "none", "information", "warning", "error" },type = "string"},reportInvalidStringEscapeSequence = {default = "warning",description = "Diagnostics for invalid escape sequences used within string literals. The Python specification indicates that such sequences will generate a syntax error in future versions.",enum = { "none", "information", "warning", "error" },type = "string"},reportInvalidStubStatement = {default = "none",description = "Diagnostics for type stub statements that do not conform to PEP 484.",enum = { "none", "information", "warning", "error" },type = "string"},reportInvalidTypeVarUse = {default = "warning",description = "Diagnostics for improper use of type variables in a function signature.",enum = { "none", "information", "warning", "error" },type = "string"},reportMatchNotExhaustive = {default = "none",description = "Diagnostics for 'match' statements that do not exhaustively match all possible values.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingImports = {default = "error",description = "Diagnostics for imports that have no corresponding imported python file or type stub file.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingModuleSource = {default = "warning",description = "Diagnostics for imports that have no corresponding source file. This happens when a type stub is found, but the module source file was not found, indicating that the code may fail at runtime when using this execution environment. Type checking will be done using the type stub.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingParameterType = {default = "none",description = "Diagnostics for parameters that are missing a type annotation.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingSuperCall = {default = "none",description = "Diagnostics for missing call to parent class for inherited `__init__` methods.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingTypeArgument = {default = "none",description = "Diagnostics for generic class reference with missing type arguments.",enum = { "none", "information", "warning", "error" },type = "string"},reportMissingTypeStubs = {default = "none",description = "Diagnostics for imports that have no corresponding type stub file (either a typeshed file or a custom type stub). The type checker requires type stubs to do its best job at analysis.",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalCall = {default = "error",description = "Diagnostics for an attempt to call a variable with an Optional type.",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalContextManager = {default = "error",description = "Diagnostics for an attempt to use an Optional type as a context manager (as a parameter to a with statement).",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalIterable = {default = "error",description = "Diagnostics for an attempt to use an Optional type as an iterable value (e.g. within a for statement).",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalMemberAccess = {default = "error",description = "Diagnostics for an attempt to access a member of a variable with an Optional type.",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalOperand = {default = "error",description = "Diagnostics for an attempt to use an Optional type as an operand to a binary or unary operator (like '+', '==', 'or', 'not').",enum = { "none", "information", "warning", "error" },type = "string"},reportOptionalSubscript = {default = "error",description = "Diagnostics for an attempt to subscript (index) a variable with an Optional type.",enum = { "none", "information", "warning", "error" },type = "string"},reportOverlappingOverload = {default = "none",description = "Diagnostics for function overloads that overlap in signature and obscure each other or have incompatible return types.",enum = { "none", "information", "warning", "error" },type = "string"},reportPrivateImportUsage = {default = "error",description = 'Diagnostics for incorrect usage of symbol imported from a "py.typed" module that is not re-exported from that module.',enum = { "none", "information", "warning", "error" },type = "string"},reportPrivateUsage = {default = "none",description = "Diagnostics for incorrect usage of private or protected variables or functions. Protected class members begin with a single underscore _ and can be accessed only by subclasses. Private class members begin with a double underscore but do not end in a double underscore and can be accessed only within the declaring class. Variables and functions declared outside of a class are considered private if their names start with either a single or double underscore, and they cannot be accessed outside of the declaring module.",enum = { "none", "information", "warning", "error" },type = "string"},reportPropertyTypeMismatch = {default = "none",description = "Diagnostics for property whose setter and getter have mismatched types.",enum = { "none", "information", "warning", "error" },type = "string"},reportSelfClsParameterName = {default = "warning",description = "Diagnostics for a missing or misnamed โ€œselfโ€ parameter in instance methods and โ€œclsโ€ parameter in class methods. Instance methods in metaclasses (classes that derive from โ€œtypeโ€) are allowed to use โ€œclsโ€ for instance methods.",enum = { "none", "information", "warning", "error" },type = "string"},reportTypeCommentUsage = {default = "none",description = "Diagnostics for usage of deprecated type comments.",enum = { "none", "information", "warning", "error" },type = "string"},reportTypedDictNotRequiredAccess = {default = "error",description = "Diagnostics for an attempt to access a non-required key within a TypedDict without a check for its presence.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnboundVariable = {default = "error",description = "Diagnostics for unbound and possibly unbound variables.",enum = { "none", "information", "warning", "error" },type = "string"},reportUndefinedVariable = {default = "error",description = "Diagnostics for a missing or misnamed โ€œselfโ€ parameter in instance methods and โ€œclsโ€ parameter in class methods. Instance methods in metaclasses (classes that derive from โ€œtypeโ€) are allowed to use โ€œclsโ€ for instance methods.",enum = { "none", "information", "warning", "error" },type = "string"},reportUninitializedInstanceVariable = {default = "none",description = "Diagnostics for instance variables that are not declared or initialized within class body or `__init__` method.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnknownArgumentType = {default = "none",description = "Diagnostics for call arguments for functions or methods that have an unknown type.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnknownLambdaType = {default = "none",description = "Diagnostics for input or return parameters for lambdas that have an unknown type.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnknownMemberType = {default = "none",description = "Diagnostics for class or instance variables that have an unknown type.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnknownParameterType = {default = "none",description = "Diagnostics for input or return parameters for functions or methods that have an unknown type.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnknownVariableType = {default = "none",description = "Diagnostics for variables that have an unknown type..",enum = { "none", "information", "warning", "error" },type = "string"},reportUnnecessaryCast = {default = "none",description = "Diagnostics for 'cast' calls that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnnecessaryComparison = {default = "none",description = "Diagnostics for '==' and '!=' comparisons that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnnecessaryIsInstance = {default = "none",description = "Diagnostics for 'isinstance' or 'issubclass' calls where the result is statically determined to be always true. Such calls are often indicative of a programming error.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnnecessaryTypeIgnoreComment = {default = "none",description = "Diagnostics for '# type: ignore' comments that have no effect.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnsupportedDunderAll = {default = "warning",description = "Diagnostics for unsupported operations performed on __all__.",enum = { "none", "information", "warning", "error" },type = "string"},reportUntypedBaseClass = {default = "none",description = "Diagnostics for base classes whose type cannot be determined statically. These obscure the class type, defeating many type analysis features.",enum = { "none", "information", "warning", "error" },type = "string"},reportUntypedClassDecorator = {default = "none",description = "Diagnostics for class decorators that have no type annotations. These obscure the class type, defeating many type analysis features.",enum = { "none", "information", "warning", "error" },type = "string"},reportUntypedFunctionDecorator = {default = "none",description = "Diagnostics for function decorators that have no type annotations. These obscure the function type, defeating many type analysis features.",enum = { "none", "information", "warning", "error" },type = "string"},reportUntypedNamedTuple = {default = "none",description = "Diagnostics when โ€œnamedtupleโ€ is used rather than โ€œNamedTupleโ€. The former contains no type information, whereas the latter does.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedCallResult = {default = "none",description = "Diagnostics for call expressions whose results are not consumed and are not None.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedClass = {default = "none",description = "Diagnostics for a class with a private name (starting with an underscore) that is not accessed.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedCoroutine = {default = "error",description = "Diagnostics for call expressions that return a Coroutine and whose results are not consumed.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedExpression = {default = "warning",description = "Diagnostics for simple expressions whose value is not used in any way.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedFunction = {default = "none",description = "Diagnostics for a function or method with a private name (starting with an underscore) that is not accessed.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedImport = {default = "none",description = "Diagnostics for an imported symbol that is not referenced within that file.",enum = { "none", "information", "warning", "error" },type = "string"},reportUnusedVariable = {default = "none",description = "Diagnostics for a variable that is not accessed.",enum = { "none", "information", "warning", "error" },type = "string"},reportWildcardImportFromLibrary = {default = "warning",description = "Diagnostics for an wildcard import from an external library.",enum = { "none", "information", "warning", "error" },type = "string"}},scope = "resource",type = "object"},["python.analysis.extraPaths"] = {default = {},description = "Additional import search resolution paths",items = {type = "string"},scope = "resource",type = "array"},["python.analysis.logLevel"] = {default = "Information",description = "Specifies the level of logging for the Output panel",enum = { "Error", "Warning", "Information", "Trace" },type = "string"},["python.analysis.stubPath"] = {default = "typings",description = "Path to directory containing custom type stub files.",scope = "resource",type = "string"},["python.analysis.typeCheckingMode"] = {default = "basic",description = "Defines the default rule set for type checking.",enum = { "off", "basic", "strict" },scope = "resource",type = "string"},["python.analysis.typeshedPaths"] = {default = {},description = "Paths to look for typeshed modules.",items = {type = "string"},scope = "resource",type = "array"},["python.analysis.useLibraryCodeForTypes"] = {default = false,description = "Use library implementations to extract type information when type stub is not present.",scope = "resource",type = "boolean"},["python.pythonPath"] = {default = "python",description = "Path to Python, you can use a custom version of Python.",scope = "resource",type = "string"},["python.venvPath"] = {default = "",description = "Path to folder with a list of Virtual Environments.",scope = "resource",type = "string"}},title = "Pyright",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/python-lsp-server.lua b/lua/mason-schemas/lsp/python-lsp-server.lua new file mode 100644 index 00000000..7ec31106 --- /dev/null +++ b/lua/mason-schemas/lsp/python-lsp-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {["$schema"] = "http://json-schema.org/draft-07/schema#",description = "This server can be configured using `workspace/didChangeConfiguration` method. Each configuration option is described below:",properties = {["pylsp.configurationSources"] = {default = { "pycodestyle" },description = "List of configuration sources to use.",items = {enum = { "pycodestyle", "pyflakes" },type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.autopep8.enabled"] = {default = true,description = "Enable or disable the plugin (disabling required to use `yapf`).",type = "boolean"},["pylsp.plugins.flake8.config"] = {default = vim.NIL,description = "Path to the config file that will be the authoritative config source.",type = { "string", "null" }},["pylsp.plugins.flake8.enabled"] = {default = false,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.flake8.exclude"] = {default = {},description = "List of files or directories to exclude.",items = {type = "string"},type = "array"},["pylsp.plugins.flake8.executable"] = {default = "flake8",description = "Path to the flake8 executable.",type = "string"},["pylsp.plugins.flake8.filename"] = {default = vim.NIL,description = "Only check for filenames matching the patterns in this list.",type = { "string", "null" }},["pylsp.plugins.flake8.hangClosing"] = {default = vim.NIL,description = "Hang closing bracket instead of matching indentation of opening bracket's line.",type = { "boolean", "null" }},["pylsp.plugins.flake8.ignore"] = {default = {},description = "List of errors and warnings to ignore (or skip).",items = {type = "string"},type = "array"},["pylsp.plugins.flake8.indentSize"] = {default = vim.NIL,description = "Set indentation spaces.",type = { "integer", "null" }},["pylsp.plugins.flake8.maxLineLength"] = {default = vim.NIL,description = "Maximum allowed line length for the entirety of this run.",type = { "integer", "null" }},["pylsp.plugins.flake8.perFileIgnores"] = {default = {},description = 'A pairing of filenames and violation codes that defines which violations to ignore in a particular file, for example: `["file_path.py:W305,W304"]`).',items = {type = "string"},type = { "array" }},["pylsp.plugins.flake8.select"] = {default = vim.NIL,description = "List of errors and warnings to enable.",items = {type = "string"},type = { "array", "null" },uniqueItems = true},["pylsp.plugins.jedi.env_vars"] = {default = vim.NIL,description = "Define environment variables for jedi.Script and Jedi.names.",type = { "object", "null" }},["pylsp.plugins.jedi.environment"] = {default = vim.NIL,description = "Define environment for jedi.Script and Jedi.names.",type = { "string", "null" }},["pylsp.plugins.jedi.extra_paths"] = {default = {},description = "Define extra paths for jedi.Script.",items = {type = "string"},type = "array"},["pylsp.plugins.jedi_completion.cache_for"] = {default = { "pandas", "numpy", "tensorflow", "matplotlib" },description = "Modules for which labels and snippets should be cached.",items = {type = "string"},type = "array"},["pylsp.plugins.jedi_completion.eager"] = {default = false,description = "Resolve documentation and detail eagerly.",type = "boolean"},["pylsp.plugins.jedi_completion.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_completion.fuzzy"] = {default = false,description = "Enable fuzzy when requesting autocomplete.",type = "boolean"},["pylsp.plugins.jedi_completion.include_class_objects"] = {default = true,description = "Adds class objects as a separate completion item.",type = "boolean"},["pylsp.plugins.jedi_completion.include_params"] = {default = true,description = "Auto-completes methods and classes with tabstops for each parameter.",type = "boolean"},["pylsp.plugins.jedi_completion.resolve_at_most"] = {default = 25,description = "How many labels and snippets (at most) should be resolved?",type = "number"},["pylsp.plugins.jedi_definition.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_definition.follow_builtin_imports"] = {default = true,description = "If follow_imports is True will decide if it follow builtin imports.",type = "boolean"},["pylsp.plugins.jedi_definition.follow_imports"] = {default = true,description = "The goto call will follow imports.",type = "boolean"},["pylsp.plugins.jedi_hover.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_references.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_signature_help.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_symbols.all_scopes"] = {default = true,description = "If True lists the names of all scopes instead of only the module namespace.",type = "boolean"},["pylsp.plugins.jedi_symbols.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.jedi_symbols.include_import_symbols"] = {default = true,description = "If True includes symbols imported from other libraries.",type = "boolean"},["pylsp.plugins.mccabe.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.mccabe.threshold"] = {default = 15,description = "The minimum threshold that triggers warnings about cyclomatic complexity.",type = "number"},["pylsp.plugins.preload.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.preload.modules"] = {default = {},description = "List of modules to import on startup",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pycodestyle.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.pycodestyle.exclude"] = {default = {},description = "Exclude files or directories which match these patterns.",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pycodestyle.filename"] = {default = {},description = "When parsing directories, only check filenames matching these patterns.",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pycodestyle.hangClosing"] = {default = vim.NIL,description = "Hang closing bracket instead of matching indentation of opening bracket's line.",type = { "boolean", "null" }},["pylsp.plugins.pycodestyle.ignore"] = {default = {},description = "Ignore errors and warnings",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pycodestyle.indentSize"] = {default = vim.NIL,description = "Set indentation spaces.",type = { "integer", "null" }},["pylsp.plugins.pycodestyle.maxLineLength"] = {default = vim.NIL,description = "Set maximum allowed line length.",type = { "number", "null" }},["pylsp.plugins.pycodestyle.select"] = {default = {},description = "Select errors and warnings",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pydocstyle.addIgnore"] = {default = {},description = "Ignore errors and warnings in addition to the specified convention.",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pydocstyle.addSelect"] = {default = {},description = "Select errors and warnings in addition to the specified convention.",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pydocstyle.convention"] = {default = vim.NIL,description = "Choose the basic list of checked errors by specifying an existing convention.",enum = { "pep257", "numpy", vim.NIL },type = { "string", "null" }},["pylsp.plugins.pydocstyle.enabled"] = {default = false,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.pydocstyle.ignore"] = {default = {},description = "Ignore errors and warnings",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pydocstyle.match"] = {default = "(?!test_).*\\.py",description = "Check only files that exactly match the given regular expression; default is to match files that don't start with 'test_' but end with '.py'.",type = "string"},["pylsp.plugins.pydocstyle.matchDir"] = {default = "[^\\.].*",description = "Search only dirs that exactly match the given regular expression; default is to match dirs which do not begin with a dot.",type = "string"},["pylsp.plugins.pydocstyle.select"] = {default = {},description = "Select errors and warnings",items = {type = "string"},type = "array",uniqueItems = true},["pylsp.plugins.pyflakes.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.pylint.args"] = {default = {},description = "Arguments to pass to pylint.",items = {type = "string"},type = "array",uniqueItems = false},["pylsp.plugins.pylint.enabled"] = {default = false,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.pylint.executable"] = {default = vim.NIL,description = "Executable to run pylint with. Enabling this will run pylint on unsaved files via stdin. Can slow down workflow. Only works with python3.",type = { "string", "null" }},["pylsp.plugins.rope_completion.eager"] = {default = false,description = "Resolve documentation and detail eagerly.",type = "boolean"},["pylsp.plugins.rope_completion.enabled"] = {default = false,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.plugins.yapf.enabled"] = {default = true,description = "Enable or disable the plugin.",type = "boolean"},["pylsp.rope.extensionModules"] = {default = vim.NIL,description = "Builtin and c-extension modules that are allowed to be imported and inspected by rope.",type = { "null", "string" }},["pylsp.rope.ropeFolder"] = {default = vim.NIL,description = "The name of the folder in which rope stores project configurations and data. Pass `null` for not using such a folder at all.",items = {type = "string"},type = { "null", "array" },uniqueItems = true}},title = "Python Language Server Configuration",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/r-languageserver.lua b/lua/mason-schemas/lsp/r-languageserver.lua new file mode 100644 index 00000000..27e1bbd4 --- /dev/null +++ b/lua/mason-schemas/lsp/r-languageserver.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["r.lsp.args"] = {default = {},description = "The command line arguments to use when launching R Language Server",type = "array"},["r.lsp.debug"] = {default = false,description = "Debug R Language Server",type = "boolean"},["r.lsp.diagnostics"] = {default = true,description = "Enable Diagnostics",type = "boolean"},["r.lsp.lang"] = {default = "",description = "Override default LANG environment variable",type = "string"},["r.lsp.path"] = {default = "",deprecationMessage = "Will be deprecated. Use r.rpath.windows, r.rpath.mac, or r.rpath.linux instead.",description = "Path to R binary for launching Language Server",markdownDeprecationMessage = "Will be deprecated. Use `#r.rpath.windows#`, `#r.rpath.mac#`, or `#r.rpath.linux#` instead.",type = "string"},["r.lsp.use_stdio"] = {default = false,description = "Use STDIO connection instead of TCP. (Unix/macOS users only)",type = "boolean"},["r.rpath.linux"] = {default = "",description = 'Path to an R executable for Linux. Must be "vanilla" R, not radian etc.!',type = "string"},["r.rpath.mac"] = {default = "",description = 'Path to an R executable for macOS. Must be "vanilla" R, not radian etc.!',type = "string"},["r.rpath.windows"] = {default = "",description = 'Path to an R executable for Windows. Must be "vanilla" R, not radian etc.!',type = "string"}},title = "R LSP Client",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/rescript-lsp.lua b/lua/mason-schemas/lsp/rescript-lsp.lua new file mode 100644 index 00000000..abceac2a --- /dev/null +++ b/lua/mason-schemas/lsp/rescript-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["rescript.settings.askToStartBuild"] = {default = true,description = "Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running.",scope = "language-overridable",type = "boolean"},["rescript.settings.autoRunCodeAnalysis"] = {default = false,description = "Automatically start ReScript's code analysis.",type = "boolean"}},title = "ReScript",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/rome.lua b/lua/mason-schemas/lsp/rome.lua new file mode 100644 index 00000000..0d3111a3 --- /dev/null +++ b/lua/mason-schemas/lsp/rome.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["rome.analysis.enableCodeActions"] = {default = false,markdownDescription = "Allows rome to compute and provide code actions",type = "boolean"},["rome.analysis.enableDiagnostics"] = {default = false,markdownDescription = "Allows rome to compute and publish diagnostics",type = "boolean"},["rome.formatter.formatWithSyntaxErrors"] = {default = false,examples = { true, false },markdownDescription = "**BETA**: allows the formatter to format code that contains syntax errors",type = "boolean"},["rome.formatter.indentStyle"] = {default = "Tabs",enum = { "Tabs", "Spaces" },markdownEnumDescriptions = { "**BETA**: applies **tabs** while formatting", "**BETA**: applies **spaces** while formatting" },type = "string"},["rome.formatter.lineWidth"] = {default = 80,markdownDescription = "**BETA**: the max width of a single line, the code will have to fit in it",maximum = 320,minimum = 40,type = "number"},["rome.formatter.quoteStyle"] = {default = "Double",enum = { "Double", "Single" },markdownEnumDescriptions = { "**BETA**: applies **double** quotes while formatting", "**BETA**: applies **single** quotes while formatting" },type = "string"},["rome.formatter.spaceQuantity"] = {default = 2,markdownDescription = "**BETA**: applied **only** when choosing **Spaces**, it's the number of spaces applied when printing.",maximum = 12,minimum = 1,type = "number"},["rome.lspBin"] = {default = vim.NIL,markdownDescription = "The rome lsp server executable.",type = { "string", "null" }},["rome.unstable"] = {default = false,markdownDescription = "**BETA**: enables unstable features",type = "boolean"}},title = "Rome",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/rust-analyzer.lua b/lua/mason-schemas/lsp/rust-analyzer.lua new file mode 100644 index 00000000..ef392089 --- /dev/null +++ b/lua/mason-schemas/lsp/rust-analyzer.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["$generated-end"] = vim.empty_dict(),["$generated-start"] = vim.empty_dict(),["rust-analyzer.assist.expressionFillDefault"] = {default = "todo",enum = { "todo", "default" },enumDescriptions = { "Fill missing expressions with the `todo` macro", "Fill missing expressions with reasonable defaults, `new` or `default` constructors." },markdownDescription = "Placeholder expression to use for missing expressions in assists.",type = "string"},["rust-analyzer.cachePriming.enable"] = {default = true,markdownDescription = "Warm up caches on project load.",type = "boolean"},["rust-analyzer.cachePriming.numThreads"] = {default = 0,markdownDescription = "How many worker threads to handle priming caches. The default `0` means to pick automatically.",maximum = 255,minimum = 0,type = "number"},["rust-analyzer.cargo.autoreload"] = {default = true,markdownDescription = "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` or `.cargo/config.toml` changes.",type = "boolean"},["rust-analyzer.cargo.buildScripts.enable"] = {default = true,markdownDescription = "Run build scripts (`build.rs`) for more precise code analysis.",type = "boolean"},["rust-analyzer.cargo.buildScripts.overrideCommand"] = {default = vim.NIL,items = {type = "string"},markdownDescription = "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefore include `--message-format=json` or a similar\noption.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets\n```\n.",type = { "null", "array" }},["rust-analyzer.cargo.buildScripts.useRustcWrapper"] = {default = true,markdownDescription = "Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to\navoid checking unnecessary things.",type = "boolean"},["rust-analyzer.cargo.features"] = {anyOf = { {enum = { "all" },enumDescriptions = { "Pass `--all-features` to cargo" },type = "string"}, {items = {type = "string"},type = "array"} },default = {},markdownDescription = 'List of features to activate.\n\nSet this to `"all"` to pass `--all-features` to cargo.'},["rust-analyzer.cargo.noDefaultFeatures"] = {default = false,markdownDescription = "Whether to pass `--no-default-features` to cargo.",type = "boolean"},["rust-analyzer.cargo.noSysroot"] = {default = false,markdownDescription = "Internal config for debugging, disables loading of sysroot crates.",type = "boolean"},["rust-analyzer.cargo.target"] = {default = vim.NIL,markdownDescription = "Compilation target override (target triple).",type = { "null", "string" }},["rust-analyzer.cargo.unsetTest"] = {default = { "core" },items = {type = "string"},markdownDescription = "Unsets `#[cfg(test)]` for the specified crates.",type = "array"},["rust-analyzer.cargoRunner"] = {default = vim.NIL,description = "Custom cargo runner extension ID.",type = { "null", "string" }},["rust-analyzer.checkOnSave.allTargets"] = {default = true,markdownDescription = "Check all targets and tests (`--all-targets`).",type = "boolean"},["rust-analyzer.checkOnSave.command"] = {default = "check",markdownDescription = "Cargo command to use for `cargo check`.",type = "string"},["rust-analyzer.checkOnSave.enable"] = {default = true,markdownDescription = "Run specified `cargo check` command for diagnostics on save.",type = "boolean"},["rust-analyzer.checkOnSave.extraArgs"] = {default = {},items = {type = "string"},markdownDescription = "Extra arguments for `cargo check`.",type = "array"},["rust-analyzer.checkOnSave.features"] = {anyOf = { {enum = { "all" },enumDescriptions = { "Pass `--all-features` to cargo" },type = "string"}, {items = {type = "string"},type = "array"}, {type = "null"} },default = vim.NIL,markdownDescription = 'List of features to activate. Defaults to\n`#rust-analyzer.cargo.features#`.\n\nSet to `"all"` to pass `--all-features` to Cargo.'},["rust-analyzer.checkOnSave.noDefaultFeatures"] = {default = vim.NIL,markdownDescription = "Whether to pass `--no-default-features` to Cargo. Defaults to\n`#rust-analyzer.cargo.noDefaultFeatures#`.",type = { "null", "boolean" }},["rust-analyzer.checkOnSave.overrideCommand"] = {default = vim.NIL,items = {type = "string"},markdownDescription = "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefor include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",type = { "null", "array" }},["rust-analyzer.checkOnSave.target"] = {default = vim.NIL,markdownDescription = "Check for a specific target. Defaults to\n`#rust-analyzer.cargo.target#`.",type = { "null", "string" }},["rust-analyzer.completion.autoimport.enable"] = {default = true,markdownDescription = "Toggles the additional completions that automatically add imports when completed.\nNote that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.",type = "boolean"},["rust-analyzer.completion.autoself.enable"] = {default = true,markdownDescription = "Toggles the additional completions that automatically show method calls and field accesses\nwith `self` prefixed to them when inside a method.",type = "boolean"},["rust-analyzer.completion.callable.snippets"] = {default = "fill_arguments",enum = { "fill_arguments", "add_parentheses", "none" },enumDescriptions = { "Add call parentheses and pre-fill arguments.", "Add call parentheses.", "Do no snippet completions for callables." },markdownDescription = "Whether to add parenthesis and argument snippets when completing function.",type = "string"},["rust-analyzer.completion.postfix.enable"] = {default = true,markdownDescription = "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",type = "boolean"},["rust-analyzer.completion.privateEditable.enable"] = {default = false,markdownDescription = "Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.",type = "boolean"},["rust-analyzer.completion.snippets.custom"] = {default = {["Arc::new"] = {body = "Arc::new(${receiver})",description = "Put the expression into an `Arc`",postfix = "arc",requires = "std::sync::Arc",scope = "expr"},["Box::pin"] = {body = "Box::pin(${receiver})",description = "Put the expression into a pinned `Box`",postfix = "pinbox",requires = "std::boxed::Box",scope = "expr"},Err = {body = "Err(${receiver})",description = "Wrap the expression in a `Result::Err`",postfix = "err",scope = "expr"},Ok = {body = "Ok(${receiver})",description = "Wrap the expression in a `Result::Ok`",postfix = "ok",scope = "expr"},["Rc::new"] = {body = "Rc::new(${receiver})",description = "Put the expression into an `Rc`",postfix = "rc",requires = "std::rc::Rc",scope = "expr"},Some = {body = "Some(${receiver})",description = "Wrap the expression in an `Option::Some`",postfix = "some",scope = "expr"}},markdownDescription = "Custom completion snippets.",type = "object"},["rust-analyzer.debug.engine"] = {default = "auto",description = "Preferred debug engine.",enum = { "auto", "vadimcn.vscode-lldb", "ms-vscode.cpptools" },markdownEnumDescriptions = { "First try to use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb), if it's not installed try to use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).", "Use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)", "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)" },type = "string"},["rust-analyzer.debug.engineSettings"] = {default = vim.empty_dict(),markdownDescription = 'Optional settings passed to the debug engine. Example: `{ "lldb": { "terminal":"external"} }`',type = "object"},["rust-analyzer.debug.openDebugPane"] = {default = false,markdownDescription = "Whether to open up the `Debug Panel` on debugging start.",type = "boolean"},["rust-analyzer.debug.sourceFileMap"] = {const = "auto",default = {["/rustc/"] = "${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust"},description = "Optional source file mappings passed to the debug engine.",type = { "object", "string" }},["rust-analyzer.diagnostics.disabled"] = {default = {},items = {type = "string"},markdownDescription = "List of rust-analyzer diagnostics to disable.",type = "array",uniqueItems = true},["rust-analyzer.diagnostics.enable"] = {default = true,markdownDescription = "Whether to show native rust-analyzer diagnostics.",type = "boolean"},["rust-analyzer.diagnostics.experimental.enable"] = {default = false,markdownDescription = "Whether to show experimental rust-analyzer diagnostics that might\nhave more false positives than usual.",type = "boolean"},["rust-analyzer.diagnostics.remapPrefix"] = {default = vim.empty_dict(),markdownDescription = "Map of prefixes to be substituted when parsing diagnostic file paths.\nThis should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.",type = "object"},["rust-analyzer.diagnostics.warningsAsHint"] = {default = {},items = {type = "string"},markdownDescription = "List of warnings that should be displayed with hint severity.\n\nThe warnings will be indicated by faded text or three dots in code\nand will not show up in the `Problems Panel`.",type = "array"},["rust-analyzer.diagnostics.warningsAsInfo"] = {default = {},items = {type = "string"},markdownDescription = "List of warnings that should be displayed with info severity.\n\nThe warnings will be indicated by a blue squiggly underline in code\nand a blue icon in the `Problems Panel`.",type = "array"},["rust-analyzer.files.excludeDirs"] = {default = {},items = {type = "string"},markdownDescription = "These directories will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",type = "array"},["rust-analyzer.files.watcher"] = {default = "client",markdownDescription = "Controls file watching implementation.",type = "string"},["rust-analyzer.highlightRelated.breakPoints.enable"] = {default = true,markdownDescription = "Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.",type = "boolean"},["rust-analyzer.highlightRelated.exitPoints.enable"] = {default = true,markdownDescription = "Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).",type = "boolean"},["rust-analyzer.highlightRelated.references.enable"] = {default = true,markdownDescription = "Enables highlighting of related references while the cursor is on any identifier.",type = "boolean"},["rust-analyzer.highlightRelated.yieldPoints.enable"] = {default = true,markdownDescription = "Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.",type = "boolean"},["rust-analyzer.hover.actions.debug.enable"] = {default = true,markdownDescription = "Whether to show `Debug` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",type = "boolean"},["rust-analyzer.hover.actions.enable"] = {default = true,markdownDescription = "Whether to show HoverActions in Rust files.",type = "boolean"},["rust-analyzer.hover.actions.gotoTypeDef.enable"] = {default = true,markdownDescription = "Whether to show `Go to Type Definition` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",type = "boolean"},["rust-analyzer.hover.actions.implementations.enable"] = {default = true,markdownDescription = "Whether to show `Implementations` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",type = "boolean"},["rust-analyzer.hover.actions.references.enable"] = {default = false,markdownDescription = "Whether to show `References` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",type = "boolean"},["rust-analyzer.hover.actions.run.enable"] = {default = true,markdownDescription = "Whether to show `Run` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",type = "boolean"},["rust-analyzer.hover.documentation.enable"] = {default = true,markdownDescription = "Whether to show documentation on hover.",type = "boolean"},["rust-analyzer.hover.links.enable"] = {default = true,markdownDescription = "Use markdown syntax for links in hover.",type = "boolean"},["rust-analyzer.imports.granularity.enforce"] = {default = false,markdownDescription = "Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.",type = "boolean"},["rust-analyzer.imports.granularity.group"] = {default = "crate",enum = { "preserve", "crate", "module", "item" },enumDescriptions = { "Do not change the granularity of any imports and preserve the original structure written by the developer.", "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.", "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.", "Flatten imports so that each has its own use statement." },markdownDescription = "How imports should be grouped into use statements.",type = "string"},["rust-analyzer.imports.group.enable"] = {default = true,markdownDescription = "Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines.",type = "boolean"},["rust-analyzer.imports.merge.glob"] = {default = true,markdownDescription = "Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.",type = "boolean"},["rust-analyzer.imports.prefix"] = {default = "plain",enum = { "plain", "self", "crate" },enumDescriptions = { "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.", "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item. Prefixes `self` in front of the path if it starts with a module.", "Force import paths to be absolute by always starting them with `crate` or the extern crate name they come from." },markdownDescription = "The path structure for newly inserted paths to use.",type = "string"},["rust-analyzer.inlayHints.bindingModeHints.enable"] = {default = false,markdownDescription = "Whether to show inlay type hints for binding modes.",type = "boolean"},["rust-analyzer.inlayHints.chainingHints.enable"] = {default = true,markdownDescription = "Whether to show inlay type hints for method chains.",type = "boolean"},["rust-analyzer.inlayHints.closingBraceHints.enable"] = {default = true,markdownDescription = "Whether to show inlay hints after a closing `}` to indicate what item it belongs to.",type = "boolean"},["rust-analyzer.inlayHints.closingBraceHints.minLines"] = {default = 25,markdownDescription = "Minimum number of lines required before the `}` until the hint is shown (set to 0 or 1\nto always show them).",minimum = 0,type = "integer"},["rust-analyzer.inlayHints.closureReturnTypeHints.enable"] = {default = "never",enum = { "always", "never", "with_block" },enumDescriptions = { "Always show type hints for return types of closures.", "Never show type hints for return types of closures.", "Only show type hints for return types of closures with blocks." },markdownDescription = "Whether to show inlay type hints for return types of closures.",type = "string"},["rust-analyzer.inlayHints.lifetimeElisionHints.enable"] = {default = "never",enum = { "always", "never", "skip_trivial" },enumDescriptions = { "Always show lifetime elision hints.", "Never show lifetime elision hints.", "Only show lifetime elision hints if a return type is involved." },markdownDescription = "Whether to show inlay type hints for elided lifetimes in function signatures.",type = "string"},["rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames"] = {default = false,markdownDescription = "Whether to prefer using parameter names as the name for elided lifetime hints if possible.",type = "boolean"},["rust-analyzer.inlayHints.maxLength"] = {default = 25,markdownDescription = "Maximum length for inlay hints. Set to null to have an unlimited length.",minimum = 0,type = { "null", "integer" }},["rust-analyzer.inlayHints.parameterHints.enable"] = {default = true,markdownDescription = "Whether to show function parameter name inlay hints at the call\nsite.",type = "boolean"},["rust-analyzer.inlayHints.reborrowHints.enable"] = {default = "never",enum = { "always", "never", "mutable" },enumDescriptions = { "Always show reborrow hints.", "Never show reborrow hints.", "Only show mutable reborrow hints." },markdownDescription = "Whether to show inlay type hints for compiler inserted reborrows.",type = "string"},["rust-analyzer.inlayHints.renderColons"] = {default = true,markdownDescription = "Whether to render leading colons for type hints, and trailing colons for parameter hints.",type = "boolean"},["rust-analyzer.inlayHints.typeHints.enable"] = {default = true,markdownDescription = "Whether to show inlay type hints for variables.",type = "boolean"},["rust-analyzer.inlayHints.typeHints.hideClosureInitialization"] = {default = false,markdownDescription = "Whether to hide inlay type hints for `let` statements that initialize to a closure.\nOnly applies to closures with blocks, same as `#rust-analyzer.inlayHints.closureReturnTypeHints.enable#`.",type = "boolean"},["rust-analyzer.inlayHints.typeHints.hideNamedConstructor"] = {default = false,markdownDescription = "Whether to hide inlay type hints for constructors.",type = "boolean"},["rust-analyzer.joinLines.joinAssignments"] = {default = true,markdownDescription = "Join lines merges consecutive declaration and initialization of an assignment.",type = "boolean"},["rust-analyzer.joinLines.joinElseIf"] = {default = true,markdownDescription = "Join lines inserts else between consecutive ifs.",type = "boolean"},["rust-analyzer.joinLines.removeTrailingComma"] = {default = true,markdownDescription = "Join lines removes trailing commas.",type = "boolean"},["rust-analyzer.joinLines.unwrapTrivialBlock"] = {default = true,markdownDescription = "Join lines unwraps trivial blocks.",type = "boolean"},["rust-analyzer.lens.debug.enable"] = {default = true,markdownDescription = "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.enable"] = {default = true,markdownDescription = "Whether to show CodeLens in Rust files.",type = "boolean"},["rust-analyzer.lens.forceCustomCommands"] = {default = true,markdownDescription = "Internal config: use custom client-side commands even when the\nclient doesn't set the corresponding capability.",type = "boolean"},["rust-analyzer.lens.implementations.enable"] = {default = true,markdownDescription = "Whether to show `Implementations` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.references.adt.enable"] = {default = false,markdownDescription = "Whether to show `References` lens for Struct, Enum, and Union.\nOnly applies when `#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.references.enumVariant.enable"] = {default = false,markdownDescription = "Whether to show `References` lens for Enum Variants.\nOnly applies when `#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.references.method.enable"] = {default = false,markdownDescription = "Whether to show `Method References` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.references.trait.enable"] = {default = false,markdownDescription = "Whether to show `References` lens for Trait.\nOnly applies when `#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.lens.run.enable"] = {default = true,markdownDescription = "Whether to show `Run` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",type = "boolean"},["rust-analyzer.linkedProjects"] = {default = {},items = {type = { "string", "object" }},markdownDescription = "Disable project auto-discovery in favor of explicitly specified set\nof projects.\n\nElements must be paths pointing to `Cargo.toml`,\n`rust-project.json`, or JSON objects in `rust-project.json` format.",type = "array"},["rust-analyzer.lru.capacity"] = {default = vim.NIL,markdownDescription = "Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.",minimum = 0,type = { "null", "integer" }},["rust-analyzer.notifications.cargoTomlNotFound"] = {default = true,markdownDescription = "Whether to show `can't find Cargo.toml` error message.",type = "boolean"},["rust-analyzer.procMacro.attributes.enable"] = {default = true,markdownDescription = "Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.",type = "boolean"},["rust-analyzer.procMacro.enable"] = {default = true,markdownDescription = "Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable#`.",type = "boolean"},["rust-analyzer.procMacro.ignored"] = {default = vim.empty_dict(),markdownDescription = "These proc-macros will be ignored when trying to expand them.\n\nThis config takes a map of crate names with the exported proc-macro names to ignore as values.",type = "object"},["rust-analyzer.procMacro.server"] = {default = vim.NIL,markdownDescription = "Internal config, path to proc-macro server executable (typically,\nthis is rust-analyzer itself, but we override this in tests).",type = { "null", "string" }},["rust-analyzer.restartServerOnConfigChange"] = {default = false,markdownDescription = "Whether to restart the server automatically when certain settings that require a restart are changed.",type = "boolean"},["rust-analyzer.runnableEnv"] = {anyOf = { {type = "null"}, {items = {properties = {env = {description = 'Variables in form of { "key": "value"}',type = "object"},mask = {description = "Runnable name mask",type = "string"}},type = "object"},type = "array"}, {description = 'Variables in form of { "key": "value"}',type = "object"} },default = vim.NIL,markdownDescription = "Environment variables passed to the runnable launched using `Test` or `Debug` lens or `rust-analyzer.run` command."},["rust-analyzer.runnables.command"] = {default = vim.NIL,markdownDescription = "Command to be executed instead of 'cargo' for runnables.",type = { "null", "string" }},["rust-analyzer.runnables.extraArgs"] = {default = {},items = {type = "string"},markdownDescription = "Additional arguments to be passed to cargo for runnables such as\ntests or binaries. For example, it may be `--release`.",type = "array"},["rust-analyzer.rustc.source"] = {default = vim.NIL,markdownDescription = 'Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private\nprojects, or "discover" to try to automatically find it if the `rustc-dev` component\nis installed.\n\nAny project which uses rust-analyzer with the rustcPrivate\ncrates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.\n\nThis option does not take effect until rust-analyzer is restarted.',type = { "null", "string" }},["rust-analyzer.rustfmt.extraArgs"] = {default = {},items = {type = "string"},markdownDescription = "Additional arguments to `rustfmt`.",type = "array"},["rust-analyzer.rustfmt.overrideCommand"] = {default = vim.NIL,items = {type = "string"},markdownDescription = "Advanced option, fully override the command rust-analyzer uses for\nformatting.",type = { "null", "array" }},["rust-analyzer.rustfmt.rangeFormatting.enable"] = {default = false,markdownDescription = "Enables the use of rustfmt's unstable range formatting command for the\n`textDocument/rangeFormatting` request. The rustfmt option is unstable and only\navailable on a nightly build.",type = "boolean"},["rust-analyzer.semanticHighlighting.strings.enable"] = {default = true,markdownDescription = "Use semantic tokens for strings.\n\nIn some editors (e.g. vscode) semantic tokens override other highlighting grammars.\nBy disabling semantic tokens for strings, other grammars can be used to highlight\ntheir contents.",type = "boolean"},["rust-analyzer.server.extraEnv"] = {additionalProperties = {type = { "string", "number" }},default = vim.NIL,markdownDescription = "Extra environment variables that will be passed to the rust-analyzer executable. Useful for passing e.g. `RA_LOG` for debugging.",type = { "null", "object" }},["rust-analyzer.server.path"] = {default = vim.NIL,markdownDescription = "Path to rust-analyzer executable (points to bundled binary by default).",scope = "machine-overridable",type = { "null", "string" }},["rust-analyzer.signatureInfo.detail"] = {default = "full",enum = { "full", "parameters" },enumDescriptions = { "Show the entire signature.", "Show only the parameters." },markdownDescription = "Show full signature of the callable. Only shows parameters if disabled.",type = "string"},["rust-analyzer.signatureInfo.documentation.enable"] = {default = true,markdownDescription = "Show documentation.",type = "boolean"},["rust-analyzer.trace.extension"] = {default = false,description = "Enable logging of VS Code extensions itself.",type = "boolean"},["rust-analyzer.trace.server"] = {default = "off",description = "Trace requests to the rust-analyzer (this is usually overly verbose and not recommended for regular users).",enum = { "off", "messages", "verbose" },enumDescriptions = { "No traces", "Error only", "Full log" },scope = "window",type = "string"},["rust-analyzer.typing.autoClosingAngleBrackets.enable"] = {default = false,markdownDescription = "Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.",type = "boolean"},["rust-analyzer.workspace.symbol.search.kind"] = {default = "only_types",enum = { "only_types", "all_symbols" },enumDescriptions = { "Search for types only.", "Search for all symbols kinds." },markdownDescription = "Workspace symbol search kind.",type = "string"},["rust-analyzer.workspace.symbol.search.limit"] = {default = 128,markdownDescription = "Limits the number of items returned from a workspace symbol search (Defaults to 128).\nSome clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.\nOther clients requires all results upfront and might require a higher limit.",minimum = 0,type = "integer"},["rust-analyzer.workspace.symbol.search.scope"] = {default = "workspace",enum = { "workspace", "workspace_and_dependencies" },enumDescriptions = { "Search in current workspace only.", "Search in current workspace and dependencies." },markdownDescription = "Workspace symbol search scope.",type = "string"}},title = "Rust Analyzer",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/solargraph.lua b/lua/mason-schemas/lsp/solargraph.lua new file mode 100644 index 00000000..7cbb67fb --- /dev/null +++ b/lua/mason-schemas/lsp/solargraph.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["solargraph.autoformat"] = {default = false,description = "Enable automatic formatting while typing (WARNING: experimental)",enum = { true, false },type = { "boolean" }},["solargraph.bundlerPath"] = {default = "bundle",description = "Path to the bundle executable, defaults to 'bundle'. Needs to be an absolute path for the 'bundle' exec/shim",scope = "resource",type = "string"},["solargraph.checkGemVersion"] = {default = true,description = "Automatically check if a new version of the Solargraph gem is available.",enum = { true, false },type = "boolean"},["solargraph.commandPath"] = {default = "solargraph",description = "Path to the solargraph command. Set this to an absolute path to select from multiple installed Ruby versions.",scope = "resource",type = "string"},["solargraph.completion"] = {default = true,description = "Enable completion",enum = { true, false },type = { "boolean" }},["solargraph.definitions"] = {default = true,description = "Enable definitions (go to, etc.)",enum = { true, false },type = { "boolean" }},["solargraph.diagnostics"] = {default = false,description = "Enable diagnostics",enum = { true, false },type = { "boolean" }},["solargraph.externalServer"] = {default = {host = "localhost",port = 7658},description = "The host and port to use for external transports. (Ignored for stdio and socket transports.)",properties = {host = {default = "localhost",type = "string"},port = {default = 7658,type = "integer"}},type = "object"},["solargraph.folding"] = {default = true,description = "Enable folding ranges",type = "boolean"},["solargraph.formatting"] = {default = false,description = "Enable document formatting",enum = { true, false },type = { "boolean" }},["solargraph.hover"] = {default = true,description = "Enable hover",enum = { true, false },type = { "boolean" }},["solargraph.logLevel"] = {default = "warn",description = "Level of debug info to log. `warn` is least and `debug` is most.",enum = { "warn", "info", "debug" },type = "string"},["solargraph.references"] = {default = true,description = "Enable finding references",enum = { true, false },type = { "boolean" }},["solargraph.rename"] = {default = true,description = "Enable symbol renaming",enum = { true, false },type = { "boolean" }},["solargraph.symbols"] = {default = true,description = "Enable symbols",enum = { true, false },type = { "boolean" }},["solargraph.transport"] = {default = "socket",description = "The type of transport to use.",enum = { "socket", "stdio", "external" },type = "string"},["solargraph.useBundler"] = {default = false,description = "Use `bundle exec` to run solargraph. (If this is true, the solargraph.commandPath setting is ignored.)",type = "boolean"}},title = "Solargraph settings for Ruby"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/sorbet.lua b/lua/mason-schemas/lsp/sorbet.lua new file mode 100644 index 00000000..7c611020 --- /dev/null +++ b/lua/mason-schemas/lsp/sorbet.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["sorbet.configFilePatterns"] = {default = { "**/sorbet/config", "**/Gemfile", "**/Gemfile.lock" },description = "List of workspace file patterns that contribute to Sorbet's configuration. Changes to any of those files should trigger a restart of any actively running Sorbet language server.",items = {type = "string"},type = "array"},["sorbet.enabled"] = {description = "Enable Sorbet Ruby IDE features",type = "boolean"},["sorbet.lspConfigs"] = {default = { {command = { "bundle", "exec", "srb", "typecheck", "--lsp" },cwd = "${workspaceFolder}",description = "Stable Sorbet Ruby IDE features",id = "stable",name = "Sorbet"}, {command = { "bundle", "exec", "srb", "typecheck", "--lsp", "--enable-all-beta-lsp-features" },cwd = "${workspaceFolder}",description = "Beta Sorbet Ruby IDE features",id = "beta",name = "Sorbet (Beta)"}, {command = { "bundle", "exec", "srb", "typecheck", "--lsp", "--enable-all-experimental-lsp-features" },cwd = "${workspaceFolder}",description = "Experimental Sorbet Ruby IDE features (warning: crashy, for developers only)",id = "experimental",name = "Sorbet (Experimental)"} },description = "Standard Ruby LSP configurations. If you commit your VSCode settings to source control, you probably want to commit *this* setting, not `sorbet.userLspConfigs`.",items = {properties = {command = {description = "Full command line to invoke sorbet",items = {type = "string"},minItems = 1,type = "array"},cwd = {default = "${workspaceFolder}",description = "Current working directory when launching sorbet",format = "uri-reference",type = "string"},description = {description = "Long-form human-readable description of configuration",type = "string"},id = {description = "See `sorbet.selectedLspConfigId`",type = "string"},name = {description = "Short-form human-readable label for configuration",type = "string"}},required = { "id", "description", "command" },type = "object"},type = "array"},["sorbet.revealOutputOnError"] = {default = false,description = "Show the extension output window on errors.",type = "boolean"},["sorbet.selectedLspConfigId"] = {description = "The default configuration to use from `sorbet.userLspConfigs` or `sorbet.lspConfigs`. If unset, defaults to the first item in `sorbet.userLspConfigs` or `sorbet.lspConfigs`.",type = "string"},["sorbet.userLspConfigs"] = {default = {},description = "Custom user LSP configurations that supplement `sorbet.lspConfigs` (and override configurations with the same id). If you commit your VSCode settings to source control, you probably want to commit `sorbet.lspConfigs`, not this value.",items = {default = {command = { "bundle", "exec", "srb", "typecheck", "--your", "--flags", "--here" },cwd = "${workspaceFolder}",description = "A longer description of this Sorbet Configuration for use in hover text",id = "my-custom-configuration",name = "My Custom Sorbet Configuration"},properties = {command = {description = "Full command line to invoke sorbet",items = {type = "string"},minItems = 1,type = "array"},cwd = {default = "${workspaceFolder}",description = "Current working directory when launching sorbet",format = "uri-reference",type = "string"},description = {description = "Long-form human-readable description of configuration",type = "string"},id = {description = "See `sorbet.selectedLspConfigId`",type = "string"},name = {description = "Short-form human-readable label for configuration",type = "string"}},required = { "id", "description", "command" },type = "object"},type = "array"}},title = "Sorbet"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/stylelint-lsp.lua b/lua/mason-schemas/lsp/stylelint-lsp.lua new file mode 100644 index 00000000..3612361c --- /dev/null +++ b/lua/mason-schemas/lsp/stylelint-lsp.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["stylelintplus.autoFixOnFormat"] = {default = false,description = "Auto-fix on format request.",scope = "resource",type = "boolean"},["stylelintplus.autoFixOnSave"] = {default = false,description = "Auto-fix and format on save.",scope = "resource",type = "boolean"},["stylelintplus.config"] = {default = vim.NIL,description = "Stylelint config. If config and configFile are unset, stylelint will automatically look for a config file.",scope = "resource",type = "object"},["stylelintplus.configFile"] = {default = vim.NIL,description = "Stylelint config file. If config and configFile are unset, stylelint will automatically look for a config file.",scope = "resource",type = "string"},["stylelintplus.configOverrides"] = {default = vim.NIL,description = "Stylelint config overrides. These will be applied on top of the config, configFile, or auto-discovered config file loaded by stylelint.",scope = "resource",type = "object"},["stylelintplus.cssInJs"] = {default = false,description = "Run stylelint on javascript/typescript files.",scope = "window",type = "boolean"},["stylelintplus.enable"] = {default = true,description = "If false, stylelint will not validate the file.",scope = "resource",type = "boolean"},["stylelintplus.filetypes"] = {default = { "css", "less", "postcss", "sass", "scss", "sugarss", "vue", "wxss" },description = "Filetypes that coc-stylelintplus will lint.",items = {type = "string"},scope = "window",type = "array"},["stylelintplus.trace.server"] = {default = "off",description = "Capture trace messages from the server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["stylelintplus.validateOnSave"] = {default = false,description = "Validate after saving. Automatically enabled if autoFixOnSave is enabled.",scope = "resource",type = "boolean"},["stylelintplus.validateOnType"] = {default = true,description = "Validate after making changes.",scope = "resource",type = "boolean"}},title = "stylelintplus",type = "object"} \ No newline at end of file diff --git a/lua/mason-schemas/lsp/svelte-language-server.lua b/lua/mason-schemas/lsp/svelte-language-server.lua new file mode 100644 index 00000000..f39296f7 --- /dev/null +++ b/lua/mason-schemas/lsp/svelte-language-server.lua @@ -0,0 +1,3 @@ +-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. +-- stylua: ignore start +return {properties = {["svelte.ask-to-enable-ts-plugin"] = {default = true,description = "Ask on startup to enable the TypeScript plugin.",title = "Ask to enable TypeScript Svelte plugin",type = "boolean"},["svelte.enable-ts-plugin"] = {default = false,description = "Enables a TypeScript plugin which provides intellisense for Svelte files inside TS/JS files.",title = "Enable TypeScript Svelte plugin",type = "boolean"},["svelte.language-server.ls-path"] = {description = "- You normally don't set this - Path to the language server executable. If you installed the \"svelte-language-server\" npm package, it's within there at \"bin/server.js\". Path can be either relative to your workspace root or absolute. Set this only if you want to use a custom version of the language server. This will then also use the workspace version of TypeScript. This setting can only be changed in user settings for security reasons.",scope = "application",title = "Language Server Path",type = "string"},["svelte.language-server.port"] = {default = -1,description = "- You normally don't set this - At which port to spawn the language server. Can be used for attaching to the process for debugging / profiling. If you experience crashes due to \"port already in use\", try setting the port. -1 = default port is used.",title = "Language Server Port",type = "number"},["svelte.language-server.runtime"] = {description = "- You normally don't need this - Path to the node executable to use to spawn the language server. This is useful when you depend on native modules such as node-sass as without this they will run in the context of vscode, meaning node version mismatch is likely. Minimum required node version is 12.17. This setting can only be changed in user settings for security reasons.",scope = "application",title = "Language Server Runtime",type = "string"},["svelte.plugin.css.colorPresentations.enable"] = {default = true,description = "Enable color picker for CSS",title = "CSS: Color Picker",type = "boolean"},["svelte.plugin.css.completions.emmet"] = {default = true,description = "Enable emmet auto completions for CSS",title = "CSS: Include Emmet Completions",type = "boolean"},["svelte.plugin.css.completions.enable"] = {default = true,description = "Enable auto completions for CSS",title = "CSS: Auto Complete",type = "boolean"},["svelte.plugin.css.diagnostics.enable"] = {default = true,description = "Enable diagnostic messages for CSS",title = "CSS: Diagnostics",type = "boolean"},["svelte.plugin.css.documentColors.enable"] = {default = true,description = "Enable document colors for CSS",title = "CSS: Document Colors",type = "boolean"},["svelte.plugin.css.documentSymbols.enable"] = {default = true,description = "Enable document symbols for CSS",title = "CSS: Symbols in Outline",type = "boolean"},["svelte.plugin.css.enable"] = {default = true,description = "Enable the CSS plugin",title = "CSS",type = "boolean"},["svelte.plugin.css.globals"] = {default = "",description = "Which css files should be checked for global variables (`--global-var: value;`). These variables are added to the css completions. String of comma-separated file paths or globs relative to workspace root.",title = "CSS: Global Files",type = "string"},["svelte.plugin.css.hover.enable"] = {default = true,description = "Enable hover info for CSS",title = "CSS: Hover Info",type = "boolean"},["svelte.plugin.css.selectionRange.enable"] = {default = true,description = "Enable selection range for CSS",title = "CSS: SelectionRange",type = "boolean"},["svelte.plugin.html.completions.emmet"] = {default = true,description = "Enable emmet auto completions for HTML",title = "HTML: Include Emmet Completions",type = "boolean"},["svelte.plugin.html.completions.enable"] = {default = true,description = "Enable auto completions for HTML",title = "HTML: Auto Complete",type = "boolean"},["svelte.plugin.html.documentSymbols.enable"] = {default = true,description = "Enable document symbols for HTML",title = "HTML: Symbols in Outline",type = "boolean"},["svelte.plugin.html.enable"] = {default = true,description = "Enable the HTML plugin",title = "HTML",type = "boolean"},["svelte.plugin.html.hover.enable"] = {default = true,description = "Enable hover info for HTML",title = "HTML: Hover Info",type = "boolean"},["svelte.plugin.html.linkedEditing.enable"] = {default = true,description = "Enable Linked Editing for HTML",title = "HTML: Linked Editing",type = "boolean"},["svelte.plugin.html.tagComplete.enable"] = {default = true,description = "Enable HTML tag auto closing",title = "HTML: Tag Auto Closing",type = "boolean"},["svelte.plugin.svelte.codeActions.enable"] = {default = true,description = "Enable Code Actions for Svelte",title = "Svelte: Code Actions",type = "boolean"},["svelte.plugin.svelte.compilerWarnings"] = {additionalProperties = {enum = { "ignore", "error" },type = "string"},default = vim.empty_dict(),description = "Svelte compiler warning codes to ignore or to treat as errors. Example: { 'css-unused-selector': 'ignore', 'unused-export-let': 'error'}",title = "Svelte: Compiler Warnings Settings",type = "object"},["svelte.plugin.svelte.completions.enable"] = {default = true,description = "Enable auto completions for Svelte",title = "Svelte: Completions",type = "boolean"},["svelte.plugin.svelte.defaultScriptLanguage"] = {default = "none",description = "The default language to use when generating new script tags",enum = { "none", "ts" },title = "Svelte: Default Script Language",type = "string"},["svelte.plugin.svelte.diagnostics.enable"] = {default = true,description = "Enable diagnostic messages for Svelte",title = "Svelte: Diagnostics",type = "boolean"},["svelte.plugin.svelte.enable"] = {default = true,description = "Enable the Svelte plugin",title = "Svelte",type = "boolean"},["svelte.plugin.svelte.format.config.printWidth"] = {default = 80,description = "Maximum line width after which code is tried to be broken up. This is a Prettier core option. If you have the Prettier extension installed, this option is ignored and the corresponding option of that extension is used instead. This option is also ignored if there's any kind of configuration file, for example a `.prettierrc` file.",title = "Svelte Format: Print Width",type = "number"},["svelte.plugin.svelte.format.config.singleQuote"] = {default = false,description = "Use single quotes instead of double quotes, where possible. This is a Prettier core option. If you have the Prettier extension installed, this option is ignored and the corresponding option of that extension is used instead. This option is also ignored if there's any kind of configuration file, for example a `.prettierrc` file.",title = "Svelte Format: Quotes",type = "boolean"},["svelte.plugin.svelte.format.config.svelteAllowShorthand"] = {default = true,description = "Option to enable/disable component attribute shorthand if attribute name and expression are the same. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file.",title = "Svelte Format: Allow Shorthand",type = "boolean"},["svelte.plugin.svelte.format.config.svelteBracketNewLine"] = {default = true,description = "Put the `>` of a multiline element on a new line. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file.",title = "Svelte Format: Bracket New Line",type = "boolean"},["svelte.plugin.svelte.format.config.svelteIndentScriptAndStyle"] = {default = true,description = "Whether or not to indent code inside `