diff --git a/.github/workflows/autogenerate.yml b/.github/workflows/autogenerate.yml index 7e1d12507..d17d86ca8 100644 --- a/.github/workflows/autogenerate.yml +++ b/.github/workflows/autogenerate.yml @@ -13,7 +13,7 @@ jobs: - uses: rhysd/action-setup-vim@v1 with: neovim: true - version: v0.9.0 + version: v0.10.1 - name: make generate run: make generate diff --git a/.github/workflows/check-generated-code-state.yml b/.github/workflows/check-generated-code-state.yml index 40abcfe6b..3bfd4a822 100644 --- a/.github/workflows/check-generated-code-state.yml +++ b/.github/workflows/check-generated-code-state.yml @@ -14,7 +14,7 @@ jobs: - uses: rhysd/action-setup-vim@v1 with: neovim: true - version: v0.9.0 + version: v0.10.1 - name: make generate run: make generate diff --git a/README.md b/README.md index bbba2de20..b8412dbd7 100644 --- a/README.md +++ b/README.md @@ -168,225 +168,282 @@ local DEFAULT_SETTINGS = { # Available LSP servers -| Language | Server name | -| ----------------------------------- | --------------------------------- | -| All | `snyk_ls` | -| All | `typos_lsp` | -| ast-grep | `ast_grep` | -| Autoconf | `autotools_ls` | -| AWK | `awk_ls` | -| Ada | `als` | -| Angular | `angularls` | -| Ansible | `ansiblels` | -| Antlers | `antlersls` | -| Apex | `apex_ls` | -| Arduino | `arduino_language_server` | -| Assembly (GAS/NASM, GO) | `asm_lsp` | -| Astro | `astro` | -| Automake | `autotools_ls` | -| Azure Pipelines | `azure_pipelines_ls` | -| Bash | `bashls` | -| Bash | `pkgbuild_language_server` | -| Beancount | `beancount` | -| Bicep | `bicep` | -| BrighterScript | `bright_script` | -| Buf | `bufls` | -| C | `clangd` | -| C# | `csharp_ls` | -| C# [(docs)][omnisharp] | `omnisharp_mono` | -| C# [(docs)][omnisharp] | `omnisharp` | -| C++ | `clangd` | -| Cairo | `cairo_ls` | -| CMake | `cmake` | -| CMake | `neocmake` | -| COBOL | `cobol_ls` | -| CSS | `cssls` | -| CSS | `cssmodules_ls` | -| CSS | `css_variables` | -| CSS | `unocss` | -| Clarity | `clarity_lsp` | -| Clojure | `clojure_lsp` | -| CodeQL | `codeqlls` | -| Coq | `coq_lsp` | -| Crystal | `crystalline` | -| Cucumber | `cucumber_language_server` | -| Custom Elements Language Server | `custom_elements_ls` | -| Cue | `dagger` | -| Cypher | `cypher_ls` | -| Deno | `denols` | -| Dhall | `dhall_lsp_server` | -| Diagnostic (general purpose server) | `diagnosticls` | -| Dlang | `serve_d` | -| Docker | `dockerls` | -| Docker Compose | `docker_compose_language_service` | -| Dot | `dotls` | -| Drools | `drools_lsp` | -| Earthly | `earthlyls` | -| EFM (general purpose server) | `efm` | -| ESLint | `eslint` | -| Elixir | `elixirls` | -| Elixir | `lexical` | -| dprint | `dprint` | -| Elm | `elmls` | -| Ember | `ember` | -| Emmet | `emmet_language_server` | -| Emmet | `emmet_ls` | -| Erg | `erg_language_server` | -| Erlang | `elp` | -| Erlang | `erlangls` | -| F# | `fsautocomplete` | -| Facility Service Definition | `facility_language_server` | -| Fennel | `fennel_language_server` | -| Fennel | `fennel_ls` | -| Flux | `flux_lsp` | -| Foam (OpenFOAM) | `foam_ls` | -| Fortran | `fortls` | -| Glint | `glint` | -| GLSL | `glsl_analyzer` | -| GLSL | `glslls` | -| Go | `golangci_lint_ls` | -| Go | `gopls` | -| Gradle | `gradle_ls` | -| Grammarly | `grammarly` | -| GraphQL | `graphql` | -| Groovy | `groovyls` | -| HDL | `hdl_checker` | -| HTML | `html` | -| HTMX | `htmx` | -| Harper | `harper_ls` | -| Haskell | `hls` | -| Haxe | `haxe_language_server` | -| Helm | `helm_ls` | -| Hoon | `hoon_ls` | -| JSON | `jsonls` | -| JSON | `biome` | -| Java | `jdtls` | -| Java | `java_language_server` | -| JavaScript | `quick_lint_js` | -| JavaScript | `tsserver` | -| JavaScript | `vtsls` | -| JavaScript | `biome` | -| Jinja | `jinja_lsp` | -| Jsonnet | `jsonnet_ls` | -| Julia [(docs)][julials] | `julials` | -| jq | `jqls` | -| Kotlin | `kotlin_language_server` | -| LaTeX | `ltex` | -| LaTeX | `texlab` | -| Lelwel | `lelwel_ls` | -| Liquid | `shopify_theme_ls` | -| Lua | `lua_ls` | -| Luau | `luau_lsp` | -| LWC | `lwc_ls` | -| Make | `autotools_ls` | -| Markdown | `markdown_oxide` | -| Markdown | `marksman` | -| Markdown | `prosemd_lsp` | -| Markdown | `remark_ls` | -| Markdown | `vale_ls` | -| Markdown | `zk` | -| Matlab | `matlab_ls` | -| MDX | `mdx_analyzer` | -| Meson | `mesonlsp` | -| Meson (deprecated) | `swift_mesonls` | -| Metamath Zero | `mm0_ls` | -| Move | `move_analyzer` | -| Mutt | `mutt_ls` | -| Nginx | `nginx_language_server` | -| Nickel | `nickel_ls` | -| Nim | `nim_langserver` | -| Nim | `nimls` | -| Nix | `nil_ls` | -| Nix | `rnix` | -| OCaml | `ocamllsp` | -| Odin | `ols` | -| OneScript, 1C:Enterprise | `bsl_ls` | -| OpenAPI | `spectral` | -| OpenAPI | `vacuum` | -| OpenCL | `opencl_ls` | -| OpenSCAD | `openscad_lsp` | -| PHP | `intelephense` | -| PHP | `phpactor` | -| PHP | `psalm` | -| Perl | `perlnavigator` | -| Pest | `pest_ls` | -| Pico8 | `pico8_ls` | -| Powershell | `powershell_es` | -| Prisma | `prismals` | -| Puppet | `puppet` | -| PureScript | `purescriptls` | -| Python | `basedpyright` | -| Python | `jedi_language_server` | -| Python | `pyre` | -| Python | `pyright` | -| Python | `pylyzer` | -| Python | `sourcery` | -| Python [(docs)][pylsp] | `pylsp` | -| Python | `ruff` | -| Python | `ruff_lsp` | -| R | `r_language_server` | -| Raku | `raku_navigator` | -| ReScript | `rescriptls` | -| Reason | `reason_ls` | -| Rego | `regols` | -| Robot Framework | `robotframework_ls` | -| Rome | `rome` | -| Ruby | `ruby_lsp` | -| Ruby | `solargraph` | -| Ruby | `sorbet` | -| Ruby | `standardrb` | -| Ruby | `rubocop` | -| Ruby | `steep` | -| Rust | `rust_analyzer` | -| SQL | `sqlls` | -| SQL | `sqls` | -| Salt | `salt_ls` | -| Sass | `somesass_ls` | -| Shopify Theme Check | `theme_check` | -| Slint | `slint_lsp` | -| Smithy | `smithy_ls` | -| Solidity | `solang` | -| Solidity | `solc` | -| Solidity | `solidity` | -| Solidity | `solidity_ls` | -| Solidity | `solidity_ls_nomicfoundation` | -| Sphinx | `esbonio` | -| Standard ML | `millet` | -| Starlark | `bzl` | -| Starlark | `starlark_rust` | -| Stylelint | `stylelint_lsp` | -| Svelte | `svelte` | -| Stimulus | `stimulus_ls` | -| SystemVerilog | `svlangserver` | -| SystemVerilog | `svls` | -| SystemVerilog | `verible` | -| TOML | `taplo` | -| Tailwind CSS | `tailwindcss` | -| Teal | `teal_ls` | -| Templ | `templ` | -| Terraform | `terraformls` | -| Terraform | `tflint` | -| Thrift | `thriftls` | -| Twiggy | `twiggy_language_server` | -| TypeScript | `biome` | -| TypeScript | `tsserver` | -| TypeScript | `vtsls` | -| Typst | `tinymist` | -| Typst | `typst_lsp` | -| V | `v_analyzer` | -| V | `vls` | -| Vala | `vala_ls` | -| Veryl | `veryl_ls` | -| VimL | `vimls` | -| Visualforce | `visualforce_ls` | -| Vue | `volar` | -| Vue | `vuels` | -| WGSL | `wgsl_analyzer` | -| XML | `lemminx` | -| YAML | `gitlab_ci_ls` | -| YAML | `hydra_lsp` | -| YAML | `yamlls` | -| Zig | `zls` | + +| Language | Server name | +| --- | --- | +| 1ะก:Enterprise | [`bsl_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bsl_ls) | +| Ada | [`als`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#als) | +| Angular | [`angularls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#angularls) | +| Ansible | [`ansiblels`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ansiblels) | +| Antlers | [`antlersls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#antlersls) | +| Apex | [`apex_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#apex_ls) | +| Arduino | [`arduino_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#arduino_language_server) | +| Assembly | [`asm_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#asm_lsp) | +| Astro | [`astro`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#astro) | +| AWK | [`awk_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#awk_ls) | +| Azure Pipelines | [`azure_pipelines_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#azure_pipelines_ls) | +| Bash | [`bashls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bashls) | +| Bash | [`pkgbuild_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pkgbuild_language_server) | +| Beancount | [`beancount`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#beancount) | +| Bicep | [`bicep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bicep) | +| Blade | [`stimulus_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stimulus_ls) | +| BrighterScript | [`bright_script`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bright_script) | +| C# | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| C# | [`csharp_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#csharp_ls) | +| C# | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| C# ([docs](lua/mason-lspconfig/server_configurations/omnisharp/README.md)) | [`omnisharp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#omnisharp) | +| C# | [`omnisharp_mono`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#omnisharp_mono) | +| C++ | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| C++ | [`clangd`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd) | +| C++ | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Cairo | [`cairo_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cairo_ls) | +| C | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| C | [`clangd`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd) | +| C | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Clarity | [`clarity_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clarity_lsp) | +| Clojure | [`clojure_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clojure_lsp) | +| ClojureScript | [`clojure_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clojure_lsp) | +| CMake | [`cmake`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cmake) | +| CMake | [`neocmake`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#neocmake) | +| COBOL | [`cobol_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cobol_ls) | +| CodeQL | [`codeqlls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#codeqlls) | +| Coq | [`coq_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#coq_lsp) | +| Crystal | [`crystalline`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#crystalline) | +| CSS | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| CSS | [`css_variables`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#css_variables) | +| CSS | [`cssls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssls) | +| CSS | [`cssmodules_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssmodules_ls) | +| CSS | [`tailwindcss`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tailwindcss) | +| CSS | [`unocss`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#unocss) | +| Cucumber | [`cucumber_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cucumber_language_server) | +| Cue | [`dagger`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dagger) | +| Cypher | [`cypher_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls) | +| Dart | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Dhall | [`dhall_lsp_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dhall_lsp_server) | +| Django | [`jinja_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jinja_lsp) | +| Docker | [`docker_compose_language_service`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#docker_compose_language_service) | +| Docker | [`dockerls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dockerls) | +| DOT | [`dotls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dotls) | +| Drools | [`drools_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#drools_lsp) | +| D | [`serve_d`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#serve_d) | +| Earthly | [`earthlyls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#earthlyls) | +| Elixir | [`elixirls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#elixirls) | +| Elixir | [`lexical`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lexical) | +| Elm | [`elmls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#elmls) | +| Ember | [`ember`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ember) | +| Emmet | [`emmet_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#emmet_language_server) | +| Emmet | [`emmet_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#emmet_ls) | +| Erg | [`erg_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#erg_language_server) | +| Erlang | [`elp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#elp) | +| Erlang | [`erlangls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#erlangls) | +| F# | [`fsautocomplete`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#fsautocomplete) | +| Facility Service Definition | [`facility_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#facility_language_server) | +| Fennel | [`fennel_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#fennel_language_server) | +| Fennel | [`fennel_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#fennel_ls) | +| Flux | [`flux_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#flux_lsp) | +| Fortran | [`fortls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#fortls) | +| Glimmer | [`glint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glint) | +| GLSL | [`glslls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glslls) | +| Go | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Go | [`golangci_lint_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#golangci_lint_ls) | +| Go | [`gopls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls) | +| Go | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Go | [`templ`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#templ) | +| Gradle | [`gradle_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gradle_ls) | +| GraphQL | [`graphql`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#graphql) | +| Groovy | [`groovyls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#groovyls) | +| Handlebars | [`glint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glint) | +| Haskell | [`hls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hls) | +| Haxe | [`haxe_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#haxe_language_server) | +| Helm | [`helm_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#helm_ls) | +| Hoon | [`hoon_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hoon_ls) | +| HTML | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| HTML | [`html`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html) | +| HTML | [`lwc_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lwc_ls) | +| HTML | [`stimulus_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stimulus_ls) | +| HTML | [`templ`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#templ) | +| HTML | [`twiggy_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#twiggy_language_server) | +| HTMX | [`htmx`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#htmx) | +| Java | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Java | [`java_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#java_language_server) | +| Java | [`jdtls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jdtls) | +| JavaScript | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| JavaScript | [`biome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#biome) | +| JavaScript | [`denols`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#denols) | +| JavaScript | [`eslint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#eslint) | +| JavaScript | [`glint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glint) | +| JavaScript | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| JavaScript | [`lwc_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lwc_ls) | +| JavaScript | [`quick_lint_js`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#quick_lint_js) | +| JavaScript | [`rome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rome) | +| JavaScript | [`tsserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) | +| JavaScript | [`vtsls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vtsls) | +| Jinja | [`jinja_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jinja_lsp) | +| Jq | [`jqls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jqls) | +| JSON | [`biome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#biome) | +| JSON | [`jsonls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jsonls) | +| Jsonnet | [`jsonnet_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jsonnet_ls) | +| JSON | [`rome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rome) | +| JSON | [`spectral`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#spectral) | +| JSX | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Julia ([docs](lua/mason-lspconfig/server_configurations/julials/README.md)) | [`julials`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#julials) | +| Kotlin | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Kotlin | [`kotlin_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#kotlin_language_server) | +| LaTeX | [`ltex`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ltex) | +| LaTeX | [`texlab`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#texlab) | +| Lelwel | [`lelwel_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lelwel_ls) | +| LESS | [`css_variables`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#css_variables) | +| LESS | [`cssls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssls) | +| Liquid | [`shopify_theme_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#shopify_theme_ls) | +| Liquid | [`theme_check`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#theme_check) | +| Lua | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Lua | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Lua | [`lua_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls) | +| Luau | [`luau_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#luau_lsp) | +| Markdown | [`grammarly`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#grammarly) | +| Markdown | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Markdown | [`ltex`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ltex) | +| Markdown | [`markdown_oxide`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#markdown_oxide) | +| Markdown | [`marksman`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#marksman) | +| Markdown | [`prosemd_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#prosemd_lsp) | +| Markdown | [`remark_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#remark_ls) | +| Markdown | [`vale_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vale_ls) | +| Markdown | [`zk`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#zk) | +| Matlab | [`matlab_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#matlab_ls) | +| MDX | [`mdx_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#mdx_analyzer) | +| Meson | [`mesonlsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#mesonlsp) | +| Meson | [`swift_mesonls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#swift_mesonls) | +| Metamath Zero | [`mm0_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#mm0_ls) | +| Motoko | [`motoko_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#motoko_lsp) | +| Move | [`move_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#move_analyzer) | +| Nginx | [`nginx_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#nginx_language_server) | +| Nickel | [`nickel_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#nickel_ls) | +| Nim | [`nim_langserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#nim_langserver) | +| Nim | [`nimls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#nimls) | +| Nix | [`nil_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#nil_ls) | +| Nix | [`rnix`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rnix) | +| Nunjucks | [`jinja_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jinja_lsp) | +| OCaml | [`ocamllsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ocamllsp) | +| Odin | [`ols`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ols) | +| OneScript | [`bsl_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bsl_ls) | +| OpenAPI | [`vacuum`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vacuum) | +| OpenCL | [`opencl_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#opencl_ls) | +| OpenFOAM | [`foam_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#foam_ls) | +| OpenGL | [`glsl_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glsl_analyzer) | +| OpenSCAD | [`openscad_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#openscad_lsp) | +| Perl | [`perlnavigator`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#perlnavigator) | +| Pest | [`pest_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pest_ls) | +| PHP | [`intelephense`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#intelephense) | +| PHP | [`phpactor`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#phpactor) | +| PHP | [`psalm`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#psalm) | +| PHP | [`stimulus_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stimulus_ls) | +| PICO-8 | [`pico8_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pico8_ls) | +| PowerShell | [`powershell_es`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#powershell_es) | +| Prisma | [`prismals`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#prismals) | +| Protobuf | [`bufls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bufls) | +| Puppet | [`puppet`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#puppet) | +| PureScript | [`purescriptls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#purescriptls) | +| Python | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Python | [`basedpyright`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#basedpyright) | +| Python | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Python | [`jedi_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jedi_language_server) | +| Python | [`mutt_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#mutt_ls) | +| Python ([docs](lua/mason-lspconfig/server_configurations/pylsp/README.md)) | [`pylsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pylsp) | +| Python | [`pylyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pylyzer) | +| Python | [`pyre`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pyre) | +| Python | [`pyright`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pyright) | +| Python | [`ruff`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruff) | +| Python | [`ruff_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruff_lsp) | +| Python | [`sourcery`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sourcery) | +| Raku | [`raku_navigator`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#raku_navigator) | +| Reason | [`reason_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#reason_ls) | +| Rego | [`regols`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#regols) | +| ReScript | [`rescriptls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rescriptls) | +| reStructuredText | [`ltex`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ltex) | +| Robot Framework | [`robotframework_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#robotframework_ls) | +| R | [`r_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#r_language_server) | +| Ruby | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Ruby | [`rubocop`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rubocop) | +| Ruby | [`ruby_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruby_lsp) | +| Ruby | [`solargraph`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solargraph) | +| Ruby | [`sorbet`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sorbet) | +| Ruby | [`standardrb`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#standardrb) | +| Ruby | [`steep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#steep) | +| Ruby | [`stimulus_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stimulus_ls) | +| Rust | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| Rust | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| Rust | [`rust_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer) | +| Salt | [`salt_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#salt_ls) | +| SCSS | [`css_variables`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#css_variables) | +| SCSS | [`cssls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssls) | +| SCSS | [`somesass_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#somesass_ls) | +| Slint | [`slint_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#slint_lsp) | +| Smithy | [`smithy_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#smithy_ls) | +| Snyk | [`snyk_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#snyk_ls) | +| Solidity | [`solang`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solang) | +| Solidity | [`solc`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solc) | +| Solidity | [`solidity`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solidity) | +| Solidity | [`solidity_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solidity_ls) | +| Solidity | [`solidity_ls_nomicfoundation`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#solidity_ls_nomicfoundation) | +| Sphinx | [`esbonio`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#esbonio) | +| SQL | [`sqlls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sqlls) | +| SQL | [`sqls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sqls) | +| Standard ML | [`millet`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#millet) | +| Starlark | [`bzl`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bzl) | +| Starlark | [`starlark_rust`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#starlark_rust) | +| Stylelint | [`stylelint_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stylelint_lsp) | +| Svelte | [`svelte`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svelte) | +| SystemVerilog | [`hdl_checker`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hdl_checker) | +| SystemVerilog | [`svlangserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svlangserver) | +| SystemVerilog | [`svls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svls) | +| SystemVerilog | [`verible`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#verible) | +| Teal | [`teal_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#teal_ls) | +| Terraform | [`terraformls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#terraformls) | +| Terraform | [`tflint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tflint) | +| Text | [`grammarly`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#grammarly) | +| Text | [`ltex`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ltex) | +| Text | [`vale_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vale_ls) | +| Thrift | [`thriftls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#thriftls) | +| TOML | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| TOML | [`taplo`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#taplo) | +| Twig | [`twiggy_language_server`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#twiggy_language_server) | +| TypeScript | [`ast_grep`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ast_grep) | +| TypeScript | [`biome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#biome) | +| TypeScript | [`denols`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#denols) | +| TypeScript | [`eslint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#eslint) | +| TypeScript | [`glint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#glint) | +| TypeScript | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) | +| TypeScript | [`quick_lint_js`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#quick_lint_js) | +| TypeScript | [`rome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rome) | +| TypeScript | [`tsserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) | +| TypeScript | [`vtsls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vtsls) | +| Typst | [`tinymist`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tinymist) | +| Typst | [`typst_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typst_lsp) | +| Vala | [`vala_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vala_ls) | +| Verilog | [`hdl_checker`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hdl_checker) | +| Veryl | [`veryl_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#veryl_ls) | +| VHDL | [`hdl_checker`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hdl_checker) | +| VHDL | [`vhdl_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vhdl_ls) | +| VimScript | [`vimls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vimls) | +| Visualforce | [`visualforce_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#visualforce_ls) | +| Vue | [`volar`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#volar) | +| Vue | [`vuels`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vuels) | +| V | [`v_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#v_analyzer) | +| V | [`vls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vls) | +| WGSL | [`wgsl_analyzer`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#wgsl_analyzer) | +| XML | [`lemminx`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lemminx) | +| YAML | [`gitlab_ci_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gitlab_ci_ls) | +| YAML | [`hydra_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#hydra_lsp) | +| YAML | [`spectral`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#spectral) | +| YAML | [`yamlls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#yamlls) | +| Zig | [`zls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#zls) | +| - | [`autotools_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#autotools_ls) | +| - | [`custom_elements_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#custom_elements_ls) | +| - | [`diagnosticls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#diagnosticls) | +| - | [`dprint`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#dprint) | +| - | [`efm`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#efm) | +| - | [`typos_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typos_lsp) | + [julials]: ./lua/mason-lspconfig/server_configurations/julials/README.md [omnisharp]: ./lua/mason-lspconfig/server_configurations/omnisharp/README.md diff --git a/scripts/lua/mason-scripts/mason-lspconfig/generate.lua b/scripts/lua/mason-scripts/mason-lspconfig/generate.lua index b522c263a..3c3106959 100644 --- a/scripts/lua/mason-scripts/mason-lspconfig/generate.lua +++ b/scripts/lua/mason-scripts/mason-lspconfig/generate.lua @@ -3,13 +3,14 @@ local Optional = require "mason-core.optional" local _ = require "mason-core.functional" local a = require "mason-core.async" +local fs = require "mason-core.fs" local lspconfig = require "lspconfig" local lspconfig_server_mapping = require "mason-lspconfig.mappings.server" local path = require "mason-core.path" local script_utils = require "mason-scripts.utils" -local DOCS_DIR = path.concat { vim.loop.cwd(), "doc" } -local MASON_LSPCONFIG_DIR = path.concat { vim.loop.cwd(), "lua", "mason-lspconfig" } +local DOCS_DIR = "doc" +local MASON_LSPCONFIG_DIR = path.concat { "lua", "mason-lspconfig" } require("mason").setup() require("mason-registry").refresh() @@ -50,6 +51,9 @@ local function ensure_valid_package_name_translations() end end +local get_lspconfig_url = + _.format "https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#%s" + local get_server_mappings = _.compose( _.filter_map(function(pair) local lspconfig_name, mason_name = @@ -57,14 +61,11 @@ local get_server_mappings = _.compose( if not pcall(require, ("lspconfig.server_configurations.%s"):format(lspconfig_name)) then return Optional.empty() end - local lspconfig_url = ("https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#%s"):format( - lspconfig_name - ) local mason_url = ("https://mason-registry.dev/registry/list#%s"):format(mason_name) return Optional.of { lspconfig_name = lspconfig_name, mason_name = mason_name, - lspconfig_url = lspconfig_url, + lspconfig_url = get_lspconfig_url(lspconfig_name), mason_url = mason_url, } end), @@ -128,10 +129,107 @@ local function create_server_mapping_docs() end end +local find_index = _.curryN(function(predicate, list) + for i, item in ipairs(list) do + if predicate(item) then + return i + end + end + return -1 +end, 2) + +---@async +local function update_available_lsp_servers() + local readme_path = "README.md" + local readme_contents = fs.sync.read_file(readme_path) + local readme_lines = _.split("\n", readme_contents) + + local start = find_index(_.equals "", readme_lines) + 1 + local stop = find_index(_.equals "", readme_lines) - 1 + + for i = stop, start, -1 do + table.remove(readme_lines, i) + end + + local server_mappings = require("mason-lspconfig.mappings.server").lspconfig_to_package + local registry = require "mason-registry" + + ---@type {languages: string[], name: string}[] + local servers = {} + + for lspconfig_name, mason_name in pairs(server_mappings) do + local pkg = registry.get_package(mason_name) + table.insert(servers, { + languages = pkg.spec.languages, + name = lspconfig_name, + }) + end + + local servers_markdown_list = _.compose( + _.map(function(entry) + local server_docs = path.concat { MASON_LSPCONFIG_DIR, "server_configurations", entry.server, "README.md" } + if fs.sync.file_exists(server_docs) then + return ("| %s ([docs](%s)) | [`%s`](%s) |"):format( + entry.language, + server_docs, + entry.server, + get_lspconfig_url(entry.server) + ) + else + return ("| %s | [`%s`](%s) |"):format(entry.language, entry.server, get_lspconfig_url(entry.server)) + end + end), + _.sort_by(function(entry) + if entry.language == "-" then + -- brother eww + return "zzzz" .. (entry.language .. entry.server):lower() + else + return (entry.language .. entry.server):lower() + end + end), + function(tbl) + return vim.iter(tbl):flatten():totable() + end, + _.map(function(server) + if #server.languages == 0 then + return { + { + server = server.name, + language = "-", + }, + } + else + return _.map(function(language) + return { + server = server.name, + language = language, + } + end, server.languages) + end + end) + )(servers) + + for i = #servers_markdown_list, 1, -1 do + table.insert(readme_lines, start, servers_markdown_list[i]) + end + + for _, line in + ipairs(_.reverse { + "| Language | Server name |", + "| --- | --- |", + }) + do + table.insert(readme_lines, start, line) + end + + fs.sync.write_file(readme_path, _.join("\n", readme_lines)) +end + a.run_blocking(function() a.wait_all { create_lspconfig_filetype_map, ensure_valid_package_name_translations, create_server_mapping_docs, + update_available_lsp_servers, } end)